Skip to content

[android][Localize] Values-(default language) not generated  #369

@kefahB

Description

@kefahB

Hi @NathanWalker,

There is little issue with the localize plugin, the default language not generated in his own folder because of this rule since it is the default language the hook generate the strings for res/values/strings.xml only, I think it should generate also res/values-en/strings.xml.

I suggest this :

run() {
    this.dataProvider.getLanguages().forEach((languageI18nEntries, language) => {
        // ADD THIS
        if(language === this.dataProvider.getDefaultLanguage()) {
            this.createLanguageResourcesFiles(language, false, languageI18nEntries);
        }
        this.createLanguageResourcesFiles(language, language === this.dataProvider.getDefaultLanguage(), languageI18nEntries);
    });
    if (fs.existsSync(this.appResourcesDirectoryPath) && fs.statSync(this.appResourcesDirectoryPath).isDirectory()) {
        this.cleanObsoleteResourcesFiles(this.appResourcesDirectoryPath, this.dataProvider.getLanguages());
    }
    return this;
}

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