Skip to content

[Bug] update.code with additive=false and code in multiple parent directories looses strings #264

@mman

Description

@mman

Steps to Reproduce:

I have my .bartycrouch.toml configured in a way that it looks up strings in multiple code directories referenced via ../ and combining them into one Localizable.strings file located in ./

For example like this:

[update]
tasks = ["interfaces", "code", "normalize"]

[update.interfaces]
paths = ["../App"]
defaultToBase = false
ignoreEmptyStrings = false
unstripped = false

[update.code]
codePaths = ["../App", "../Shared", "../Shared2"]
subpathsToIgnore = ["Vendor"]
localizablePaths = ["."]
defaultToKeys = false
additive = false
unstripped = false
plistArguments = true
customFunction = "LocalizedStringResource"

[update.normalize]
paths = ["."]
sourceLocale = "en"
harmonizeWithSource = true
sortByKeys = true

[lint]
paths = ["."]
duplicateKeys = true
emptyValues = true

Expected Behavior:

I expect bartycrouch update to combine all strings from all sources, clean them up and put them into one Localizable.strings file.

Current Behavior:

in additive=false mode strings from all directories but last specified via codePaths are lost and only strings for the last code directory are output.

This means that all strings from ../App and ../Shared directories are lost and only strings found in ../Shared2 are actually output. Not sure if it is related to the fact that I use parent dir ../ references.

Workaround:

For now I have found a workaround to specify just one entry in codePaths and skip unwanted stuff via subpathsToIgnore.

Environment

Show environment details
€ bartycrouch --version
Version: 4.11.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions