[Bug-XBoard] [bug #34972] Several issues regarding lokalization

2012-09-29 Thread Arun Persaud
Update of bug #34972 (project xboard):

  Status: In Progress = Fixed  
 Open/Closed:Open = Closed 


___

Reply to this item at:

  http://savannah.gnu.org/bugs/?34972

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
Bug-XBoard mailing list
Bug-XBoard@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-xboard


Re: [Bug-XBoard] [bug #34972] Several issues regarding lokalization

2011-12-04 Thread Byrial Jensen

On 03-12-2011 19:02, h.g.mul...@hccnet.nl wrote:

BTW, WinBoard did also not have a Danish translation yet. So if you have a
taste for it now, there is no need to stop, as the winboard/language.txt
template file of the source distro is still ready and waiting to be
converted to a winboard/language/dansk.lng. ;-)

Anyway, thanks for the good work and the feedback!

H.G.


Well, if you are able to use or convert the po-file, you are welcome. If 
would be difficult for me to make a winboard file, as I don't use 
MSWindows, and thus cannot even test if I messed up the file by some 
accident.


And if I should make a translation for Winboard, I wouldn't even know 
what charset to use. UTF-8 or ISO-8859-1 or some non-standard MS charset 
which I don't know?


I think a much more sound approach would be to also make Winboard use 
gettext. The po file format is much easier to work with for a translator 
as we can use special po file editor programs that make sure that only 
the translation and translation comments can edited, while the original 
text and the file structure cannot be accidentially damaged. These 
programs normally also have translation memory used to propose 
translations based on similar texts in the same or other po files, good 
search and replace functions etc.


- Byrial

___
Bug-XBoard mailing list
Bug-XBoard@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-xboard


[Bug-XBoard] [bug #34972] Several issues regarding lokalization

2011-12-03 Thread Byrial Jensen
Follow-up Comment #3, bug #34972 (project xboard):

Thanks, that was fast.

PGN files should not be changed. The PGN specification does not allow for
that, and it would not be portable.

But I think the move notation should be changed in the Move list window and
other places where a move is shown to the user. And it should also be changed
for typing in the Type a move window.

___

Reply to this item at:

  http://savannah.gnu.org/bugs/?34972

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
Bug-XBoard mailing list
Bug-XBoard@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-xboard


Re: [Bug-XBoard] [bug #34972] Several issues regarding lokalization

2011-12-03 Thread h.g. muller

Some quick remarks:

At 23:09 2-12-2011 +, Byrial Jensen wrote:

1) My testing shows several untranslatable strings:

Unrecognized argument
shuffle (in File  New Shuffle Game)
randomize (in File  New Shuffle Game)
pick fixed (in File  New Shuffle Game)


I think in 4.6 this dialog is now done by the generic popup, so this 
probably means
we forgot to put the N_() macro around the strings in the defiing table 
(shuffleOptions ?)



Browse (title for File  Load/Save Game/Position)
Filter on extensions: (in File  Load/Save Game/Position)
OK (in File  Load/Save Game/Position)
Cancel (in File  Load/Save Game/Position)


The above are all in the Ghostview file browser, which might not have been 
gettextized yet



save changes (in Edit Tags + Comment)
clear (in Edit Comment)
Polyglot book not valid
Engine (in Engine Output)
Game-list options (window title)
Hidden tags (in Game-list options)


The latter is one of the entries in the listbox. In general these must not 
be translated,
because they are names of tags in the PGN standard. But this one could be 
an exception.
we must make sure that it would still be recognized as the separator on 
reading it back

from the listbox to create the tag-order string, though.


Stalemate (one of multiple game results)
Black mates (one more of multiple game results)
Xboard adjudication: Something (multiple strings)


Some of these strings might come from the engine or a PGN file.
The 'XBoard' adjudication' strings are tricky. They are used both for printing
in the messge field above the board, as well as for writing into the PGN file.
I discussed this on TalkChess, and the conclusion was that it is undesirable
to have the messages translated in PGN, as this is supposed to be a format
for interchanging files, and the one who cretes it will not always use the same
laguage as the one who reads it.

There is no harm in translating the strings just before they are printed in 
the message
field. (This is whatWinBoard currently does.) But when the original 
result-details string

comes from a PGN file made by an appliation other than XBoard, or directly from
the engine, there is no limit to the variation such messages can take.


Everything in Engine #1/#2 Settings (Seems unfinished with dummy examples)


The options shown in the Engine Settigs dialogs are defined by the engine
To get them translated you would have to use a translated version of the 
engine.

Nothing XBoard can do about that; there are may hundreds of engines,
and new ones emerge every day, and there is no way to predict what option
names they wil try to display in the settings dialogs.


Tourney participants (in Match Options)
Everything in About Xboard window


I figured that for legal reasons copyright notices should better not be 
translated



Direct command
Send to chess program:
P (pause button in board window)
%s vs. %s (board title when playing)
Game list not loaded or empty
first (engineNames value)
second (engineNames value)

There may be more untranslatable strings. The strings above is just what I
found in a test run.

2) The browse buttons in all windows are not resized to be able hold the
translated text for the word browse.


They are all generated by the generic popup, which gives them a pre-defined 
width.
I subtract that width from the preceeding text widget to get good alignment 
at the right margin.
Xaw does not seem to support automatic sizing of the widget to align both 
margins;
the only way I could get a non-ragged right margin is specify the size of 
every element.
This makes it difficult to adapt the size of the browse buttons to the text 
they contain.
It seems to need a two-step process, where we first realize the widget with 
a ragged right
margin, but auto-sized browse buttons, and then adjust the width of the 
preceeding text
widgets accordingly. This might ot be too difficult, though, as I seem to 
recall I do a second
pass anyway for adjusting the width of the preceeding text labels to that 
of the longest.
Presumably I could read otthe width of an auto-sized browse button before 
that, and

then also adjustthe width of the text widgets acordingly in that second pass.



3) Move notation is not translatable. The letter used for pieces in algebraic
notation depends on the language.


It would require major changes in XBoard to do anything about that. Moves 
are not
only used for display, but also saved on PGN, communicated with engines, 
and with ICS.
I think using other move notation in PGN is acceptable, but require an 
extra tag redefining
the notation, which is currently not implemented. But engines and ICS would 
not accept

foreign notation (for promotion piece or FEN).
  XBoard already has a -pieceToCharTable option which can be used to set 
other piece IDs,
which could be used to read foreign PGN in game viewer mode, but these IDs 
are then used
globally throughout XBoard, which would break it for using engines or ICS. 
To avoid that,
XBoard would have to be re-written 

Re: [Bug-XBoard] [bug #34972] Several issues regarding lokalization

2011-12-03 Thread h.g. muller

At 11:00 3-12-2011 +, Byrial Jensen wrote:

Follow-up Comment #3, bug #34972 (project xboard):

Thanks, that was fast.

PGN files should not be changed. The PGN specification does not allow for
that, and it would not be portable.

But I think the move notation should be changed in the Move list window and
other places where a move is shown to the user. And it should also be changed
for typing in the Type a move window.


I agree. But this is something that transcends the normal localization by 
string translation by far,
and would require the XBoard routines for parsing and generating moves to 
use different

pieceToCharTables depending on the source and intended destination of the move.
Even the -pieceNickNames option is now applied globally to all input moves.
This means you can only use it to define nick names that do not collide 
with existing

names fromother sources. So it would be OK to define B and N as nicknames for
E and H in Xiangqi. But defining Dutch names OPLTD.opltd. with it would 
make any P
be interpreted as Knight rather than Pawn, interfering with reading FENs 
from PGN.


It is a hard problem, because changing variant has to redefine the 
pieceToCharTable anyway,
so to make it work would require XBoard to have a national version of the 
pieceToCharTable

for every variant, to be used as a default there.

I don't expect this could be fixed on ay short term, mainly for lack of 
ideas how it should be done.


___
Bug-XBoard mailing list
Bug-XBoard@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-xboard


[Bug-XBoard] [bug #34972] Several issues regarding lokalization

2011-12-03 Thread Byrial Jensen
Follow-up Comment #4, bug #34972 (project xboard):

Just tried the new git version. Remember to update po/POTFILES.in with all
source files which strings marked for translation.

___

Reply to this item at:

  http://savannah.gnu.org/bugs/?34972

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
Bug-XBoard mailing list
Bug-XBoard@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-xboard


[Bug-XBoard] [bug #34972] Several issues regarding lokalization

2011-12-03 Thread Arun Persaud
Follow-up Comment #5, bug #34972 (project xboard):

done... I also did a new developer release and emailed a new pot-file to the
translation project.

___

Reply to this item at:

  http://savannah.gnu.org/bugs/?34972

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
Bug-XBoard mailing list
Bug-XBoard@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-xboard


Re: [Bug-XBoard] [bug #34972] Several issues regarding lokalization

2011-12-03 Thread h . g . muller
BTW, WinBoard did also not have a Danish translation yet. So if you have a
taste for it now, there is no need to stop, as the winboard/language.txt
template file of the source distro is still ready and waiting to be
converted to a winboard/language/dansk.lng. ;-)

Anyway, thanks for the good work and the feedback!

H.G.


___
Bug-XBoard mailing list
Bug-XBoard@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-xboard


Re: [Bug-XBoard] [bug #34972] Several issues regarding lokalization

2011-12-03 Thread h.g. muller

At 20:38 3-12-2011 +0100, Byrial Jensen wrote:

Well, if you are able to use or convert the po-file, you are welcome. If 
would be difficult for me to make a winboard file, as I don't use 
MSWindows, and thus cannot even test if I messed up the file by some accident.


Unfortunately I have only a WinBoard .lng fileto .po coverter,and not the 
other way around. The conversion is non-trivial, because may of the English 
strings are ust a bit different (e.g. menu keys separated from item text by 
tabs, in stead of spaces).


And if I should make a translation for Winboard, I wouldn't even know what 
charset to use. UTF-8 or ISO-8859-1 or some non-standard MS charset which 
I don't know?


That is not very critical, as there are converters for that. That is also 
how I do the conversion .lng to .po: use an ed script to change the format 
without altering the translated strings, and then run the converter on the 
.pofiletomake it UTF-8. I don't know what a Danish Windows would use as 
charset, but I would guess it is Latin-1 (like all of Western Europe)


I think a much more sound approach would be to also make Winboard use 
gettext.


Unfortunately gettext does not work at all on WinBoard, because all menu 
and dialog texts are not in the C code, but in a Windows 'resource' file, 
which has to be compiled by the resource compiler, which does not 
understand gettext stuff. But the WinBoard system is not bad at all. You 
cannot damage anything, because the translation is just a data file, loaded 
by WinBoard when you select the language. So you can change language during 
the session, by simply picking another language from the menu. You don't 
even have to recompile for adding a new laguage. Just put the .lng file in 
the directory, and the next session the laguage will appear in the menu.


H.G.

The po file format is much easier to work with for a translator as we can 
use special po file editor programs that make sure that only the 
translation and translation comments can edited, while the original text 
and the file structure cannot be accidentially damaged. These programs 
normally also have translation memory used to propose translations based 
on similar texts in the same or other po files, good search and replace 
functions etc.


- Byrial



___
Bug-XBoard mailing list
Bug-XBoard@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-xboard


[Bug-XBoard] [bug #34972] Several issues regarding lokalization

2011-12-02 Thread Arun Persaud
Update of bug #34972 (project xboard):

Category:None = XBoard (X11)   
  Status:None = Confirmed  
 Assigned to:None = apersaud   

___

Follow-up Comment #1:

Getting the translation to work is a recent effort and there are probably
quite a few things that are wrong in the code, so thanks for reporting these.
I'll try to fix the reported issues this weekend and will send an updated pot
file to the translation project.

___

Reply to this item at:

  http://savannah.gnu.org/bugs/?34972

___
  Message sent via/by Savannah
  http://savannah.gnu.org/


___
Bug-XBoard mailing list
Bug-XBoard@gnu.org
https://lists.gnu.org/mailman/listinfo/bug-xboard