lokalise / lokalise-cli-2-go

Lokalise CLI v2
Other
108 stars 52 forks source link

Weird behavior to download strings format files #57

Closed plp69 closed 3 years ago

plp69 commented 3 years ago

Hello

I have 2 projects on localize and I use this line to download localizable files for iOS:

./lokalise2 
    --token <TOKEN-ID> 
    --project-id <PROJECT_ID> 
    file download 
    --format strings 
    --unzip-to <FOLDER> 
    --filter-langs en,fr
    --export-empty-as base 
    --export-sort first_added 
    --placeholder-format ios 
    --bundle-structure %LANG_ISO%.lproj/Localizable.%FORMAT% 
    --indentation 2sp

For the first project, the line works perfectly. I have correctly and well positioned files Localizable.strings and Localizable.stringsdict. Like that:

FOLDER |-- en.lproj |---- Localizable.strings |---- Localizable.stringsdict |-- fr.lproj |---- Localizable.strings |---- Localizable.stringsdict

But when I try on the second project I have a weird behavior, I have a folder added in my .lproj folders with a second Localizable.strings. The Localizable.strings are different and the translations of my project are splitted on the both files.

FOLDER |-- en.lproj |---- Localizable.strings |---- Localizable.stringsdict |---- Lokalize |------ iOS |-------- en.lproj |---------- Localizable.strings |-- fr.lproj |---- Localizable.strings |---- Localizable.stringsdict |---- Lokalize |------ iOS |-------- fr.lproj |---------- Localizable.strings

If I use this line, it works perfectly but I don't want to have an additional build sdk.

./lokalise2 
    --token <TOKEN-ID> 
    --project-id <PROJECT_ID> 
    file download 
    --format ios_sdk 
    --unzip-to <FOLDER> 
    --filter-langs en,fr
    --export-empty-as base 
    --export-sort first_added 
    --placeholder-format ios 
    --bundle-structure %LANG_ISO%.lproj/Localizable.%FORMAT% 
    --indentation 2sp

I don’t know If an argument exists to avoid this behavior, or my command line is wrong or if there is a bug

beinarovic commented 3 years ago

Hey @plp69 Sorry for the late response, did you solve the issue? It seems to be due to Lokalise project configuration

plp69 commented 3 years ago

[Sorry wrong account...]

No unfortunately I still have the issue.

For the moment, I manually replace the localizable.strings of my project...

I don't think this is a problem in the project settings because before I used the localize CLI v1 and I didn't have this issue.

But I still compared the settings of the 2 projects and I have no difference...

beinarovic commented 3 years ago

Can you please reach out to our Tech Support team on our website? (Intercom chat widget on the bottom right)

They would be glad to help :)

jouni-kivra commented 3 years ago

Was this ever fixed? I seem to have similar problem, after adding plural translation support to project (iOS)