Apr 26, 2024, 09:52:18 PM *
Welcome, Guest. Please login or register.
News:
Advanced search
Pages: [1] 2 3 4
Print
Author Topic: Configuration of PGN reader  (Read 13718 times)
greglebarbar
Newbie
*
Posts: 10


« on: Mar 25, 2011, 06:24:53 AM »

Hello Richard,

I have a question about PGN reader.

I would like change the first letter of each move in order to translate in French.
So I would like replace Q -> D, K -> R etc

Could you help me please ?

Regards,
GregLeBarbar
Logged
richard
Administrator
Hero Member
*****
Posts: 19242



« Reply #1 on: Mar 25, 2011, 06:38:13 AM »

Hi Greg,

If you add the following on your page before the code to load the pgn viewer you should get French translations for the pieces:
<script language="javascript" src="http://chesstempo.com/locale/fr_FR/LC_MESSAGES/ct.json"></script>

Regards,
Richard.
Logged
greglebarbar
Newbie
*
Posts: 10


« Reply #2 on: Mar 25, 2011, 06:44:51 AM »

Always quick to respond

thanks Richard !



Logged
richard
Administrator
Hero Member
*****
Posts: 19242



« Reply #3 on: Mar 25, 2011, 09:45:11 AM »

No Problem (and its the people that helped with the French translation that really deserve the thanks :-) ).

Regards,
Richard.
Logged
alvarofrota
Tag Beta Testers
Hero Member
*
Posts: 1605


« Reply #4 on: Mar 25, 2011, 02:18:47 PM »

Rio de Janeiro, 25 de março de 2011.

Grande Richard!

And what about the Portuguese usage for this feature?

Thank you in advance!

Álvaro Frota
Logged

FORA TEMER!
richard
Administrator
Hero Member
*****
Posts: 19242



« Reply #5 on: Mar 25, 2011, 02:23:13 PM »

Hi Álvaro ,

If you replace the fr_FR with pt_BR you'll get (your wonderful :-) ) Portuguese translation.

others are:
de_DE : German
es_ES: Spanish
it_IT: Italian
nl_NL: Dutch
pl_PL:Polish
tr_TR: Turkish
sv_SE: Swedish

Regards,
Richard.
Logged
alvarofrota
Tag Beta Testers
Hero Member
*
Posts: 1605


« Reply #6 on: Mar 25, 2011, 04:24:30 PM »

Olá Richard!

Thans for your words and for the rapid reply!

Álvaro
Logged

FORA TEMER!
alvarofrota
Tag Beta Testers
Hero Member
*
Posts: 1605


« Reply #7 on: Mar 29, 2011, 01:35:02 PM »

Rio de Janeiro, 29 de março de 2011.

Prezado Richard:

The translation worked fine but since yesterday it is not working any more!

Aquele abraço!

Álvaro Frota
Logged

FORA TEMER!
richard
Administrator
Hero Member
*****
Posts: 19242



« Reply #8 on: Mar 29, 2011, 01:41:41 PM »

Hi Álvaro,

I don't think I've changed anything at my end.  Can you supply a link to an example page where the translated pgn viewer is not working?

Regards,
Richard.
Logged
alvarofrota
Tag Beta Testers
Hero Member
*
Posts: 1605


« Reply #9 on: Mar 29, 2011, 03:59:03 PM »

Rio de Janeiro, 29 de março de 2011

Olá Richard:

The link is to one blog that I am using (by now) to do some tests: http://chesstempo.blogspot.com

Este blog é de responsabilidade de Álvaro Frota, não tendo qualquer ligação oficial com Chess Tempo

Aquele abraço!

Álvaro
Logged

FORA TEMER!
richard
Administrator
Hero Member
*****
Posts: 19242



« Reply #10 on: Mar 29, 2011, 10:00:10 PM »

Hi Álvaro,

When I view the HTML source of your page I don't see the line:
<script language="javascript" src="http://chesstempo.com/locale/fr_FR/LC_MESSAGES/ct.json"></script>

It should be just above the pgnyui.js file, so I think you might have accidentally edited your page and removed that line.

Regards,
Richard.
Logged
alvarofrota
Tag Beta Testers
Hero Member
*
Posts: 1605


« Reply #11 on: Mar 30, 2011, 01:21:00 PM »

Rio de Janeiro, 30 de março de 2011.

Richard:

Thank you!

I put that line within the code of the post but it was supposed to be put within the code of the template!

Now, all is working properly.

A new question: the code that I put within the template is this one:
Code:
<!-- CHESSTEMPO.COM PGN VIEWER CODE BELOW -->
<!-- Support libraries from Yahoo's YUI project -->
<script language='javascript' src='http://chesstempo.com/locale/pt_BR/LC_MESSAGES/ct.json'/>
<script src='http://chesstempo.com/js/pgnyui.js' type='text/javascript'></script>
<script src='http://chesstempo.com/js/pgnviewer.js' type='text/javascript'></script>
<link href='http://chesstempo.com/css/board-min.css' rel='stylesheet' type='text/css'></link>
<style type='text/css'>
.ct-board-container{padding:5px;}
.ct-board,
.ct-black_square,
.ct-white_square{display:block;}
.ct-board-border{border:2px solid #363A3D;}
.ct-board{overflow:hidden;text-align:center;}
.ct-black-square,
.ct-white-square{float:left;}
.ct-black-square{background-color:#666;}
.ct-white-square{background-color:#8D8D8C;}
.ct-nav-buttons{padding-bottom:7px;padding-top:7px;}
.ct-back,
.ct-forward,
.ct-start,
.ct-end,
.ct-play,
.ct-stop{vertical-align:middle;}
.ct-mainline-commentary{padding-left:15px;}
.ct-board-move-mainline,
.ct-board-move-variation{cursor:pointer;}
.ct-board-move-mainline{font-weight:700;color: blue;font-weight: bold; }
.ct-board-move-comment{color:green;font-weight: bold;}
.ct-board-move-current{color:red;}
</style>

It seens to me that most of the options (colours of the board, size of the pieces and board, etc) was automatically controled by this code. Is there a way to allow me to control such options, as in the usage page of the PGN Viewer?

Aquele abraço!

Álvaro
Logged

FORA TEMER!
richard
Administrator
Hero Member
*****
Posts: 19242



« Reply #12 on: Mar 30, 2011, 03:32:34 PM »

Hi Álvaro,

Sorry, I don't think I understand your question. to control colour etc you change the class definitions in the code you have shown inside the <style></style> tags. Can you be more specific about what you are trying to do?

Regards,
Richard.
Logged
alvarofrota
Tag Beta Testers
Hero Member
*
Posts: 1605


« Reply #13 on: Mar 31, 2011, 09:53:43 PM »

Rio de Janeiro, 31 de março dd 2011.

Prezado Richard:

The code that I put in the template:
Code:
<!-- CHESSTEMPO.COM PGN VIEWER CODE BELOW -->
<!-- Support libraries from Yahoo's YUI project -->
<script language='javascript' src='http://chesstempo.com/locale/pt_BR/LC_MESSAGES/ct.json'/>
<script src='http://chesstempo.com/js/pgnyui.js' type='text/javascript'></script>
<script src='http://chesstempo.com/js/pgnviewer.js' type='text/javascript'></script>
<link href='http://chesstempo.com/css/board-min.css' rel='stylesheet' type='text/css'></link>
<style type='text/css'>
.ct-board-container{padding:1px;}
.ct-board,
.ct-black_square,
.ct-white_square{display:block;}
.ct-board-border{border:2px solid #363A3D;}
.ct-board{overflow:hidden;text-align:center;}
.ct-black-square,
.ct-white-square{float:left;}
.ct-black-square{background-color:#7085B6;}
.ct-white-square{background-color:#DFDFDF;}
.ct-nav-buttons{padding-bottom:7px;padding-top:7px;}
.ct-back,
.ct-forward,
.ct-start,
.ct-end,
.ct-play,
.ct-stop{vertical-align:middle;}
.ct-mainline-commentary{padding-left:5px;}
.ct-board-move-mainline,
.ct-board-move-variation{cursor:pointer;}
.ct-board-move-mainline{padding-left:5px; font-weight:700;color: blue;font-weight: bold; }
.ct-board-move-comment{color:green;font-weight: bold;}
.ct-board-move-current{color:red;}
</style>

The code of the Gadget "Dayly Puzzle" is:
Code:
<div id="puzzle">
<div id="puzzle-container">
<script type="text/javascript" src="http://chesstempo.com/js/dailypuzzle.js"></script>
<script>
  new Puzzle({ pieceSize: 46, showCoordinates: true});
</script>
</div>
<a id="ct-link" href="http://chesstempo.com">Chess Tempo!</a>
</div>

When I remove the Gadget, the class definitions in the code inside the <style></style> tags works properly.

When I put the Gadget in the blog, they do not work properly. For exemplo, the colours do not change.

The script of the translation that I put in the template works both with the moves of the PGN and the with translation of the Gadget! This is a good news!

Aquele abraço!

Álvaro Frota
Logged

FORA TEMER!
richard
Administrator
Hero Member
*****
Posts: 19242



« Reply #14 on: Mar 31, 2011, 10:28:44 PM »

Hi Álvaro,

Does putting the <style></style> block after the puzzle HTML help?

Regards,
Richard.
Logged
Pages: [1] 2 3 4
Print
Jump to: