Problem to run XBoard with Mac command line

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: Problem to run XBoard with Mac command line

Post by JoshPettus »

Yeah that's just for the OSX xboard menu. The gettext .po file has some 720 odd strings. But you have to go through the translation project. I took a look. The translation project's vi project is in some real dire need of love... The one you sent him may have been for winboard? I fear it's a different format.

It's considered bad practice to run apps in the dmg file, but that isn't a reason for bonanza to not work. Hmm wonder why. It can't write files in a dmg file, but that shouldn't be an issue...
User avatar
hgm
Posts: 27787
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Problem to run XBoard with Mac command line

Post by hgm »

phhnguyen wrote:BTW, the Vietnamese content seems be missing a lot. Give me the latest content file (for Internationalisation) I will fix it.
A note on translation:

XBoard and WinBoard have completely different systems for translation. XBoard uses the (GNU-standard) gettext system, with a .po file (in the po directory of the source distro) for each supported language (vi.po for Vietnamese). It would automatically adapt to the setting of your system's locale. Under Windows this system does not work, because most texts are defined in the resource file (winboard.rc), where gettext macros cannot be used. So I designed my own system for translating Windows, based on using Windows API calls to change the dialog labels after startup. This makes that you can interactively change the language, and I created items in the Help menu for that. The translated messages are stored in .lng files, containing the English strings and the desired translation (in the format "Eglish text" === "translated text").

Now I had this system running in WinBoard even before the gettext system was running in XBoard, and several translations were already available. So when we started with gettext in XBoard, I made an edit script that would take the .pot file that is the template for all .po files (which translates all messages to an empty string), to use the Windows .lng file for recognizing all the English messages in the .po file, and then write the translation in the empty string on the next line.

Now WinBoard and XBoard do not use exactly the same strings in their dialogs, but I adapted the edit script so that it would match the English strings that were only insignificantly different, and could use the same translation. This gave a reasonable start for that version of XBoard in any of the languages we already supported in WinBoard.

Now the XBoard translations are managed by GNU's translation teams, with which we have very little interaction. They just occasionally submit updated .pofiles, and we commit those to the git repository. The .pofiles change partly automatically (they contain line numbers with each strig, and these change whenever lines are inserted in the source code, and removed oand altered strings will disappear, new and altered strings will be put in there with empty translation). Even a subtle change that could do with the same traslation might be lost this way; if you add a single comma, the automatic system will consider it a different string, and the translation is lost.

Now I have looked in the git update history of the vi.po file, and I did not notice any non-automatic updates. So it seems that the GNU Vietnamese translation team is not interested in XBoard, and never did any work on it. That means that everything that was added after implementing the gettext system has not been added, and a lot might have been lost by changes in menu texts, etc.

Although bypassing the GNU translation teams is in general bad practice, there doesn't seem to be much harm in it when they are not working on XBoard at all. All what we need is a .po file, and we do not care where we obtain it from.
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: Problem to run XBoard with Mac command line

Post by JoshPettus »

I'd be surprised if the "Translation Team" wasn't just the one person who was active at a given moment. And that's if that team is lucky. Maybe there was a Vietnamese translator as part of the project years ago, but not now. I wouldn't say they promote their project very much, and barrier for entry into the group is absurd. That, at least, month wait is probably because no one checks the email...Ive heard of security clearances that take less time...
hgm wrote: All what we need is a .po file, and we do not care where we obtain it from.
Good point I'll PM him the current xboard .pot file.
User avatar
hgm
Posts: 27787
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Problem to run XBoard with Mac command line

Post by hgm »

JoshPettus wrote:Good point I'll PM him the current xboard .pot file.
Perhaps also the vi.po . I expect it to be just like the .pot, except already partially filled with translations.
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: Problem to run XBoard with Mac command line

Post by JoshPettus »

Already did. I was afraid it was different, because I noticed a bunch of different strings on the bottom, but turns out they were all commented out, and the generated stuff ended above.
User avatar
phhnguyen
Posts: 1434
Joined: Wed Apr 21, 2010 4:58 am
Location: Australia
Full name: Nguyen Hong Pham

Re: Problem to run XBoard with Mac command line

Post by phhnguyen »

Thanks all for giving me a chance to help my home country's people :)

I have just completed it. So long!

As I have remembered when translating similar one for WB I could try directly my work on the WB, thus I could change the text for better meanings and/or better sizes (to fit). However for this one for XB, I cannot do like that. Perhaps I have to wait for your new release then make some changes later.
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: Problem to run XBoard with Mac command line

Post by JoshPettus »

unfortunately it has to be compiled with the app. I'll try to find time to set it up tomorrow and send you the compiled file you can throw into your xboard app
User avatar
phhnguyen
Posts: 1434
Joined: Wed Apr 21, 2010 4:58 am
Location: Australia
Full name: Nguyen Hong Pham

Bug?

Post by phhnguyen »

Just see a strange thing (bug?) when working with XBoard.

The following game is pasted (Paste Game) into XBoard and it shows the game well: I can use buttons to go forward, backward all moves. Note that the game has two comments in the beginning:

Code: Select all

[Event "Edited game"]
[Site "192-168-1-7.tpgi.com.au"]
[Date "2016.12.10"]
[Round "-"]
[White "-"]
[Black "-"]
[Result "*"]
[Variant "xiangqi"]
[FEN "3aka3/c2R1R2c/4e4/9/9/9/9/4E4/4K4/2E6 w 0 1"]
[SetUp "1"]

{--------------
. . . a k a . . .
c . . R . R . . c
. . . . e . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . E . . . .
. . . . K . . . .
. . E . . . . . .
white to play
--------------}
{Another 
comment
}

1. Rf6 Ade8 2. Rf8 Ad9 3. Rf6 Ade8 4. Rf8 Ad9 5. Rf6 Ade8 6. Rf8
However the bellow game (with two comments too) show the starting board well but no move: move buttons don't work:

Code: Select all

[Event "Edited game"]
[Site "192-168-1-7.tpgi.com.au"]
[Date "2016.12.10"]
[Round "-"]
[White "-"]
[Black "-"]
[Result "*"]
[Variant "xiangqi"]
[FEN "3aka3/c2R1R2c/4e4/9/9/9/9/4E4/4K4/2E6 w 0 1"]
[SetUp "1"]

{--------------
. . . a k a . . .
c . . R . R . . c
. . . . e . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . E . . . .
. . . . K . . . .
. . E . . . . . .
white to play
--------------}
{--------------
. . . a k a . . .
c . . R . R . . c
. . . . e . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . E . . . .
. . . . K . . . .
. . E . . . . . .
white to play
--------------}

1. Rf6 Ade8 2. Rf8 Ad9 3. Rf6 Ade8 4. Rf8 Ad9 5. Rf6 Ade8 6. Rf8
And here the result when I copy back and paste the game into a text editor:

Code: Select all

[Event "Edited game"]
[Site "192-168-1-7.tpgi.com.au"]
[Date "2016.12.10"]
[Round "-"]
[White "-"]
[Black "-"]
[Result "*"]
[Variant "xiangqi"]
[FEN "3aka3/c2R1R2c/4e4/9/9/9/9/4E4/4K4/2E6 w 0 1"]
[SetUp "1"]

{--------------
. . . a k a . . .
c . . R . R . . c
. . . . e . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . . . . . .
. . . . E . . . .
. . . . K . . . .
. . E . . . . . .
white to play
--------------}
*
User avatar
phhnguyen
Posts: 1434
Joined: Wed Apr 21, 2010 4:58 am
Location: Australia
Full name: Nguyen Hong Pham

Re: Bug?

Post by phhnguyen »

Oops, just realised XBoard automatically added my IP for Site 😰
JoshPettus
Posts: 730
Joined: Fri Oct 19, 2012 2:23 am

Re: Bug?

Post by JoshPettus »

Strange, you have your local ip and domain as your computer name?