Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to add multiple configurations per project #5

Open
karl-ravn opened this issue May 25, 2015 · 1 comment
Open

Possibility to add multiple configurations per project #5

karl-ravn opened this issue May 25, 2015 · 1 comment

Comments

@karl-ravn
Copy link

When having several flavours (for android), you need to create multiple projects in order to have different project ids in poeditor. Otherwise, it seems to be uncertain which project will get downloaded.

It seems to not matter which project you run poeditors commands from, both projects will get pulled/pushed.

Workaround in build.gradle file is:

project(':TranslationA') {
    apply plugin: 'poeditor'

    poeditor {
        apikey 'xxxxxxxxxxxxxxxxxxxxxxx'
        projectId '12345'
        type 'android_strings'
        tagsNew '1.0'

        terms 'App/src/main/res/values/localization_strings.xml'
        trans 'en', 'App/src/A/res/values/localization_strings.xml'
        trans 'nl', 'App/src/A/res/values-nl/localization_strings.xml'

    }
}

project(':TranslationB') {
    apply plugin: 'poeditor'

    poeditor {
        apikey 'xxxxxxxxxxxxxxxxxxxxxxx'
        projectId '54321'
        type 'android_strings'
        tagsNew '1.0'

        terms 'App/src/main/res/values/localization_strings.xml'
        trans 'en', 'App/src/B/res/values/localization_strings.xml'

    }

}
@lukin0110
Copy link
Owner

@karl-ravn Sorry for the late response. Somehow i didn't got notified by github that you opened an issue. I understand the issue. If you have 2 projects configured and you run gradle poeditorPull it will download the translations from both right?

How can we fix this? Is it possible to make the declaration of poeditor dynamic (i'm not an experience gradle plugin dev:)). For example:

poeditorProjectA {
 ...
}

poeditorProjectB {
 ... 
}

This will add the following tasks to your gradle:

gradle poeditorProjectAInit
gradle poeditorProjectAPull

gradle poeditorProjectBInit
gradle poeditorProjectBPull

Will this work for multi project configuration or do propose another way of configuration?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants