Locale fallback for string bundle

RESOLVED WONTFIX

Status

()

Core
Internationalization
P3
normal
RESOLVED WONTFIX
18 years ago
8 years ago

People

(Reporter: Frank Tang, Assigned: smontagu)

Tracking

Trunk
Future
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [PDT-] need to embed the locale name in the URL path instead of filename, URL)

(Reporter)

Description

18 years ago
split from bug 8152
(Reporter)

Updated

18 years ago
Assignee: ftang → tao
(Reporter)

Comment 1

18 years ago
Enhancement
I also added code that looked for the URL without locale, if the URL+locale
could not be found. I'm not sure if this is wanted or not, but otherwise the
StringBundleTest doesn't do anything, as it can't find the properties file.

I guess another step would be to look for the three files..

eg.

file_en_AU.properties
file_en.properties
file.properties

-dave

see the attachement in 8152

I am not sure that we should take the locale fallback part since it is one of
the major performance problem in JDK. Erik, plesae make decision since you know
better about this.

The problem JDK have is it have 6 level fallback (instead of 3) and it need to
search through (open and decompressed) all the .JAR and . ZIP file for those
property file for every access of property file. And since most of the
application do not ship with the locale one, it always fallback 5 times in non
English locale which suck the performance a lot. However, we are not package
property file into zip or jar file (YET). So, we may have different story here.

Erik , I assume you already hand the string bundle stuff to tao.
Tao, please talk to erik first. Thanks.
(Reporter)

Updated

18 years ago
Target Milestone: M8
(Reporter)

Comment 2

18 years ago
Mark this M8. We should make decision before M8. Take the changes or not ?

Comment 3

18 years ago
Bob and I tentatively set the milestone for this fallback feature to M8. I'm
working on M7 now, so let's discuss this later.

Comment 4

18 years ago
Eventually, we gonna support a mirror JS object of this. The property file
might be local anymore. We shall get net developers and web pages developers
involved. In other words, we need to discuss this in the newsgroup.

Updated

18 years ago
Status: NEW → RESOLVED
Last Resolved: 18 years ago
Resolution: --- → FIXED

Comment 5

18 years ago
I had checked in a patch to fallback to less specific locale name from more
specific one. For example, a user locale such as en-US would make strres look
for a file named "xxx_en_US.properties", and fallback to xxx_en.properties and
even xx.properties when files in the fallback sequence not found.

In the current Seamonkey, the default property file without locale decoration
will be the last resort when the intended target can not be found.

Updated

18 years ago
QA Contact: teruko → tao

Updated

18 years ago
QA Contact: tao → teruko

Comment 6

18 years ago
Steps of testing the fix with StringBundleTest(.exe)

1. StirngBundleTest can be found in x86rel/StringBundleTest.exe in WIN32 build;
   or package/StringBundleTest.
2. On WIN32,

   2.1. open a command prompt window.
   2.2. "cd" to where StringBundleTest resides and run it.
   2.3  The default locale for an English NT system shall be en-US. By default,
        the program will look for strres_en_US.properties under x86rel/res/
        directory. Since there is not such file in that directory, it shall try
        to open strres_en.properties. Again, this file is not there either,
        it shall try to open strres.properties. This time, it shall succeed.

        When the file is found and opened, the program will perform some
        query by id or name and dump the result to the console.

    2.4 Rename strres.properties to strres_en.properties and run
        StringBundleTest again. You shall see the program succeed on the second
        attempt.
    2.5 Rename strres_en.properties to strres_en_US.properties and run
        StringBundleTest again. You shall see the program succeed on the first
        attempt.

  3. You may want to edit strres[_en_US].properties and change some of the text
     entries so you know which file is opened.

  4. Retest the program on Ja system to see how it turns out.

Feel free to let know if you run into any problem.

Comment 7

18 years ago
As I'm writing M8 Intl release notes, I would like to note
the follwing:

The name of the StringBundleTest is "Stringbu.exe" due to
DOS file name truncation and this file can be found in the
same directory where the apprunner is located.
Please also note that this test is probably not available unless
you get the "extratest.exe" file and run it -- in addition to the
basic.zip file.

It would also be a good idea to have several "distinct" stress_LOC.properties
files at the same time to see if a correct one is selected
when there are several stress_LOC.properties files are availble.

Comment 8

18 years ago
Additional informaiton on: "Stringbu.exe"

1. The Netsacpe-internal base.zip file does not contain this item, but
   you can find it in "xtratest.exe".
2. The Mozilla (external) nightly build contains "Stringbu.exe" and
   external people should be able to check this out. The assumption
   is that this test will be included in the upcoming M8 release.

Updated

18 years ago
Status: RESOLVED → VERIFIED

Comment 9

18 years ago
I verified this in 8-06-09 Win32 build.

Updated

18 years ago
Status: VERIFIED → REOPENED
Whiteboard: need to embed the locale name in the URL path instead of filename
Target Milestone: M8 → M10

Comment 10

18 years ago
Per the discussion and conclusion I posted here:

     news://news.mozilla.org/37AA344F.CBBC9D57%40netscape.com

I am reopening the bug and will embed the locale name in the URL
path instead of filename.

Updated

18 years ago
Resolution: FIXED → ---

Comment 11

18 years ago
Clearr the resolution

Updated

18 years ago
Status: REOPENED → ASSIGNED

Comment 12

18 years ago
*** Bug 8525 has been marked as a duplicate of this bug. ***

Comment 13

18 years ago
Not show stopper; push to M11.

Updated

18 years ago
Target Milestone: M10 → M11

Comment 14

18 years ago
Not a show blocker. Push to M12.

Updated

18 years ago
Target Milestone: M11 → M12

Comment 15

18 years ago
Non-stopper->M12.

Updated

18 years ago
Target Milestone: M12 → M14

Comment 16

18 years ago
Non blockers; push off to M14.

Updated

18 years ago
Keywords: beta1

Comment 17

18 years ago
PDT- until we see some connection to the beta spec
Whiteboard: need to embed the locale name in the URL path instead of filename → [PDT-] need to embed the locale name in the URL path instead of filename

Comment 18

18 years ago
There are some performance drag of the current fallback implementation. It 
always look for .../foo_en-US.properties and .../foo_en.properties first, before
../foo.properties which does exist in our build.

I can take out the fallback and look for the ../foo.properties first to improve
the performance a bit. This might take care 
http://bugzilla.mozilla.org/show_bug.cgi?id=25283 and 
http://bugzilla.mozilla.org/show_bug.cgi?id=26291.

I had submitted the patch in bug 26291.

Comment 19

18 years ago
I had checked in the patch to take out the attempts of opening non-existing
files.

I have no plan to address the fallback mechanism now. Push to M18
Target Milestone: M14 → M18

Comment 20

18 years ago
This is not an urgent issue in the near future. Mark it remind!
Status: ASSIGNED → RESOLVED
Last Resolved: 18 years ago18 years ago
Resolution: --- → REMIND

Updated

17 years ago
QA Contact: teruko → ftang

Comment 21

17 years ago
.
Status: RESOLVED → VERIFIED
REMIND is deprecated per bug 35839.
Status: VERIFIED → REOPENED
Resolution: REMIND → ---

Comment 23

14 years ago
Hi, Bob: please reassign these i18n/l10n/l12y bugs accordingly. thx!
Assignee: tao → bobj
Status: REOPENED → NEW

Comment 24

14 years ago
retargeting
Target Milestone: M18 → Future
Assignee: bobj → smontagu
QA Contact: ftang → i18n
(Assignee)

Comment 25

8 years ago
I don't think we want to do this.
Status: NEW → RESOLVED
Last Resolved: 18 years ago8 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.