Last Comment Bug 8188 - Locale fallback for string bundle
: Locale fallback for string bundle
[PDT-] need to embed the locale name ...
Product: Core
Classification: Components
Component: Internationalization (show other bugs)
: Trunk
: All All
P3 normal (vote)
: Future
Assigned To: Simon Montagu :smontagu
: Makoto Kato [:m_kato]
: 8525 (view as bug list)
Depends on:
  Show dependency treegraph
Reported: 1999-06-15 08:16 PDT by Frank Tang
Modified: 2009-08-22 23:49 PDT (History)
4 users (show)
See Also:
Crash Signature:
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Description User image Frank Tang 1999-06-15 08:16:10 PDT
split from bug 8152
Comment 1 User image Frank Tang 1999-06-15 08:23:59 PDT
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..



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.
Comment 2 User image Frank Tang 1999-06-15 08:26:59 PDT
Mark this M8. We should make decision before M8. Take the changes or not ?
Comment 3 User image Erik van der Poel 1999-06-15 10:33:59 PDT
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 User image tao 1999-06-15 16:31:59 PDT
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.
Comment 5 User image tao 1999-06-23 10:25:59 PDT
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 "", and fallback to and
even 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.
Comment 6 User image tao 1999-06-23 17:44:59 PDT
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 under x86rel/res/
        directory. Since there is not such file in that directory, it shall try
        to open Again, this file is not there either,
        it shall try to open 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 to and run
        StringBundleTest again. You shall see the program succeed on the second
    2.5 Rename to and run
        StringBundleTest again. You shall see the program succeed on the first

  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 User image Katsuhiko Momoi 1999-07-12 02:31:59 PDT
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 file.

It would also be a good idea to have several "distinct"
files at the same time to see if a correct one is selected
when there are several files are availble.
Comment 8 User image Katsuhiko Momoi 1999-07-12 03:04:59 PDT
Additional informaiton on: "Stringbu.exe"

1. The Netsacpe-internal 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.
Comment 9 User image Teruko Kobayashi 1999-08-06 16:54:59 PDT
I verified this in 8-06-09 Win32 build.
Comment 10 User image tao 1999-08-06 17:11:59 PDT
Per the discussion and conclusion I posted here:


I am reopening the bug and will embed the locale name in the URL
path instead of filename.
Comment 11 User image tao 1999-08-06 17:12:59 PDT
Clearr the resolution
Comment 12 User image tao 1999-08-19 14:00:59 PDT
*** Bug 8525 has been marked as a duplicate of this bug. ***
Comment 13 User image tao 1999-08-30 13:26:59 PDT
Not show stopper; push to M11.
Comment 14 User image tao 1999-09-21 15:06:59 PDT
Not a show blocker. Push to M12.
Comment 15 User image tao 1999-09-23 09:36:59 PDT
Comment 16 User image tao 1999-11-29 18:43:59 PST
Non blockers; push off to M14.
Comment 17 User image Phil Peterson 2000-02-02 17:37:10 PST
PDT- until we see some connection to the beta spec
Comment 18 User image tao 2000-02-03 20:03:56 PST
There are some performance drag of the current fallback implementation. It 
always look for .../ and .../ first, before
../ which does exist in our build.

I can take out the fallback and look for the ../ first to improve
the performance a bit. This might take care and

I had submitted the patch in bug 26291.
Comment 19 User image tao 2000-02-08 20:35:58 PST
I had checked in the patch to take out the attempts of opening non-existing

I have no plan to address the fallback mechanism now. Push to M18
Comment 20 User image tao 2000-04-18 18:09:02 PDT
This is not an urgent issue in the near future. Mark it remind!
Comment 21 User image tao 2000-09-20 13:29:38 PDT
Comment 22 User image Christopher Hoess (gone) 2003-02-26 20:49:09 PST
REMIND is deprecated per bug 35839.
Comment 23 User image tao 2003-06-13 16:57:34 PDT
Hi, Bob: please reassign these i18n/l10n/l12y bugs accordingly. thx!
Comment 24 User image Vedran Miletic 2003-10-05 07:51:30 PDT
Comment 25 User image Simon Montagu :smontagu 2009-08-22 23:49:48 PDT
I don't think we want to do this.

Note You need to log in before you can comment on or make changes to this bug.