signal-muon icon indicating copy to clipboard operation
signal-muon copied to clipboard

App doesn't use system-language and date-time format

Open rgnuru opened this issue 7 years ago • 5 comments

The app always uses english and the english date-time format.

Switching the line in js/i18n.js: let localesFile = chrome-extension://iopnjipkpnmbpjaalcjcpcbfcnjknmmo/_locales/en/messages.json to the local language works as a hack for the messages

in js/chromium.js the function:

i18n.getLocale = function() {
    if (window.chrome && chrome.i18n) {
        return chrome.i18n.getUILanguage();
    }
    return 'en';
};

Always returns 'en' even if the system language is another language.

If implementing a date or time input field in a html form, the english standard is used (YYYY-MM-DD and 12 hour time format)

rgnuru avatar Apr 08 '17 06:04 rgnuru

Related: #8. Muon does not yet fully support the chrome.i18n API.

diracdeltas avatar Apr 19 '17 08:04 diracdeltas

Oops, actually I think it does support chrome.i18n now. Could you try again building from the latest master?

diracdeltas avatar Apr 19 '17 09:04 diracdeltas

I think https://github.com/diracdeltas/Signal-Desktop/commit/85784318c2bb39175e0a446f13082909c1eb5d49 would fix this, since it gets rid of the hacky polyfill and instead uses chrome.i18n.getMessage (same as upstream Signal-Desktop). Please re-open if not. Thanks!

diracdeltas avatar Apr 19 '17 09:04 diracdeltas

@diracdeltas Looks like it doesn't work for me, but I'll have a closer look at this later today

asafonov avatar Apr 19 '17 09:04 asafonov

I set my $LANG to ru_RU.UTF-8 and run signal-muon built from master. But signal still uses English language. Can anyone confirm?

asafonov avatar Apr 20 '17 09:04 asafonov