Skip to content

generate-localization-file include only strings without tags #291

@nuke-dash

Description

@nuke-dash

I have a twine file with keys containing no tags and keys containing tags.
e.g.

twine example
[[Guest Mode]]
    [guestMode_unavailable_on_guest_mode_popup_cancel_action]
        en = Cancel
        comment = Confirmation popup action "Cancel" to continue in guest mode
        sl = Cancel
[[Permissions]]
    [NSBluetoothAlwaysUsageDescription]
        en = ${PRODUCT_NAME} uses Bluetooth to discover nearby Cast devices.
        comment = iOS message shown to the user when using chomecast device discovery. PRODUCT_NAME is the name of the app
        tags = infoplist
        sl = ${PRODUCT_NAME} uses Bluetooth to discover nearby Cast devices.

I can't seem to get only the strings without tags.
Getting only the infoPlist strings works with the following command:
twine generate-localization-file ./twine.txt ./test.strings --lang en --format apple --tags infoplist

But using ~infoplist doesn't work
$ twine generate-localization-file ./twine.txt ./test.strings --lang en --format apple --tags ~infoplist
zsh: no such user or named directory: infoplist

Wrapping it inside double quotes also doesn't work
$ twine generate-localization-file ./twine.txt ./test.strings --lang en --format apple --tags "~infoplist"
Nothing to generate! The resulting file would not contain any translations.

Is it perhaps required that all field have tags when working with --tags?
As I noticed that when I add the tag "common" to one of the strings without tags the command succeeds when using double quotes and contains only the one string.
But I would expect it to also include the strings without tags.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions