Skip to content

Siri shortcut translation files are not handled #151

Open

Description

@patricks

I have an app which supports Siri Shortcuts, therefore I have a .intentdefinition file. This file is also translated, but it looks like, BartyCrouch ignores this file.

Activity

  1. Jeehut commented on Oct 16, 2019

    @Jeehut
    Member

    I haven't used Siri Shortcuts yet, so I'm not aware of this file. Can you please further explain how this is localized? Are there any Strings files? Can you list the different file paths? Are they below something like en.lproj?

    It is totally possible that we didn't cover those files yet. While I'm not sure how BartyCrouch could improve translation there, I'm definitely open for a PR that adds support for Siri Shortcuts.

  2. patricks commented on Oct 18, 2019

    @patricks
    ContributorAuthor

    The files are located in the Base.lproj, en.proj locations. The .intent file is a xml file.

  3. patrickferreira commented on Dec 30, 2019

    @patrickferreira

    +1
    It would be amazing if bartycrouch could handle the translations of custom intents.
    Let me know if you need any further info.

  4. Jeehut commented on Dec 31, 2019

    @Jeehut
    Member

    @patrickferreira I understand that. But my question, how BartyCrouch could help here is still not answered. I'm assuming you expect something similar to what BartyCrouch does with Interface Builder files, right? (Automatically updating the .strings files with new translatable texts in the IB files.) That's only supported by BartyCrouch because Apple has a tool (namely extractLocStrings) which does that for us. If there's a similar tool for the .intent files, it might be easy to add support for intents as well. If not, things get a little more complicated.

  5. letatas commented on Jan 7, 2020

    @letatas

    For your information .intentdefinition files are xml property lists, so may be the same workflow that is used for classic .plist files can be applied with them?

  6. modified the milestone: Version 4.0 on Apr 16, 2020
  7. NMAC427 commented on Oct 19, 2020

    @NMAC427
    Contributor

    I'm experiencing the same issue. And it still hasn't been fixed in version 4.x. Would be great if someone could take a look at this.

  8. Jeehut commented on Oct 19, 2020

    @Jeehut
    Member

    @NMAC427 Thank you for bringing this up again. As I have noted above, BartyCrouch is currently based on tools from Apple (namely extractLocStrings) which don't support XML/PLIST files (AFAIK), so it's not trivial to add support for Siri shortcut translation files. But I'm actually thinking about switching to a completely custom implementation for the next major version of BartyCrouch where I could also take other file types like the .intentdefinition file into consideration. I can't promise any time when I will be working on it though as I'm developing BartyCrouch in my free time. If someone was to add support for these files, I'd love to review & merge a PR for it though.

  9. NMAC427 commented on Oct 19, 2020

    @NMAC427
    Contributor

    But I'm actually thinking about switching to a completely custom implementation

    A few years ago I developed such a system myself for my own projects. It definitely is possible but the main problem with it is that Apple constantly creates breaking changes (i.e. new platform or new ui element). As long as Apple provides tools to generate .string files from storyboards, I would use their tools. That way you automatically get support for new ui elements and platforms. (This is also akin to the Unix philosophy where you build programs on top of other programs instead of reimplementing everything yourself.)

    Instead I would only create a custom implementation for handling files (like .intentdefinition) where Apple doesn't provide any tools for creating the derived .string files.

  10. Jeehut commented on Oct 19, 2020

    @Jeehut
    Member

    @NMAC427 Good points and don't worry, I won't be reimplementing anything that changes often and Apple (or the community) already provides an updated tool for. But extractLocString for example handles NSLocalizedString and there not much has changed over time. By implementing a custom approach, I can add support for more customization options, I can add some kind of plugin system where .intentdefinition support could be added easily etc.

    But I will think about the design choices when I have the time to actually start working on this.

  11. RSickenberg commented on Jan 21, 2021

    @RSickenberg

    Hello, is this still ongoing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions