Language initialisation

The l10n of Pale Moon. Rawr.
Kendo
Banned user
Banned user
Posts: 83
Joined: 2020-03-17, 02:27

Language initialisation

Unread post by Kendo » 2021-01-05, 05:08

I am wondering what PM is looking for when it starts? For example, if I edit pref.js to change the language setting, when PM starts it is defaulting to en-US and removing that new language line. I assume that it is initially looking for something in particular, and after not finding it, reverts to en-US.

pref("general.useragent.locale", "ja");

However it only fails with the latest language (ja) that I have added. Changing to any of the other installed languages works ok.

I have WinMerge compared the JA resources with all of the other language resources and cannot find anything missing or out of place.

So the questions is: what is PM looking for at startup that it cannot find?

Kendo
Banned user
Banned user
Posts: 83
Joined: 2020-03-17, 02:27

Re: Language initialisation

Unread post by Kendo » 2021-01-07, 20:00

I have checked the code over and over and over. Now wondering if I can create a build that logs startup to be able to find what the browser cannot find that makes it default to english.

Tried running the browser from a console using the -safe-mode switch and got the window for safe-mode options which was in Japanese. But even in safe-mode it crashes and restarts in english. So at least I discovered that it is crashing, then changing prefs.js and then restarting, and that may be why running from the console with the -console switch shows no records... closes with the crash and restarts on its own.

Any suggestions?

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2181
Joined: 2018-05-05, 13:29

Re: Language initialisation

Unread post by vannilla » 2021-01-07, 21:14

Actually I'm not too sure what you are trying to do...
Are you trying to get the UI in japanese? You need a language pack for that: https://addons.palemoon.org/language-packs/
Apparently japanese isn't there, but you can help out.

Kendo
Banned user
Banned user
Posts: 83
Joined: 2020-03-17, 02:27

Re: Language initialisation

Unread post by Kendo » 2021-01-07, 22:35

Language packs are not applicable. The language files, which are quite small, are included in the browser so that they can be selected on install. I had no problems before with many languages, that is, until I added this new one which is causing crash/language flush/restart as described earlier.

So the question remains: what could the browser be checking at startup or failing to load?

There must be language check for it to shutdown, reset prefs.js to default (en) and then restart. Which script could be doing that?

vannilla
Moon Magic practitioner
Moon Magic practitioner
Posts: 2181
Joined: 2018-05-05, 13:29

Re: Language initialisation

Unread post by vannilla » 2021-01-07, 23:12

I still don't understand what you are trying to do.
Is it about the UI, or something else?
Why aren't language packs not appliable?

New Tobin Paradigm

Re: Language initialisation

Unread post by New Tobin Paradigm » 2021-01-08, 04:22

He doesn't know what he is talking about. Perhaps he assumes we do localized builds like Mozilla does. We don't and never have.. Expecting us to do 20-140 localized builds every release is insane to expect from a project without millions of Google Dollars to burn especially since our fantastic capacity for add-ons already contains the capability of Language Packs.

Remember, locales came first as add-ons long before Mozilla's inflated buget needed to be justified in assembly line build compilation every four weeks.

So to the OP get a clue or get lost. What you are saying ranges from not applicable to not intelligible.

Kendo
Banned user
Banned user
Posts: 83
Joined: 2020-03-17, 02:27

Re: Language initialisation

Unread post by Kendo » 2021-01-08, 06:04

Language packs may suit your game plan, but we need to enable the user to select their language on first start. Not everyone can read English.

As for practicality, we have been running the one browser with 20+ languages for some time and the only issue has been with the recent addition of Japanese. No problem with Chinese, Korean, Russian or any other language that requires Unicode pages.

My question was about the browser start sequence and what it is checking to decide to crash and restart with English as a default? But if you don't know, there is no need to haze the question.

New Tobin Paradigm

Re: Language initialisation

Unread post by New Tobin Paradigm » 2021-01-08, 06:24

Pale Moon is an en-US product. There is no way for a user to switch to a language that hasn't been installed as a Language Pack. We aren't going to change that or bundle them all with the browser as it is thousands and thousands of strings times the number of locales. Tons of bloat for everyone. We have Language Packs, use them.

RESOLVED WONTFIX

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: Language initialisation

Unread post by moonbat » 2021-01-08, 06:58

See this thread about deploying a customized installation of Pale Moon using techniques carried over from Firefox 24 and earlier (Moonchild talks about this further down in the replies). Maybe you can create a bundle for each separate language with a pre-installed language pack.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

Kendo
Banned user
Banned user
Posts: 83
Joined: 2020-03-17, 02:27

Re: Language initialisation

Unread post by Kendo » 2021-01-08, 07:04

New Tobin Paradigm wrote:
2021-01-08, 06:24
There is no way for a user to switch to a language that hasn't been installed as a Language Pack.
But there is and we have been using it for a few years now. The sum of 20+ languages is actually not much at all.

But don't worry, I will eventually find the solution to the problem of this additional language.

New Tobin Paradigm

Re: Language initialisation

Unread post by New Tobin Paradigm » 2021-01-08, 08:50

Who is "we" and what is your goal?

Kendo
Banned user
Banned user
Posts: 83
Joined: 2020-03-17, 02:27

Re: Language initialisation

Unread post by Kendo » 2021-01-08, 09:01

New Tobin Paradigm wrote:
2021-01-08, 08:50
Who is "we" and what is your goal?
How is that relevant? So far I heave received responses from members who seemingly cannot read english. I can only repeat the quest so many times before...

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35404
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Language initialisation

Unread post by Moonchild » 2021-01-08, 09:08

New Tobin Paradigm wrote:
2021-01-08, 08:50
Who is "we" and what is your goal?
Kendo wrote:
2021-01-08, 09:01
How is that relevant?
It's relevant in several ways, not in the least redist licensing of the browser.
However, without telling us what exactly you are doing and how you are packaging the languages with the browser, there's no way to tell what might be your issue.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Kendo
Banned user
Banned user
Posts: 83
Joined: 2020-03-17, 02:27

Re: Language initialisation

Unread post by Kendo » 2021-01-08, 09:17

Moonchild wrote:
2021-01-08, 09:08
However, without telling us what exactly you are doing and how you are packaging the languages with the browser, there's no way to tell what might be your issue.
The original question has not not changed.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35404
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Language initialisation

Unread post by Moonchild » 2021-01-08, 09:27

Of course it hasn't.
But without telling us more, we can't help.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

Kendo
Banned user
Banned user
Posts: 83
Joined: 2020-03-17, 02:27

Re: Language initialisation

Unread post by Kendo » 2021-01-08, 09:39

Moonchild wrote:
2021-01-08, 09:27
But without telling us more, we can't help.
When the browser starts, what does it check that causers it to restart after making changes to prefs.js to default en-US?

New Tobin Paradigm

Re: Language initialisation

Unread post by New Tobin Paradigm » 2021-01-08, 10:05

There is no mode of operation that describes what you are asking.

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 35404
Joined: 2011-08-28, 17:27
Location: Motala, SE
Contact:

Re: Language initialisation

Unread post by Moonchild » 2021-01-08, 10:21

Without more information I can only -guess- that they are running into the safeguard we put in place to make sure that incompatible/broken language packs don't leave the user with an unusable browser (i.e. when the browser cannot initialize its main window). It will reset the locale to a known-good state in that case. That is by design and entirely to make sure the user isn't left with something completely broken. That does mean however that your "ja" language is broken and can't be used.
"Sometimes, the best way to get what you want is to be a good person." -- Louis Rossmann
"Seek wisdom, not knowledge. Knowledge is of the past; wisdom is of the future." -- Native American proverb
"Linux makes everything difficult." -- Lyceus Anubite

New Tobin Paradigm

Re: Language initialisation

Unread post by New Tobin Paradigm » 2021-01-08, 11:07

Could be that but if it is it was very poorly explained by them. Whomever they actually ARE.

User avatar
moonbat
Knows the dark side
Knows the dark side
Posts: 4942
Joined: 2015-12-09, 15:45
Contact:

Re: Language initialisation

Unread post by moonbat » 2021-01-08, 11:59

Kendo wrote:
2021-01-08, 09:39
When the browser starts, what does it check that causers it to restart after making changes to prefs.js to default en-US?
Wrong response. Start with telling us what exactly you're trying to accomplish and then you'll get to know whether this approach is even the right one.
"One hosts to look them up, one DNS to find them and in the darkness BIND them."

Image
Linux Mint 21 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
AutoPageColor|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

Locked