After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 130998 - add gok translator comments to XML files
add gok translator comments to XML files
Status: RESOLVED FIXED
Product: gok
Classification: Deprecated
Component: general
unspecified
Other All
: High minor
: ---
Assigned To: David Bolter
David Bolter
AP3
Depends on: 131505 143581
Blocks:
 
 
Reported: 2004-01-09 10:57 UTC by bill.haneman
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
diff for discussion (2.22 KB, patch)
2004-06-07 17:28 UTC, David Bolter
none Details | Review
patched kbd.in files and the translator readme. (14.93 KB, patch)
2004-08-31 18:00 UTC, David Bolter
none Details | Review
this patch does not break code freeze. (14.09 KB, patch)
2004-08-31 18:36 UTC, David Bolter
committed Details | Review
this is a longer term fix for mouse.kbd.in post 2.8.0 code freeze (3.01 KB, patch)
2004-08-31 18:40 UTC, David Bolter
none Details | Review

Description bill.haneman 2004-01-09 10:57:11 UTC
Problem is that translator comments (as it turns out) must be one the
*physical line* immediately preceding the "_()" macro in C source, not the
"logical" C line.  So gok needs a good scraping through, searching for
instances of _() where the translator comment is either absent or misplaced.

Also we need translator comments for some XML strings, but that's another
issue... may not be a way to do this yet.  We could hack around the problem
with a dummy ".h" file that's in POTFILES.in but not a dependency of the
sources, etc. but that's very ugly.  However if we have really difficult
strings (like the "N" and "E" strings in move-resize.kbd, which are
locale-appropriate abbreviations for 'North', 'East', etc.) then this hack
may be worth doing anyway because otherwise translators will really get
frustrated with these sorts of GOK strings in the ".kbd" files.
Comment 1 bill.haneman 2004-01-09 10:58:41 UTC
in particular, we urgently need to fix the multiline translator
comments for gok_keyboard.c's alphabetic and frequency keyboards, by
interleaving them in the C call (or making the C call a single line).
 Both are ugly, but there you have it.
Comment 2 David Bolter 2004-01-09 13:21:54 UTC
I understand the interleaving but not the single line fix.  I am fine
with this quick fix because of the urgency.  It would be nice to a fix
to a logical (vs physical) parse.

Feel free to modify and commit this change.  Or let me know and I can
do it.
Comment 3 bill.haneman 2004-01-15 01:39:41 UTC
I've fixed the offending comments in gok-keyboard.c
We should have a look at the output of gok.pot at some point to see if
any of the C-source strings need to be commented.

Of course doing it in interface.c would be a problem since it's
generated code.  Ugh, we really need to change that.
Comment 4 bill.haneman 2004-01-15 17:44:42 UTC
David could you please have a look at the remaining translator strings?

thanks.
Comment 5 David Bolter 2004-01-22 22:13:11 UTC
Investigating this, I notice lines in gok_page_accessmethod.c like:
pWidget = gtk_frame_new (_(pControl->String));

Yoikes, surely that is not good?  I'll proceed to fix, unless I hear
complaints here...
Comment 6 bill.haneman 2004-01-23 10:07:04 UTC
well it's _possible_ that such code is OK, so please post
patches/discussion before tacking that specific issue.
Comment 7 bill.haneman 2004-01-28 13:13:20 UTC
changing summary since I think the existing comments are getting
picked up.
Comment 8 bill.haneman 2004-03-07 14:50:42 UTC
I think what we need now is a way to provide translator comments for
libglade and *.xml.in/*.kbd.in files.
Comment 9 bill.haneman 2004-05-12 20:50:09 UTC
I think our translator comments are currently pretty good except for the XML
files.  Now that intltool supports XML translator comments, we can start putting
them into the .kbd.in and .xam.in files.
Comment 10 bill.haneman 2004-06-01 13:15:01 UTC
bumping up priority as string freeze is approaches for some internal releases.
Comment 11 David Bolter 2004-06-01 13:52:01 UTC
Bill, I'm happy to slog through this.  Can you give me details or an example
"XML translator comment" just to be sure I'm on the same page?
Comment 12 bill.haneman 2004-06-01 17:54:08 UTC
sadly, I can't give an example offhand.  Perhaps googling around, or checking
the ChangeLog for intltool will help?
Comment 13 David Bolter 2004-06-01 19:22:52 UTC
Just added a dependency for reference.
Comment 14 David Bolter 2004-06-02 14:18:48 UTC
I'm looking after this one.
Comment 15 David Bolter 2004-06-02 14:48:50 UTC
Note to self: README-TRANSLATORS will need to be updated.
Comment 16 bill.haneman 2004-06-02 14:57:28 UTC
Thanks David.

Just as an aside: in particular, translator notes are required for strings that
are and/or need to be short, abbreviations, odd strings out of context, etc. 
IOW anything that's not readily translatable out of context.  IN particular,
short strings are a problem, xlator comments often are needed to indicate the
context, whether the word is noun or verb, etc. etc.

The .kbd.in files are a serious translation nightmare, so almost every
translatable element should have a comment giving context.  Probably in most
cases we'll need to say something like "a short string blah blah blah" too, or
else we'll get strings too long to put on the GOK keys.

Comment 17 David Bolter 2004-06-02 16:13:59 UTC
Yeah, I'm on the same page.
Comment 18 David Bolter 2004-06-07 17:28:23 UTC
Created attachment 28436 [details] [review]
diff for discussion

Bill, do you remember our plans for alphabet.xml.in?  (I borrowed your
translator comments from gok-keyboard.c)

Do we want to deprecate gok_keyboard_add_keys_from_charstrings and start using
the xml file?
Comment 19 bill.haneman 2004-06-07 22:48:00 UTC
David: the strings are newer than the XML file.  I believe we came to the
conclusion that the add_keys_from_charstrings method was easier to translate (in
most locales anyway).
Comment 20 David Bolter 2004-08-31 18:00:14 UTC
Created attachment 31147 [details] [review]
patched kbd.in files and the translator readme.

I'm not sure of my wording for the translator comments and so this will need
review I am sure.  Also, this patch as is, breaks code freeze in mouse.kbd.in
because i adopted some images in place of the directional key labels.  I think
this is a better solution that asking translators to deal with NW N NE W E SW S
SE directions...
Comment 21 bill.haneman 2004-08-31 18:21:36 UTC
David: I think we need to split this into two patches then, one of which can be
applied now, and the other of which will require more negotiation with the
release team.
Comment 22 David Bolter 2004-08-31 18:31:43 UTC
Makes sense, I'll whip together a version of mouse.kbd.in that only adds comments.
Comment 23 David Bolter 2004-08-31 18:36:42 UTC
Created attachment 31151 [details] [review]
this patch does not break code freeze.
Comment 24 David Bolter 2004-08-31 18:40:38 UTC
Created attachment 31152 [details] [review]
this is a longer term fix for mouse.kbd.in post 2.8.0 code freeze
Comment 25 bill.haneman 2004-09-01 11:22:14 UTC
David - I like the "no freeze breakage" patch.  I'd use 'abbreviation' in a
couple of places instead of "short label", i.e. "ins" and other Gok labels which
aren't complete words.  Would you commit, with that minor tweak?
Comment 26 bill.haneman 2004-09-01 11:23:34 UTC
BTW David, - after that commit, perhaps we should open a new bug RFE - "gok to
use images rather than labels for movement keys", and leave that one open till
post-2.8; we can then close this bug.
Comment 27 David Bolter 2004-09-01 14:07:17 UTC
Comment on attachment 31151 [details] [review]
this patch does not break code freeze.

Committed with Bill's suggested edits.	So not exactly as shown.
Comment 28 David Bolter 2004-09-01 14:07:55 UTC
Comment on attachment 31152 [details] [review]
this is a longer term fix for mouse.kbd.in post 2.8.0 code freeze

duplicated in new bug 151606
Comment 29 David Bolter 2004-09-01 14:08:35 UTC
Bill, done, and done!  :-)