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

Add Esperanto locale to binary releases #3871

Closed
1 task done
gpl34 opened this issue Jan 14, 2020 · 24 comments
Closed
1 task done

Add Esperanto locale to binary releases #3871

gpl34 opened this issue Jan 14, 2020 · 24 comments

Comments

@gpl34
Copy link

gpl34 commented Jan 14, 2020

  • I have searched open and closed issues for duplicates

Bug Description

Esperanto locales are missing from binary releases (normal and beta).

Platform Info

Signal Version:

v1.30.0-beta.3 and v1.29.3

Operating System:

Linux 64-bit, Ubuntu 19.10.

Linked Device Version:

4.53.6

@gpl34
Copy link
Author

gpl34 commented Sep 2, 2020

Meanwhile, how can I test the translations I did? What to download and where to put it for Signal Desktop Beta to see it?
Thank you.

@unhammer
Copy link

Nynorsk (iso639 code "nn") ones are also missing. Do they have to be 100% translated first? (I see "nb.pak" is in there without being 100% done, but perhaps they were at some point …)

@stale
Copy link

stale bot commented Sep 25, 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 25, 2021
@gpl34
Copy link
Author

gpl34 commented Sep 25, 2021

The locale is still missing.

@stale stale bot removed the stale label Sep 25, 2021
@scottnonnenberg-signal
Copy link
Contributor

We only pull new languages down when they reach a certain threshold:

cmd: 'tx pull --all --use-git-timestamps --minimum-perc=80',

@gpl34
Copy link
Author

gpl34 commented Nov 18, 2021

Thank you for the explanation.
There must be a problem then: eo lang is 100% translated and no sign in the last distribution of the language.

@indutny-signal
Copy link
Contributor

I believe eo locale should be available in 5.24.0 and 5.25.0-beta.2 releases. Could you give it a try, please?

@gpl34
Copy link
Author

gpl34 commented Nov 19, 2021

I believe eo locale should be available in 5.24.0 and 5.25.0-beta.2 releases. Could you give it a try, please?

Unfortunately, there is no eo locale. Here is the content of the locales directory:

am.pak  bn.pak  da.pak  en-GB.pak   es.pak  fil.pak  gu.pak  hr.pak  it.pak  ko.pak  ml.pak  nb.pak  pt-BR.pak  ru.pak  sr.pak  ta.pak  tr.pak  zh-CN.pak
ar.pak  ca.pak  de.pak  en-US.pak   et.pak  fi.pak   he.pak  hu.pak  ja.pak  lt.pak  mr.pak  nl.pak  pt-PT.pak  sk.pak  sv.pak  te.pak  uk.pak  zh-TW.pak
bg.pak  cs.pak  el.pak  es-419.pak  fa.pak  fr.pak   hi.pak  id.pak  kn.pak  lv.pak  ms.pak  pl.pak  ro.pak     sl.pak  sw.pak  th.pak  vi.pak

@indutny-signal
Copy link
Contributor

Could you elaborate on where these file names come from?

Here's the folder with our own localization: https://github.com/signalapp/Signal-Desktop/tree/development/_locales/eo

@unhammer
Copy link

unhammer commented Nov 19, 2021

$ dpkg -L signal-desktop|grep locales
/opt/Signal/locales
/opt/Signal/locales/lt.pak
/opt/Signal/locales/bn.pak
/opt/Signal/locales/fi.pak
/opt/Signal/locales/nb.pak
/opt/Signal/locales/ro.pak
/opt/Signal/locales/da.pak
/opt/Signal/locales/he.pak
/opt/Signal/locales/am.pak
/opt/Signal/locales/gu.pak
/opt/Signal/locales/sk.pak
/opt/Signal/locales/hr.pak
/opt/Signal/locales/fa.pak
/opt/Signal/locales/ta.pak
/opt/Signal/locales/sw.pak
/opt/Signal/locales/bg.pak
/opt/Signal/locales/te.pak
/opt/Signal/locales/zh-TW.pak
/opt/Signal/locales/ar.pak
/opt/Signal/locales/es-419.pak
/opt/Signal/locales/zh-CN.pak
/opt/Signal/locales/sl.pak
/opt/Signal/locales/pt-PT.pak
/opt/Signal/locales/sr.pak
/opt/Signal/locales/fr.pak
/opt/Signal/locales/es.pak
/opt/Signal/locales/sv.pak
/opt/Signal/locales/uk.pak
/opt/Signal/locales/en-GB.pak
/opt/Signal/locales/ms.pak
/opt/Signal/locales/pt-BR.pak
/opt/Signal/locales/et.pak
/opt/Signal/locales/ca.pak
/opt/Signal/locales/id.pak
/opt/Signal/locales/th.pak
/opt/Signal/locales/fil.pak
/opt/Signal/locales/cs.pak
/opt/Signal/locales/mr.pak
/opt/Signal/locales/hi.pak
/opt/Signal/locales/ja.pak
/opt/Signal/locales/it.pak
/opt/Signal/locales/en-US.pak
/opt/Signal/locales/nl.pak
/opt/Signal/locales/hu.pak
/opt/Signal/locales/tr.pak
/opt/Signal/locales/kn.pak
/opt/Signal/locales/de.pak
/opt/Signal/locales/ru.pak
/opt/Signal/locales/ml.pak
/opt/Signal/locales/pl.pak
/opt/Signal/locales/ko.pak
/opt/Signal/locales/vi.pak
/opt/Signal/locales/el.pak
/opt/Signal/locales/lv.pak

I see neither eo.pak nor nn.pak. This is after doing an apt dist-upgrade today, giving me

$ dpkg -l signal-desktop|grep signal-desktop
ii  signal-desktop 5.24.0       amd64 

@indutny-signal
Copy link
Contributor

Ah, well. This is probably from electron itself. Our locales are hidden inside .asar file so you won't see them with dpkg -l.

@gpl34
Copy link
Author

gpl34 commented Nov 19, 2021

Well, I just tried again to launch from command line. Signal Desktop does not start in Esperanto.
Is there a CLI command to check whether the locale is in the .asar file?

@indutny-signal
Copy link
Contributor

There is an npm module called asar that can extract the contents of the file, but more importantly can you try starting app in a different supported locale that we know for sure works just fine? I think either german or french would be a good test case, depending on what your current locale is.

@gpl34
Copy link
Author

gpl34 commented Nov 20, 2021

There is an npm module called asar that can extract the contents of the file,

Thank you, the locale is indeed present.

but more importantly can you try starting app in a different supported locale that we know for sure works just fine? I think either german or french would be a good test case, depending on what your current locale is.

Yes, I can start in any language without problem.

@unhammer
Copy link

unhammer commented Nov 20, 2021

The .pak file still needs to be there even if it's Just For Electron. On startup, it first tries looking for nn.pak, then it falls back to nb.pak:

1 export LANG=nn_NO.UTF-8; strace signal-desktop 2>&1|grep -F '.pak'
openat(AT_FDCWD, "/opt/Signal/chrome_100_percent.pak", O_RDONLY) = 63
openat(AT_FDCWD, "/opt/Signal/chrome_200_percent.pak", O_RDONLY) = 64
access("/opt/Signal/locales/nn-NO.pak", F_OK) = -1 ENOENT (No such file or directory)
access("/opt/Signal/locales/nn.pak", F_OK) = -1 ENOENT (No such file or directory)
access("/opt/Signal/locales/nn.pak", F_OK) = -1 ENOENT (No such file or directory)
access("/opt/Signal/locales/nn.pak", F_OK) = -1 ENOENT (No such file or directory)
access("/opt/Signal/locales/nb-NO.pak", F_OK) = -1 ENOENT (No such file or directory)
access("/opt/Signal/locales/nb.pak", F_OK) = 0
openat(AT_FDCWD, "/opt/Signal/locales/nb.pak", O_RDONLY) = 65
openat(AT_FDCWD, "/opt/Signal/resources.pak", O_RDONLY) = 66
access("/opt/Signal/locales/nn-NO.pak", F_OK) = -1 ENOENT (No such file or directory)
access("/opt/Signal/locales/nn.pak", F_OK) = -1 ENOENT (No such file or directory)
access("/opt/Signal/locales/nn.pak", F_OK) = -1 ENOENT (No such file or directory)
access("/opt/Signal/locales/nn.pak", F_OK) = -1 ENOENT (No such file or directory)
access("/opt/Signal/locales/nb-NO.pak", F_OK) = -1 ENOENT (No such file or directory)
access("/opt/Signal/locales/nb.pak", F_OK) = 0

and shows with the nb locale, even though

$ node_modules/.bin/asar list /opt/Signal/resources/app.asar|grep /nn/
/_locales/nn/messages.json

Now if I fake it by

$ sudo ln -s /opt/Signal/locales/nb.pak /opt/Signal/locales/nn.pak

and start signal, I actually get the nn locale! So there just needs to be some pak file even if it's not used. @gpl34 could you also try this hack to verify that you can start in eo by e.g. sudo ln -s /opt/Signal/locales/it.pak /opt/Signal/locales/eo.pak?

@gpl34
Copy link
Author

gpl34 commented Nov 20, 2021

@gpl34 could you also try this hack to verify that you can start in eo by e.g. sudo cp /opt/Signal/locales/it.pak /opt/Signal/locales/eo.pak?

Yes, it's working! Thank you very much.

@indutny-signal
Copy link
Contributor

Yay, great news! You might want to file an issue with Electron and ask them to supply some locale file!

@unhammer
Copy link

:-O it has to be done in Electron? That seems very wrong, that every single electron program has to install every single language on earth just in case one electron-using program wants to localise into some language.

I see it's possible to remove pak's – maybe it's possible to add ones there too?

@gpl34
Copy link
Author

gpl34 commented Nov 28, 2021

Yay, great news!

Yes!

You might want to file an issue with Electron and ask them to supply some locale file!

This is not possible. Electron is not going to add every language needed by every project everywhere.

In the Electron shipped with Signal, there are 53 languages.
In the asar file of Signal, there are 66 languages.

So, today, 13 languages shipped with Signal are inaccessible to users of Signal.

So, either Signal can add .pak files to Electron, or Signal must ignore .pak files from Electron and use its own l18n files (I don't know if the second alternative is possible: I do not use Electron).

@unhammer
Copy link

I think a simple "fallback to English" by copying the en.pak to those 13 language codes would be a great first step.

@unhammer
Copy link

unhammer commented Dec 3, 2021

@gpl34 after upgrading, signal wouldn't start until I removed the fake nn.pak – presumably outdated .pak's crash Electron. So you might want to remove your fake eo.pak too until this has a real fix (or instead do sudo ln -s /opt/Signal/locales/en.pak /opt/Signal/locales/eo.pak which probably has a higher chance of working across upgrades)

@indutny-signal
Copy link
Contributor

I believe this should be fixed by 65e107f . Could you give a try to the latest beta, please?

@gpl34
Copy link
Author

gpl34 commented Feb 16, 2022

Could you give a try to the latest beta, please?

It works. Thank you very much.

@sypianski
Copy link

Saluton! Esperanto is still missing from Signal on my phone (Signal 6.18.4, Android). Can I install it somehow?

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

No branches or pull requests

7 participants
@unhammer @gpl34 @sypianski @scottnonnenberg-signal @automated-signal @indutny-signal and others