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

If System Language is Latin American Spanish, Signal doesn't use the existing spanish translation #5194

Closed
1 task done
Elaborendum opened this issue Apr 17, 2021 · 28 comments

Comments

@Elaborendum
Copy link

  • I have searched open and closed issues for duplicates

Bug Description

Previously the Latin American spanish existed only as a file that didn't show up on Transifex, which meant it wasn't updated regularly, causing it to be very incomplete. It was removed in #5037 because of it.

However, in the lastest release the app just stays entirely in english instead of using the existing complete Spanish translation that currently only shows up when System Language is European Spanish.

Related to #4957.

Steps to Reproduce

  1. Change system language to any latin american spanish.
  2. Open Signal Desktop
  3. See bug

Actual Result:

Application is entirely in english.

Expected Result:

Application is displayed in spanish.

Platform Info

Signal Version: v5.0.0

Operating System: Windows 10

Linked Device Version: Android 10

@hiqua
Copy link
Contributor

hiqua commented Apr 19, 2021

Then that's probably a generic problem with the locale fallback mechanism, either the exact locale exists or it defaults to English. Others like fr_BE probably fail similarly.

@hiqua
Copy link
Contributor

hiqua commented May 21, 2021

The function to fix would be:

function load({ appLocale, logger } = {}) {
if (!appLocale) {
throw new TypeError('`appLocale` is required');
}
if (!logger || !logger.error) {
throw new TypeError('`logger.error` is required');
}
const english = getLocaleMessages('en');
// Load locale - if we can't load messages for the current locale, we
// default to 'en'
//
// possible locales:
// https://github.com/electron/electron/blob/master/docs/api/locales.md
let localeName = normalizeLocaleName(appLocale);
let messages;
try {
messages = getLocaleMessages(localeName);
// We start with english, then overwrite that with anything present in locale
messages = _.merge(english, messages);
} catch (e) {
logger.error(
`Problem loading messages for locale ${localeName} ${e.stack}`
);
logger.error('Falling back to en locale');
localeName = 'en';
messages = english;
}

The problem is that it looks for the exact locale, such as es-MX, fails, and doesn't fall back to es-*.

Compare for instance with this:

function getLanguages(userLocale, availableLocales) {
const baseLocale = userLocale.split('-')[0];
// Attempt to find the exact locale
const candidateLocales = uniq([userLocale, baseLocale]).filter(l =>
availableLocales.includes(l)
);
if (candidateLocales.length > 0) {
return candidateLocales;
}
// If no languages were found then just return all locales that start with the
// base
return uniq(availableLocales.filter(l => l.startsWith(baseLocale)));
}

where baseLocale would be just es.

We should adopt a similar behavior for the interface.

@hiqua
Copy link
Contributor

hiqua commented May 21, 2021

@EvanHahn-Signal can we get a 'Good starter task' for this? I think it should be fairly simple. Unless you disagree, or you guys plan on fixing it soon

@Meteor0id
Copy link

Meteor0id commented May 21, 2021

Would also be a great opportunity to add a way for testers to force Signal-Desktop to run with a different locale

@hiqua
Copy link
Contributor

hiqua commented May 21, 2021

@Meteor0id on linux:

LANG=es_ES.UTF-8 signal-desktop

I guess this works on mac as well, I don't know about Windows.

@unhammer
Copy link

I'm not able to get Nynorsk running even if I explicitly set LANG (tried nn, nn_NO, nn_NO.UTF-8, nn.UTF-8), it just shows Bokmål (nb).

@stale
Copy link

stale bot commented Sep 22, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Sep 22, 2021
@Elaborendum
Copy link
Author

The issue is still present in the current version.

@stale stale bot removed the stale label Sep 22, 2021
@stale
Copy link

stale bot commented Dec 21, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Dec 21, 2021
@Elaborendum
Copy link
Author

The issue is still present in the current version.

@stale stale bot removed the stale label Dec 22, 2021
@fow0ryl
Copy link

fow0ryl commented Jan 19, 2022

Same problem with german language with beta 5.29
If locale is set to de-DE,UTF8 signal falls back to en. If locale is set to "de" signal uses german language...

Platform is Manjaro Linux

@gunchleoc
Copy link

I also have the problem that the gd locale stopped working. In this case, Signal assumes the reverse locale order. Where does it get them from? From the start log output:

{"level":30,"time":"2023-02-09T09:23:22.692Z","msg":"app.ready: preferred system locales: en-US, gd-GB, gd"}
{"level":30,"time":"2023-02-09T09:23:22.695Z","msg":"Loading preferred system locale: 'en-US'"}
{"level":40,"time":"2023-02-09T09:23:22.696Z","msg":"Problem loading messages for locale 'en-US', Error: ENOENT, _locales/en-US/messages.json not found in [REDACTED]"}
{"level":40,"time":"2023-02-09T09:23:22.696Z","msg":"Falling back to parent language: 'en'"}
{"level":30,"time":"2023-02-09T09:23:22.727Z","msg":"app ready"}

OS: Linux Mint 20.3 Mate
Signal version: 6.4.1. production

@jamiebuilds-signal
Copy link
Member

@gunchleoc Interesting, Chromium must be returning en-US to us from somewhere. Could you share details of your OS level language settings?

@gunchleoc
Copy link

These are all language-related variables that printenv will give me:

LANGUAGE=gd_GB
LC_ADDRESS=gd_GB.UTF-8
LC_NAME=gd_GB.UTF-8
LC_MONETARY=gd_GB.UTF-8
GDM_LANG=gd
LC_PAPER=gd_GB.UTF-8
LANG=gd_GB.UTF-8
LC_IDENTIFICATION=gd_GB.UTF-8
LC_TELEPHONE=gd_GB.UTF-8
LC_MEASUREMENT=gd_GB.UTF-8
LC_TIME=gd_GB.UTF-8
LC_NUMERIC=gd_GB.UTF-8

English is always installed as a fallback language, because our Linux translation is not at 100%

@gunchleoc
Copy link

I tried adding gd to Chromium Browser + reboot, but it didn't fix things. That's as expected though, because Signal detected gd and did not detect fr, so this is not where it came from.

chromium

@scottnonnenberg-signal
Copy link
Contributor

Is this working as expected on the latest Desktop versions, or is there still a problem?

@unhammer
Copy link

unhammer commented Mar 6, 2023

Well, I don't know about the Spanish, but mine is still in Norwegian Bokmål (nb) instead of Norwegian Nynorsk (nn). It used to work with the workaround in #3871 but the interface is now in Bokmål regardless of whether I apply that or not.

@scottnonnenberg-signal
Copy link
Contributor

@unhammer Can you provide us a debug log? That will give us important information about how your locales are presented to us from the operating system, and then how we chose from among them.

@gunchleoc
Copy link

Is this working as expected on the latest Desktop versions, or is there still a problem?

Still a problem on Signal Desktop on Linux Mint, GD locale

https://debuglogs.org/desktop/6.8.0/6d4c002f4961bb36389afd8a6c03a99e9f9941b782f2fc2c72ac231c41fb39f1.gz

@jamiebuilds-signal
Copy link
Member

@unhammer It looks like your system is configured for both nn and nb. Out of those we only have translations for nb. From the linked issue it looks like you're trying to supply your own locale on the file system. We can't really guarantee stability for that as we continue to improve our locale resolution.

@jamiebuilds-signal
Copy link
Member

@gunchleoc Sorry, you won't be able to configure your languages with a separate Chromium app. If you want Signal to fallback to French (since we do not have a translation into Gaelic), you'll need to configure your OS to have it as a secondary locale (Our logs and your environment variables are showing that you only have Gaelic configured).

I'm not a frequent Linux user, but I believe to configure the OS with multiple languages it is typically:

# list ordered most preferred -> least preferred, separated by colon `:`
export LANGUAGE=gd_GB:fr

Hopefully that works in Linux Mint

@unhammer
Copy link

unhammer commented Mar 8, 2023

@jamiebuilds-signal OK, signal-desktop used to be localised into nn so I assumed it not working was a bug. Does that mean the language was dropped? You may want to make your translators aware of apertium nob→nno :-)

@gunchleoc
Copy link

@jamiebuilds-signal My Signal Desktop used to be in Gaelic, because I have translated Signal Desktop via https://www.transifex.com/signalapp/signal-desktop/language/gd/. That link seems to be dead now. Did you remove all translations without making an announcement? Where can I reupload my gd translation of Signal Desktop?

There is no information for contributors, and the documentation on the iOS project still points to the nonexistent Transifex. So, I don't know where to look.

@jamiebuilds-signal
Copy link
Member

@unhammer Ah, yeah I found this out after my last reply, I joined Signal shortly before we made the transition to Smartling and we did drop nn (and some others) as part of that. We've started rolling out additional languages since that transition, but I'm not sure if we may add nn back or what the timeline for that would be. There are some more details of that transition here: https://community.signalusers.org/t/signal-localization-update/44905

@jamiebuilds-signal
Copy link
Member

@gunchleoc Sorry about the out of date docs, I notified the iOS folks to update that. It sounds like we do want to add community based translations back in the future, but we want to do it in an updated way. You can get more details about the current state of things over here: https://community.signalusers.org/t/signal-localization-update/44905

@stale
Copy link

stale bot commented Jun 12, 2023

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jun 12, 2023
@stale
Copy link

stale bot commented Jun 20, 2023

This issue has been closed due to inactivity.

@stale stale bot closed this as completed Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

9 participants