diff --git a/Config.cpp b/Config.cpp index 4584721..b83055c 100644 --- a/Config.cpp +++ b/Config.cpp @@ -118,8 +118,8 @@ namespace Bastet{ for(int difficulty=0;difficulty()->default_value("No one played yet"),"Name of high scorer") - (str(score % difficulty % i).c_str(),po::value()->default_value(0),"High score (points)") + (str(scorer % difficulty % i).c_str(),po::value()->default_value(gettext("No one played yet")),gettext("Name of high scorer")) + (str(score % difficulty % i).c_str(),po::value()->default_value(0),gettext("High score (points)")) ; } diff --git a/INSTALL b/INSTALL index 6311809..05bccc2 100644 --- a/INSTALL +++ b/INSTALL @@ -14,3 +14,12 @@ chmod g+s /usr/local/bin/bastet touch /var/games/bastet.scores2 chgrp games /var/games/bastet.scores2 chmod 664 /var/games/bastet.scores2 + + +"translations.sh" is a script that iterates an array with the translated languages ​​and in each iteration generates the .mo binary file and copy this into the folder /usr/share/locale/xx_XX/LC_MESSAGES/, where xx_XX is the language in which It was translated. + +To change the language of the game,from the console change the value of LANGUAGE for example: + +LANGUAGE=es_AR + + diff --git a/README b/README index d1e2749..5b84c09 100644 --- a/README +++ b/README @@ -20,3 +20,10 @@ The game currently allows choosing between two block choosers. The second (harde ==Installation== See the INSTALL file in this same directory. + +==Languages== +This game was translated into Spanish(es_AR),Portuguese(pt_BR) and Italian(it_IT). + +==How to make translation files== +See the TRANSLATION file in this same directory. + diff --git a/TRANSLATIONS b/TRANSLATIONS new file mode 100644 index 0000000..f4630ea --- /dev/null +++ b/TRANSLATIONS @@ -0,0 +1,52 @@ +==How to make translation files== + +To add translations in other language you need to create a new PO file in the language you want (This file must be saved inside po/pt_BR), +for example to add Portuguese translations from the terminal you must execute the following command: + + `msginit -l pt_PT -o main.po -i main.pot` + +It first ask for the email of the translator and next generates a file for language chose (here pt_PT) +``` + Is the following your email address? + +f.poloni_at_gmx.com + + Please confirm by pressing Return, or enter your email address. +``` +In the header of the new file you can see all the information related to the selected languague and all msgid (Message Identifier) generated from POT file + +``` +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-05-02 18:18-0300\n" +"PO-Revision-Date: 2018-05-30 19:33-0300\n" +"Last-Translator: Bastet \n" +"Language-Team: Portuguese\n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: main.cpp:47 +msgid "Customize keys" +msgstr "" + +#: main.cpp:47 +msgid "Quit" +msgstr "" +``` +Now all you have to do is add the translations in each msgstr +``` +#: main.cpp:47 +msgid "Customize keys" +msgstr "Personalizar as chaves" + +#: main.cpp:47 +msgid "Quit" +msgstr "Sair" + +Finally, add the language that you translated in the array of languages ​​declared in the translations.sh script. + + + diff --git a/Ui.cpp b/Ui.cpp index 867f33a..3fec63e 100644 --- a/Ui.cpp +++ b/Ui.cpp @@ -112,12 +112,12 @@ namespace Bastet{ Curses::Curses(){ if(initscr()==NULL){ - fprintf(stderr,"bastet: error while initializing graphics (ncurses library).\n"); + fprintf(stderr,gettext("bastet: error while initializing graphics (ncurses library).\n")); exit(1); } if(!has_colors()){ endwin(); - fprintf(stderr,"bastet: no color support, sorry. Ask the author for a black and white version."); + fprintf(stderr,gettext("bastet: no color support, sorry. Ask the author for a black and white version.")); exit(1); } @@ -278,11 +278,11 @@ namespace Bastet{ void Ui::ChooseLevel(){ RedrawStatic(); int ch='0'; - format fmt(" Get ready!\n" + format fmt(gettext(" Get ready!\n" " \n" " Starting level = %1% \n" " 0-9 to change\n" - " to start\n"); + " to start\n")); string msg; while(ch!=' '){ msg=str(fmt % _level); @@ -309,15 +309,15 @@ namespace Bastet{ _scoreWin.RedrawBorder(); wattrset((WINDOW*)_nextWin,COLOR_PAIR(17)); - mvwprintw(_nextWin,0,0," Next block:"); + mvwprintw(_nextWin,0,0,gettext(" Next block:")); wrefresh(_nextWin); wattrset((WINDOW*)_scoreWin,COLOR_PAIR(17)); - mvwprintw(_scoreWin,1,0,"Score:"); + mvwprintw(_scoreWin,1,0,gettext("Score:")); wattrset((WINDOW*)_scoreWin,COLOR_PAIR(18)); - mvwprintw(_scoreWin,3,0,"Lines:"); + mvwprintw(_scoreWin,3,0,gettext("Lines:")); wattrset((WINDOW*)_scoreWin,COLOR_PAIR(19)); - mvwprintw(_scoreWin,5,0,"Level:"); + mvwprintw(_scoreWin,5,0,gettext("Level:")); wrefresh(_scoreWin); } @@ -376,7 +376,7 @@ namespace Bastet{ break; } else if(ch==keys->Pause){ - MessageDialog("Press SPACE or ENTER to resume the game"); + MessageDialog(gettext("Press SPACE or ENTER to resume the game")); RedrawStatic(); RedrawWell(w,b,p); nodelay(stdscr,TRUE); @@ -512,14 +512,14 @@ namespace Bastet{ void Ui::HandleHighScores(difficulty_t diff){ HighScores *hs=config.GetHighScores(diff); if(hs->Qualifies(_points)){ - string name=InputDialog(" Congratulations! You got a high score \n Please enter your name"); + string name=InputDialog(gettext(" Congratulations! You got a high score \n Please enter your name")); hs->InsertHighScore(_points,name); }else{ - MessageDialog("You did not get into\n" + MessageDialog(gettext("You did not get into\n" "the high score list!\n" "\n" " Try again!\n" - ); + )); } } @@ -527,9 +527,9 @@ namespace Bastet{ HighScores *hs=config.GetHighScores(diff); string allscores; if(diff==difficulty_normal) - allscores+="**Normal difficulty**\n"; + allscores+=gettext("**Normal difficulty**\n"); else if(diff==difficulty_hard) - allscores+="**Hard difficulty**\n"; + allscores+=gettext("**Hard difficulty**\n"); format fmt("%-20.20s %8d\n"); for(HighScores::reverse_iterator it=hs->rbegin();it!=hs->rend();++it){ allscores+=str(fmt % it->Scorer % it->Score); @@ -540,14 +540,14 @@ namespace Bastet{ void Ui::CustomizeKeys(){ Keys *keys=config.GetKeys(); format fmt( - "Press the key you wish to use for:\n\n" - "%=1.34s\n\n"); - keys->Down=KeyDialog(str(fmt % "move tetromino DOWN (soft-drop)")); - keys->Left=KeyDialog(str(fmt % "move tetromino LEFT")); - keys->Right=KeyDialog(str(fmt % "move tetromino RIGHT")); - keys->RotateCW=KeyDialog(str(fmt % "rotate tetromino CLOCKWISE")); - keys->RotateCCW=KeyDialog(str(fmt % "rotate tetromino COUNTERCLOCKWISE")); - keys->Drop=KeyDialog(str(fmt % "DROP tetromino (move down as much as possible immediately)")); - keys->Pause=KeyDialog(str(fmt % "PAUSE the game")); + gettext("Press the key you wish to use for:\n\n" + "%=1.34s\n\n")); + keys->Down=KeyDialog(str(fmt % gettext("move tetromino DOWN (soft-drop)"))); + keys->Left=KeyDialog(str(fmt % gettext("move tetromino LEFT"))); + keys->Right=KeyDialog(str(fmt % gettext("move tetromino RIGHT"))); + keys->RotateCW=KeyDialog(str(fmt % gettext("rotate tetromino CLOCKWISE"))); + keys->RotateCCW=KeyDialog(str(fmt % gettext("rotate tetromino COUNTERCLOCKWISE"))); + keys->Drop=KeyDialog(str(fmt % gettext("DROP tetromino (move down as much as possible immediately)"))); + keys->Pause=KeyDialog(str(fmt % gettext("PAUSE the game"))); } } diff --git a/main.cpp b/main.cpp index ff922ed..feb1747 100644 --- a/main.cpp +++ b/main.cpp @@ -33,9 +33,11 @@ using namespace boost::assign; int main(int argc, char **argv){ Ui ui; + setlocale(LC_ALL, ""); + bindtextdomain("main", "/usr/share/locale/"); + textdomain("main"); while(1){ - - int choice=ui.MenuDialog(list_of("Play! (normal version)")("Play! (harder version)")("View highscores")("Customize keys")("Quit")); + int choice=ui.MenuDialog(list_of(gettext("Play! (normal version)"))(gettext("Play! (harder version)"))(gettext("View highscores"))(gettext("Customize keys"))(gettext("Quit"))); switch(choice){ case 0:{ //ui.ChooseLevel(); diff --git a/po/es_AR/main.po b/po/es_AR/main.po new file mode 100644 index 0000000..c17319d --- /dev/null +++ b/po/es_AR/main.po @@ -0,0 +1,165 @@ +# Spanish translations for PACKAGE package. +# Copyright (C) 2018 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Bastet , 2018. +# +msgid "" +msgstr "" +"Project-Id-Version: 0.43.1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-05-02 18:18-0300\n" +"PO-Revision-Date: 2018-05-02 18:19-0300\n" +"Last-Translator: Bastet \n" +"Language-Team: Spanish\n" +"Language: es_Es\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: main.cpp:47 +msgid "Customize keys" +msgstr "Personalizar teclas" + +#: main.cpp:47 +msgid "Quit" +msgstr "Salir" + +#: main.cpp:47 +msgid "Play! (harder version)" +msgstr "¡Juega! (Versión más difícil)" + +#: main.cpp:47 +msgid "Play! (normal version)" +msgstr "¡Juega! (Versión normal)" + +#: main.cpp:47 +msgid "View highscores" +msgstr "Ver puntuaciones altas" + +#: Ui.cpp:281 +msgid "" +" Get ready!\n" +" \n" +" Starting level = %1% \n" +" 0-9 to change\n" +" to start\n" +msgstr "" +" Preparate!\n" +" \n" +" Nivel inicial = %1% \n" +" 0-9 to change\n" +" para comenzar\n" + +#: Ui.cpp:515 +msgid "" +" Congratulations! You got a high score \n" +" Please enter your name" +msgstr "" +" Felicitaciones! Has obtenido un puntaje alto \n" +" Por favor ingrese su nombre" + +#: Ui.cpp:312 +msgid " Next block:" +msgstr " Siguiente:" + +#: Ui.cpp:532 +msgid "**Hard difficulty**\n" +msgstr "**Dificultad difíci**\n" + +#: Ui.cpp:530 +msgid "**Normal difficulty**\n" +msgstr "**Dificultad normal**\n" + +#: Ui.cpp:550 +msgid "DROP tetromino (move down as much as possible immediately)" +msgstr "Soltar figura inmediatamente" + +#: Ui.cpp:320 +msgid "Level:" +msgstr "Nivel:" + +#: Ui.cpp:318 +msgid "Lines:" +msgstr "Líneas:" + +#: Ui.cpp:551 +msgid "PAUSE the game" +msgstr "Pause el juego" + +#: Ui.cpp:379 +msgid "Press SPACE or ENTER to resume the game" +msgstr "Presione ESPACIO o INICIO" + +#: Ui.cpp:543 +msgid "" +"Press the key you wish to use for:\n" +"\n" +"%=1.34s\n" +"\n" +msgstr "" +"Presiona la tecla que quieres usar para:\n" +"\n" +"%=1.34s\n" +"\n" + +#: Ui.cpp:316 +msgid "Score:" +msgstr "Puntos:" + +#: Ui.cpp:518 +msgid "" +"You did not get into\n" +"the high score list!\n" +"\n" +" Try again!\n" +msgstr "" +"No ingresaste a la lista de puntajes altos!\n" +"\n" +" Inténtalo nuevamente\n" + +#: Ui.cpp:115 +#, c-format +msgid "bastet: error while initializing graphics (ncurses library).\n" +msgstr "baster: error al inciar los gráficos (biblioteca ncurses).\n" + +#: Ui.cpp:120 +#, c-format +msgid "" +"bastet: no color support, sorry. Ask the author for a black and white " +"version." +msgstr "" +"bastet: no hay soporte de color, lo siento. Pídale una versión en blanco y " +"negro al autor" + +#: Ui.cpp:545 +msgid "move tetromino DOWN (soft-drop)" +msgstr "mover figura ABAJO (caida-suave)" + +#: Ui.cpp:546 +msgid "move tetromino LEFT" +msgstr "mover figura a la IZQUIERDA" + +#: Ui.cpp:547 +msgid "move tetromino RIGHT" +msgstr "mover figura a la DERECHA" + +#: Ui.cpp:548 +msgid "rotate tetromino CLOCKWISE" +msgstr "rotar figura en sentido aL RELOJ" + +#: Ui.cpp:549 +msgid "rotate tetromino COUNTERCLOCKWISE" +msgstr "rotar figura en sentido contrario al RELOJ" + +#: Config.cpp:121 +msgid "No one played yet" +msgstr "Nadie jugó todavía" + +#: Config.cpp:121 +msgid "Name of high scorer" +msgstr "Nombre del máximo anotador" + +#: Config.cpp:122 +msgid "High score (points)" +msgstr "Puntuación alta (puntos)" diff --git a/po/it_IT/main.po b/po/it_IT/main.po new file mode 100644 index 0000000..c774714 --- /dev/null +++ b/po/it_IT/main.po @@ -0,0 +1,105 @@ +# Italian translations for PACKAGE package. +# Copyright (C) 2018 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Bastet , 2018. +# +msgid "" +msgstr "" +"Project-Id-Version: 0.43.1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-05-15 12:28-0300\n" +"PO-Revision-Date: 2018-05-15 12:28-0300\n" +"Last-Translator: Bastet \n" +"Language-Team: Italian\n" +"Language: it\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=ASCII\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: main.cpp:47 +msgid "Customize keys" +msgstr "Per. le chiavi" + +#: main.cpp:47 +msgid "Play! (harder version)" +msgstr "Giocare! (difficile)" + +#: main.cpp:47 +msgid "Play! (normal version)" +msgstr "Giocare! (normale)" + +#: main.cpp:47 +msgid "Quit" +msgstr "Smettere" + +#: main.cpp:47 +msgid "View highscores" +msgstr "i punteggi migliori" + +msgid "bastet: error while initializing graphics (ncurses library).\n" +msgstr "bastet: errore durante l'inizializzazione della grafica (libreria ncurses).\n" + +msgid "bastet: no color support, sorry. Ask the author for a black and white version." +msgstr "bastet: nessun supporto colore, mi dispiace. Chiedi all'autore una versione in bianco e nero." + +msgid " Get ready!\n \n Starting level = %1% \n 0-9 to change\n to start\n" +msgstr "Preparati!\n\n Livello iniziale =%1%\n 0-9 per cambiare\n per iniziare\n" + + +msgid " Next block:" +msgstr "Prossimo bloque:" + +msgid "Score:" +msgstr "Punti:" + +msgid "Lines:" +msgstr "Linee:" + +msgid "Level:" +msgstr "Livello:" + +msgid "Press SPACE or ENTER to resume the game" +msgstr "Premere SPAZIO o INVIO per riprendere il gioco" + +msgid " Congratulations! You got a high score \n Please enter your name" +msgstr "Complimenti! Hai ottenuto un punteggio elevato\n Inserisci il tuo nome" + +msgid "You did not get into\nthe high score list!\n\n Try again!\n" +msgstr "Non sei entrato nella lista dei punteggi piu alti!\n\n Riprova!\n" + +msgid "**Normal difficulty**\n" +msgstr "**Difficolta normale**\n" + +msgid "**Hard difficulty**\n" +msgstr "**Difficile difficolta**\n" + +msgid "Press the key you wish to use for:\n\n%=1.34s\n\n" +msgstr "Premere il tasto che si desidera utilizzare per:\n\n%=1.34s\n\n" + +msgid "move tetromino DOWN (soft-drop)" +msgstr "sposta giu il tetromino (soft-drop)" + +msgid "move tetromino LEFT" +msgstr "sposta il tetromino a SINISTRA" + +msgid "move tetromino RIGHT" +msgstr "sposta il tetromino a DESTRA" + +msgid "rotate tetromino CLOCKWISE" +msgstr "ruotare il tetromino in senso ORARIO" + +msgid "rotate tetromino COUNTERCLOCKWISE" +msgstr "ruotare il tetromino in senso antiorario" + +msgid "DROP tetromino (move down as much as possible immediately)" +msgstr "drop tetromino spostati " + +msgid "PAUSE the game" +msgstr "Metti in pausa il gioco" + +msgid "bastet: using a user-specific high scores file: %1%\n as the global high scores file %2% is not writable\n" +msgstr "bastet: utilizzo di un file con punteggi piu alti specifici per lutente:\n as il file dei punteggi piu alti globale%2% non e scrivibile\n" + +msgid "bastet: creating a new user-specific high scores file %1%\n" +msgstr "bastet: creazione di un nuovo file di punteggi elevati specifico per lutente%1%\n" diff --git a/po/main.pot b/po/main.pot new file mode 100644 index 0000000..8755230 --- /dev/null +++ b/po/main.pot @@ -0,0 +1,132 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# FIRST AUTHOR , YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-05-02 18:18-0300\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME \n" +"Language-Team: LANGUAGE \n" +"Language: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: 8bit\n" + +#: main.cpp:47 +msgid "Customize keys" +msgstr "" + +#: main.cpp:47 +msgid "Quit" +msgstr "" + +#: main.cpp:47 +msgid "Play! (harder version)" +msgstr "" + +#: main.cpp:47 +msgid "Play! (normal version)" +msgstr "" + +#: main.cpp:47 +msgid "View highscores" +msgstr "" + +#: Ui.cpp:281 +msgid " Get ready!\n \n Starting level = %1% \n 0-9 to change\n to start\n" +msgstr "" + +#: Ui.cpp:515 +msgid " Congratulations! You got a high score \n Please enter your name" +msgstr "" + +#: Ui.cpp:312 +msgid " Next block:" +msgstr "" + +#: Ui.cpp:532 +msgid "**Hard difficulty**\n" +msgstr "" + +#: Ui.cpp:530 +msgid "**Normal difficulty**\n" +msgstr "" + +#: Ui.cpp:550 +msgid "DROP tetromino (move down as much as possible immediately)" +msgstr "" + +#: Ui.cpp:320 +msgid "Level:" +msgstr "" + +#: Ui.cpp:318 +msgid "Lines:" +msgstr "" + +#: Ui.cpp:551 +msgid "PAUSE the game" +msgstr "" + +#: Ui.cpp:379 +msgid "Press SPACE or ENTER to resume the game" +msgstr "" + +#: Ui.cpp:543 +msgid "Press the key you wish to use for:\n\n%=1.34s\n\n" +msgstr "" + +#: Ui.cpp:316 +msgid "Score:" +msgstr "" + +#: Ui.cpp:518 +msgid "You did not get into\nthe high score list!\n\n Try again!\n" +msgstr "" + +#: Ui.cpp:115 +#, c-format +msgid "bastet: error while initializing graphics (ncurses library).\n" +msgstr "" + +#: Ui.cpp:120 +#, c-format +msgid "bastet: no color support, sorry. Ask the author for a black and white version." +msgstr "" + +#: Ui.cpp:545 +msgid "move tetromino DOWN (soft-drop)" +msgstr "" + +#: Ui.cpp:546 +msgid "move tetromino LEFT" +msgstr "" + +#: Ui.cpp:547 +msgid "move tetromino RIGHT" +msgstr "" + +#: Ui.cpp:548 +msgid "rotate tetromino CLOCKWISE" +msgstr "" + +#: Ui.cpp:549 +msgid "rotate tetromino COUNTERCLOCKWISE" +msgstr "" + +#: Config.cpp:121 +msgid "No one played yet" +msgstr "" + +#: Config.cpp:121 +msgid "Name of high scorer" +msgstr "" + +#: Config.cpp:122 +msgid "High score (points)" +msgstr "" diff --git a/po/pt_BR/main.po b/po/pt_BR/main.po new file mode 100644 index 0000000..31336dd --- /dev/null +++ b/po/pt_BR/main.po @@ -0,0 +1,165 @@ +# Portuguese translations for PACKAGE package. +# Copyright (C) 2018 THE PACKAGE'S COPYRIGHT HOLDER +# This file is distributed under the same license as the PACKAGE package. +# Bastet , 2018. +# +msgid "" +msgstr "" +"Project-Id-Version: 0.43.1\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2018-05-02 18:18-0300\n" +"PO-Revision-Date: 2018-06-02 16:18-0300\n" +"Last-Translator: Bastet \n" +"Language-Team: Portuguese\n" +"Language: pt\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#: main.cpp:47 +msgid "Customize keys" +msgstr "Personalizar as chaves" + +#: main.cpp:47 +msgid "Quit" +msgstr "Sair" + +#: main.cpp:47 +msgid "Play! (harder version)" +msgstr "Jogue! (Versão mais difícil)" + +#: main.cpp:47 +msgid "Play! (normal version)" +msgstr "Jogue! (Versão normal)" + +#: main.cpp:47 +msgid "View highscores" +msgstr "Veja pontuações altas" + +#: Ui.cpp:281 +msgid "" +" Get ready!\n" +" \n" +" Starting level = %1% \n" +" 0-9 to change\n" +" to start\n" +msgstr "" +" Prepare-se!\n" +" \n" +" Nível inicial =% 1% \n" +" 0-9 para alterar\n" +" para iniciar\n" + +#: Ui.cpp:515 +msgid "" +" Congratulations! You got a high score \n" +" Please enter your name" +msgstr "" +" Parabéns! Você obteve uma pontuação alta \n" +" Por favor, digite seu nome" + +#: Ui.cpp:312 +msgid " Next block:" +msgstr " Próximo:" + +#: Ui.cpp:532 +msgid "**Hard difficulty**\n" +msgstr "**Dificuldade difícil**\n" + +#: Ui.cpp:530 +msgid "**Normal difficulty**\n" +msgstr "**Dificuldade normal**\n" + +#: Ui.cpp:550 +msgid "DROP tetromino (move down as much as possible immediately)" +msgstr "Solte a figura imediatamente" + +#: Ui.cpp:320 +msgid "Level:" +msgstr "Nível:" + +#: Ui.cpp:318 +msgid "Lines:" +msgstr "Linhas:" + +#: Ui.cpp:551 +msgid "PAUSE the game" +msgstr "Pause o jogo" + +#: Ui.cpp:379 +msgid "Press SPACE or ENTER to resume the game" +msgstr "Pressione ESPAÇO ou HOME" + +#: Ui.cpp:543 +msgid "" +"Press the key you wish to use for:\n" +"\n" +"%=1.34s\n" +"\n" +msgstr "" +"Pressione a tecla que você deseja usar:\n" +"\n" +"%=1.34s\n" +"\n" + +#: Ui.cpp:316 +msgid "Score:" +msgstr "Pontos:" + +#: Ui.cpp:518 +msgid "" +"You did not get into\n" +"the high score list!\n" +"\n" +" Try again!\n" +msgstr "" +"Você não entrou na lista de pontuações mais altas!\n" +"\n" +" Tente novamente\n" + +#: Ui.cpp:115 +#, c-format +msgid "bastet: error while initializing graphics (ncurses library).\n" +msgstr "baster: erro ao iniciar gráficos (biblioteca ncurses).\n" + +#: Ui.cpp:120 +#, c-format +msgid "" +"bastet: no color support, sorry. Ask the author for a black and white " +"version." +msgstr "" +"bastet: não há suporte para cores, desculpe. Peça ao autor uma versão em " +"preto e branco" + +#: Ui.cpp:545 +msgid "move tetromino DOWN (soft-drop)" +msgstr "mova a figura para baixo (soltar)" + +#: Ui.cpp:546 +msgid "move tetromino LEFT" +msgstr "mover figura para a esquerda" + +#: Ui.cpp:547 +msgid "move tetromino RIGHT" +msgstr "mover figura para a direita" + +#: Ui.cpp:548 +msgid "rotate tetromino CLOCKWISE" +msgstr "girar figura na direção do relógio" + +#: Ui.cpp:549 +msgid "rotate tetromino COUNTERCLOCKWISE" +msgstr "girar figura na direção oposta" + +#: Config.cpp:121 +msgid "No one played yet" +msgstr "Ninguém jogou ainda" + +#: Config.cpp:121 +msgid "Name of high scorer" +msgstr "Nome do maior pontuador" + +#: Config.cpp:122 +msgid "High score (points)" +msgstr "Pontuação alta (pontos)" diff --git a/translations.sh b/translations.sh new file mode 100755 index 0000000..2d80951 --- /dev/null +++ b/translations.sh @@ -0,0 +1,17 @@ +#!/bin/bash + +#This script iterates lang, this array contains the languages ​​in which the game was translated- +#In each iteration, generates the .mo binary file and copy this into the folder /usr/share/locale/xx_XX/LC_MESSAGES /, where xx_XX is the language in which it was translated. +#Finally the .mo binary file is remove of local repository. + +lang=('es_AR' 'pt_BR' 'it_IT') + +for i in "${lang[@]}" +do + sudo msgfmt -c -v -o ./po/$i/main.mo ./po/$i/main.po + sudo mkdir -p /usr/share/locale/$i + sudo mkdir -p /usr/share/locale/$i/LC_MESSAGES + sudo cp ./po/$i/main.mo /usr/share/locale/$i/LC_MESSAGES + rm -rf ./po/$i/main.mo +done +