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

When downloading translations the plugin doesn't take any custom locales into account #13

Open
frett opened this issue Apr 2, 2024 · 0 comments · May be fixed by #14
Open

When downloading translations the plugin doesn't take any custom locales into account #13

frett opened this issue Apr 2, 2024 · 0 comments · May be fixed by #14

Comments

@frett
Copy link
Contributor

frett commented Apr 2, 2024

OneSky allows you to set a custom locale for a language:
Screenshot 2024-04-02 at 11 52 54 AM

When downloading translation files from the OneSky website it respects this custom locale, but the plugin currently uses the original locale.

It appears that the fetch project languages API has an undocumented custom_code attribute that is returned for languages.

Sample response from one of our projects:

        {
            "code": "lv-LV",
            "custom_locale": "lv",
            "english_name": "Latvian (Latvia)",
            "is_base_language": false,
            "is_ready_to_publish": false,
            "last_updated_at": "2024-03-28T20:38:38+0000",
            "last_updated_at_timestamp": 1711658318,
            "local_name": "Latviešu (Latvija)",
            "locale": "lv",
            "region": "LV",
            "translation_progress": "100.0%"
        },
        {
            "code": "te-IN",
            "custom_locale": null,
            "english_name": "Telugu (India)",
            "is_base_language": false,
            "is_ready_to_publish": false,
            "last_updated_at": "2023-12-29T22:22:27+0000",
            "last_updated_at_timestamp": 1703888547,
            "local_name": "తెలుగు (భారత దేశం)",
            "locale": "te",
            "region": "IN",
            "translation_progress": "59.4%"
        },

It would be nice if the plugin respected the custom_locale when downloading a translation.

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