Language initialisation

The l10n of Pale Moon. Rawr.
User avatar
Kendo
Apollo supporter
Apollo supporter
Posts: 48
Joined: 2020-03-17, 02:27

Language initialisation

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?

User avatar
Kendo
Apollo supporter
Apollo supporter
Posts: 48
Joined: 2020-03-17, 02:27

Re: Language initialisation

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
Board Warrior
Board Warrior
Posts: 1373
Joined: 2018-05-05, 13:29

Re: Language initialisation

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.

User avatar
Kendo
Apollo supporter
Apollo supporter
Posts: 48
Joined: 2020-03-17, 02:27

Re: Language initialisation

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
Board Warrior
Board Warrior
Posts: 1373
Joined: 2018-05-05, 13:29

Re: Language initialisation

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?

User avatar
New Tobin Paradigm
Knows the dark side
Knows the dark side
Posts: 8537
Joined: 2012-10-09, 19:37
Location: Skaro

Re: Language initialisation

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.
return NS_OK;
Image

User avatar
Kendo
Apollo supporter
Apollo supporter
Posts: 48
Joined: 2020-03-17, 02:27

Re: Language initialisation

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.

User avatar
New Tobin Paradigm
Knows the dark side
Knows the dark side
Posts: 8537
Joined: 2012-10-09, 19:37
Location: Skaro

Re: Language initialisation

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
return NS_OK;
Image

User avatar
moonbat
Moon Magic practitioner
Moon Magic practitioner
Posts: 2535
Joined: 2015-12-09, 15:45

Re: Language initialisation

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 20 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
Advanced URL Builder(fork)|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

User avatar
Kendo
Apollo supporter
Apollo supporter
Posts: 48
Joined: 2020-03-17, 02:27

Re: Language initialisation

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.

User avatar
New Tobin Paradigm
Knows the dark side
Knows the dark side
Posts: 8537
Joined: 2012-10-09, 19:37
Location: Skaro

Re: Language initialisation

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

Who is "we" and what is your goal?
return NS_OK;
Image

User avatar
Kendo
Apollo supporter
Apollo supporter
Posts: 48
Joined: 2020-03-17, 02:27

Re: Language initialisation

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: 28798
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: Language initialisation

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.
"Son, in life you do not fight battles because you expect to win, you fight them merely because they need to be fought." -- Snagglepuss
Image

User avatar
Kendo
Apollo supporter
Apollo supporter
Posts: 48
Joined: 2020-03-17, 02:27

Re: Language initialisation

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: 28798
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: Language initialisation

Post by Moonchild » 2021-01-08, 09:27

Of course it hasn't.
But without telling us more, we can't help.
"Son, in life you do not fight battles because you expect to win, you fight them merely because they need to be fought." -- Snagglepuss
Image

User avatar
Kendo
Apollo supporter
Apollo supporter
Posts: 48
Joined: 2020-03-17, 02:27

Re: Language initialisation

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?

User avatar
New Tobin Paradigm
Knows the dark side
Knows the dark side
Posts: 8537
Joined: 2012-10-09, 19:37
Location: Skaro

Re: Language initialisation

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

There is no mode of operation that describes what you are asking.
return NS_OK;
Image

User avatar
Moonchild
Pale Moon guru
Pale Moon guru
Posts: 28798
Joined: 2011-08-28, 17:27
Location: Tranås, SE
Contact:

Re: Language initialisation

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.
"Son, in life you do not fight battles because you expect to win, you fight them merely because they need to be fought." -- Snagglepuss
Image

User avatar
New Tobin Paradigm
Knows the dark side
Knows the dark side
Posts: 8537
Joined: 2012-10-09, 19:37
Location: Skaro

Re: Language initialisation

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.
return NS_OK;
Image

User avatar
moonbat
Moon Magic practitioner
Moon Magic practitioner
Posts: 2535
Joined: 2015-12-09, 15:45

Re: Language initialisation

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 20 Xfce x64 on HP i5-5200 laptop, 12 GB RAM.
Advanced URL Builder(fork)|PermissionsPlus|PMPlayer|Pure URL|RecordRewind|TextFX

Post Reply