Closed Bug 27805 Opened 25 years ago Closed 23 years ago

ChatZilla needs i18n

Categories

(Other Applications :: ChatZilla, defect, P3)

x86
Other
defect

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.0

People

(Reporter: kairo, Assigned: chiaki)

References

Details

Attachments

(22 files)

8.78 KB, patch
Details | Diff | Splinter Review
1.94 KB, patch
Details | Diff | Splinter Review
1.04 KB, patch
Details | Diff | Splinter Review
3.44 KB, patch
Details | Diff | Splinter Review
1.21 KB, patch
Details | Diff | Splinter Review
3.92 KB, patch
Details | Diff | Splinter Review
883 bytes, patch
Details | Diff | Splinter Review
3.96 KB, patch
Details | Diff | Splinter Review
15.07 KB, patch
Details | Diff | Splinter Review
47.15 KB, patch
Details | Diff | Splinter Review
13.39 KB, patch
Details | Diff | Splinter Review
16.49 KB, patch
Details | Diff | Splinter Review
816 bytes, patch
Details | Diff | Splinter Review
3.40 KB, patch
Details | Diff | Splinter Review
15.03 KB, patch
Details | Diff | Splinter Review
44.48 KB, patch
Details | Diff | Splinter Review
8.71 KB, patch
Details | Diff | Splinter Review
15.02 KB, patch
Details | Diff | Splinter Review
73.14 KB, patch
Details | Diff | Splinter Review
14.72 KB, text/plain
Details
81.18 KB, patch
Details | Diff | Splinter Review
15.17 KB, text/plain
Details
In M13 and still in build 2000-02-14-16, ChatZilla strings are hardcoded, there
is no locale folder for this component.
All of Mozilla, even ChatZilla, needs internationalisation, the number of l10n
contributors (and languages) grows almost daily!
Status: NEW → ASSIGNED
I've attached two files (easy to be seen :-> ):
the diff is to be applied to chatzilla.xul, the new chatzilla.dtd file goes into 
chatzilla/locale.
That's not the final fix for this bug, bug a first step. It's all I can do to 
the xul. Everything else is in js.
Perhaps we should call default values for status labels from the XUL via DOM, so 
that they have to be in only one locale file?
Blocks: 41564
mass marking chatzilla bugs future
Target Milestone: --- → Future
Depends on: 54712
*MASS SPAM*

Changing QA contact on all open or unverified ChatZilla bugs to me, David
Krause, as I am now the QA contact for this component.
QA Contact: rginda → David
I want to try this bug.
Please assgine to me.
Have fun.  Please ask me for an r= when you're done. Patches should be 
output from cvs diff -u.
Assignee: rginda → chiaki
Status: ASSIGNED → NEW
I think there are two steps to fix.

step1,
Taking out the hardcorded message in chatzilla.xul to chatzilla.dtd.

Step2,
Taking out the hardcorded message in JavaScript to the properties file.

Step1 is finished today.
I attached 2 files.(diff -u)
Status: NEW → ASSIGNED
I should have mentioned this before.  We probably want to wait until bug 57633
is checked in, so that we don't have merge problems.  Chiaki, maybe you could
take a look at the changes to these files in bug 57633 and make your patches
according to those changes.  Thanks.
In fact, 57633 has to be in before this one can really get fixed, I think.
Adding dependency.
Depends on: 57633
I see.
I saw the bug 57633 and its attachments, and understaned to need change my patches.
So I wait the bug 57633 is checked in, and  remake the patches on it.
Please let me know when bug 57633 is checked in.
Chiaki, bug 57633 has been checked in.
Thank you for your message.
I am going to make a patch to merge bug #57633.
Step1 is finished today again.
I attached 2 files.(diff -u, based on the fix of bug 57633)
Looks good, works for me on linux.  You even fixed the things that are commented
out, neat!  r=rginda
This has been sitting around for a few months now and it would be nice if we
could get an sr= and get this checked in, before there are are any major changes
to chatzilla and we dont end up with potential merge problems again.
Chiaki-san is trying to fix this for 0.9.
Target Milestone: Future → mozilla0.9
Attached patch Newly created.Splinter Review
Step1 and Step2 are finished.
I attached 6files.

chatzilla.xul, chatzilla.dtd, static.js, handler.js, command.js are changed.
chatzilla.properties is newly created.

please check those files.
\ No newline at end of file

+<script type="text/javascript" src="chrome://global/content/strres.js"/>
please use application/x-javascript.

this looks like a merge conflict, but i could be wrong: 
-<commandset id="tasksCommands">
-  <command id="cmd_close" oncommand="window.close();"/>
-  <command id="cmd_quit"/>
-</commandset>
+<broadcasterset id="broadcasterset">
+  <broadcaster id="cmd_close" oncommand="window.close();"/>
+  <broadcaster id="cmd_quit"/>
+</broadcasterset>

this is not the correct way to i18n, please us %s style. [this is a general 
comment, not just for the following line] -- In general, you should never use + 
to join translatable strings.
+            dd (bundle.GetStringFromName( "onToggleVisibilityMsg" ) + menuId + 
+                bundle.GetStringFromName( "onToggleVisibilityMsg2" ));
> this is not the correct way to i18n, please us %s style. [this is a general 
> comment, not just for the following line] -- In general, you should never use
> + to join translatable strings.

Yes, please use "some text before %s some text afterwards" style. It's also much
easier from the translator's point of view.
We had lots of the style you use in earlier days, and %s style, which widely
used nowadays, is much easier and straight forward to translate. Thanks.

This is great, there is alot of work in this patch, and I'll be psyched to check
it in.  I have to agree on the %s changes.  I'll be cycling around for another
large chatzilla checkin in about month (I hope.)  It'd be great if the patch is
updated by then, if not, I might do it myself.
oh, also, I'm not sure that the dd() messages need to be localized.  They're
debug messages.
Thank you for your comments.

timeless wrote :
>please use application/x-javascript.

Ok. This is used by the following change.

Kaiser wrote :
>please use "some text before %s some text afterwards" style.
Ginda wrote :
>I have to agree on the %s changes. 

I understand. I'll correct those to %s style.

Ginda wrote :
>I'm not sure that the dd() messages need to be localized. 

In the following change, it is made not to change dd.

Its best is done so that I may also finish correction within the next one month.
(I hope it will be in 0.9.1)
Target Milestone: mozilla0.9 → mozilla0.9.1
need to get this in in the next few days if is going to be on the 0.9.1 
train.  is it ready to go?  whats the checkin plan?
even if the updated patch files were ready I wouldn't have the time to merge my
changes in.  moving to moz 1.0.
Target Milestone: mozilla0.9.1 → mozilla1.0
It is in the middle of creation of a patch, and check-in of the next few days 
will be in an impossible state now.
The change to moz 1.0 was understood.
I attached 6files.

chatzilla.xul, chatzilla.dtd, static.js, handler.js are changed.
command.js is the same as that of last time.

chatzilla.properties is re-created.(use %S style.)

please check those files.
looks good.  My only intl concern is that 'comma' isn't intl safe for lists. 
but we can fix that later [I'll file another bug somewhere about it].
fwiw, to make the separator intl safe you need to make it a seperate 
translatable entity <doh>.
Keywords: approval, patch, review
timeless, can you clarify what you mean by "not intl safe to have commas
in lists"?
Do you mean something like "[chan, mode, topic]" in static.js file?;


+  tstring = bundle.formatStringFromName("updateTitleMsg7",[chan, mode, topic],3);

If so, do you plan to file a new bug on that soon?
filed Bugzilla Bug 83699 'comma' isn't intl safe for lists; need to make it a 
seperate translatable entity 
A new bug has been filed for the issue raised by timeless.
We agree that that bug should not hold up this check in.
Appropriate people, please review the 6 patches.
I'm working on getting bug 79311 checked in at the moment, but this bug will be
next on the chatzilla queue!  More news soon.
Blocks: 74443
Blocks: 74589
I've modified this patch slightly, in the following ways...

0. merged with the trunk.
1. removed the bundle = from all .js files except static.js.  Any global
variables are shared by all of the js files in chatzilla, so setting at the top
of every file was redundant.
2. switched from directly accessing stringbundle methods to calling a new
functions (getMsg).  It's easier to type, and takes care of figuring out wether
you need GetStringFromName or formatStringFromName.
3. added fixes for bug 74443 and bug 74589
4. tweaked the add() function in commands.js to make life easier.
5. fixed problems with the ?: operator.  These strings were incorrectly translated.
6. fixed i18n unfriendly usage of arraySpeak()
7. fixed 80-column-rule violations and cleaned up whitespace around parens to
match the rest of the code.  (switched from foo( bar,baz ) to foo(bar, baz)

There are a few messages left in irc.js, but not many.  Getting irc.js i18n
ready will require some infrastructure changes because that file is used by the
irc bot, which runs in various javascript shells, and cannot depend on Mozilla.
 In addition, we still have major bidi problems.  There are many places where
the code concatenates multiple string parts, but this is an excellent start. 
Chiaki, thank you for doing so much.  I'll attach my modified patch for further
review and testing.  Expect another patch with the irc.js changes soon.
Here comes another round of changes, I think this one has everything we need for
i18n, modulo bidi issues.  I factored the hardcoded strings from irc.js out into
handlers.js by firing new events (onStartConnect), and adding an errorCode
property to onError events.  I also added a "debug" property to some events,
which is printed by the event debugger (irc-debug.js.)

Anyone who cares to, please take a look at this batch of changes.  I'd like to
check in by the end of the week, so we can move on to other changes.
I've posted an .xpi with these changes at <www.hacksrus.com/~ginda/chatzilla>,
for anyone who might want an easy way to test.
Checked in!  
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Product: Core → Other Applications
The existence of localized versions for the past several years makes this VERIFIED :)
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: