WARNING: THIS SITE IS A MIRROR OF GITHUB.COM / IT CANNOT LOGIN OR REGISTER ACCOUNTS / THE CONTENTS ARE PROVIDED AS-IS / THIS SITE ASSUMES NO RESPONSIBILITY FOR ANY DISPLAYED CONTENT OR LINKS / IF YOU FOUND SOMETHING MAY NOT GOOD FOR EVERYONE, CONTACT ADMIN AT ilovescratch@foxmail.com
Skip to content

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

@frett

Description

@frett

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.

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