diff --git a/.gitignore b/.gitignore index 4dfa18fe..a98fa226 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ build* mysql.cnf .DS_Store .idea/ +.tx/ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index cb847389..82511d79 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -132,3 +132,59 @@ mutating objects.) When pointers can't be avoided, try to use a smart pointer of some sort, such as `QScopedPointer`, or, less preferably, `QSharedPointer`. + +### Translations (for developers) ### + +All the user-interface strings inside cockatrice's source code must be written in +english language. Translations to other languages are managed using Transifex: +http://www.transifex.com + +If you're about to propose a change that adds or modifies any translatable string +in the code, you'll need to update the basic translation files so that translators +are notified that new strings needs to be translated. +To update the basic translation files, re-run cmake with enabling the appropriate +parameter and then run make: + + cd cockatrice/build + cmake .. -DUPDATE_TRANSLATIONS=ON + make + +If the parameter has been enabled correctly, when running "make" you should see +a line similar to this one (the numbers may vary): + + [ 76%] Generating ../../cockatrice/translations/cockatrice_en.ts + Updating '../../cockatrice/translations/cockatrice_en.ts'... + Found 857 source text(s) (8 new and 849 already existing) + +You should then notice that the following files have uncommitted changes: + + cockatrice/translations/cockatrice_en.ts + oracle/translations/oracle_en.ts + +It's now suggested to disable the parameter using: + + cmake .. -DUPDATE_TRANSLATIONS=OFF + +Now you are ready to propose your change. Once your change gets merged, +Transifex will pick up the modified files automatically (checks every 24 hours) +and update the interface where translators will be able to translate the new +strings. + +### Translations (for mantainers) ### + +Before rushing out a new release, it would be nice to fetch the most up to date +translations from Transifer and commit them in the cockatrice source code. +This can be done manually from the Transifex we interface, but it's quite time +expensive. + +As an alternative, you can install the Transifex CLI: + + http://docs.transifex.com/developer/client/ + +You'll then be able to use a git-like cli command to push and pull translations +from Transifex to the source code and viceversa. + +### Translations (for translators) ### + +Please have a look at the specific FAQ: +https://github.com/Cockatrice/Cockatrice/wiki/Translation-FAQ \ No newline at end of file diff --git a/cockatrice/CMakeLists.txt b/cockatrice/CMakeLists.txt index 2d51869b..66b50081 100644 --- a/cockatrice/CMakeLists.txt +++ b/cockatrice/CMakeLists.txt @@ -98,12 +98,14 @@ if (UNIX AND NOT APPLE) endif (UNIX AND NOT APPLE) set(cockatrice_RESOURCES cockatrice.qrc) -FILE(GLOB cockatrice_TS "${CMAKE_CURRENT_SOURCE_DIR}/translations/*.ts") IF(UPDATE_TRANSLATIONS) FILE(GLOB_RECURSE translate_cockatrice_SRCS ${CMAKE_SOURCE_DIR}/cockatrice/src/*.cpp ${CMAKE_SOURCE_DIR}/cockatrice/src/*.h) FILE(GLOB_RECURSE translate_common_SRCS ${CMAKE_CURRENT_SOURCE_DIR}/common/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/common/*.h) SET(translate_SRCS ${translate_cockatrice_SRCS} ${translate_common_SRCS}) + SET(cockatrice_TS "${CMAKE_CURRENT_SOURCE_DIR}/translations/cockatrice_en.ts") +ELSE() + FILE(GLOB cockatrice_TS "${CMAKE_CURRENT_SOURCE_DIR}/translations/*.ts") ENDIF(UPDATE_TRANSLATIONS) if(WIN32) diff --git a/cockatrice/translations/cockatrice_en.ts b/cockatrice/translations/cockatrice_en.ts index 61466f7b..5c002812 100644 --- a/cockatrice/translations/cockatrice_en.ts +++ b/cockatrice/translations/cockatrice_en.ts @@ -774,12 +774,17 @@ This is only saved for moderators and cannot be seen by the banned person. - &Spectators allowed + &Spectators can watch - Spectators &need a password to join + Spectators &need a password to watch + + + + + Spectators can see &hands @@ -787,11 +792,6 @@ This is only saved for moderators and cannot be seen by the banned person.Spectators can &chat - - - Spectators see &everything - - Spectators @@ -1196,100 +1196,100 @@ Would you like to change your database location setting? GameSelector - + C&reate - + &Join - - - - - - - - - + + + + + + + + + Error - + Please join the appropriate room first. - + Wrong password. - + Spectators are not allowed in this game. - + The game is already full. - + The game does not exist any more. - + This game is only open to registered users. - + This game is only open to its creator's buddies. - + You are being ignored by the creator of this game. - + Join game - + Password: - + Please join the respective room first. - + Games - + &Filter games - + C&lear filter - + J&oin as spectator @@ -1305,17 +1305,17 @@ Would you like to change your database location setting? GamesModel - + Game Created - + Creator - + Description @@ -1335,32 +1335,48 @@ Would you like to change your database location setting? - - not allowed + + + can chat - - Room + + see hands + + + + + can see hands + not allowed + + + + + Room + + + + Game Type - + Restrictions - + Players - + Spectators @@ -1741,27 +1757,32 @@ Local version is %1, remote version is %2. - - &Cockatrice - - - - - &About Cockatrice + + A&ctions + &Cockatrice + + + + + &About Cockatrice + + + + &Help - + Are you sure? - + There are still open games. Are you sure you want to quit? @@ -3636,37 +3657,37 @@ Local version is %1, remote version is %2. QMenuBar - + Services - + Hide %1 - + Hide Others - + Show All - + Preferences... - + Quit %1 - + About %1 @@ -4180,148 +4201,153 @@ Please enter a name: TabGame - + F5 - + F6 - + F7 - + F8 - + F9 - + F10 - + &Phases - + &Game - + Next &phase - + Ctrl+Space - + Tab - + Next &turn - + Ctrl+Return - + Ctrl+Enter - + &Remove all local arrows - + Ctrl+R - + Game &information - + &Concede - + F2 - + &Leave game - - + + Ctrl+Q - + C&lose replay - + &Say: - + Concede - + Are you sure you want to concede this game? - + Leave game - + Are you sure you want to leave this game? - + + You have been kicked out of the game. + + + + Replay %1: %2 - + Game %1: %2 diff --git a/oracle/CMakeLists.txt b/oracle/CMakeLists.txt index 872b4d26..56830d63 100644 --- a/oracle/CMakeLists.txt +++ b/oracle/CMakeLists.txt @@ -23,11 +23,13 @@ if (UNIX AND NOT APPLE) endif (UNIX AND NOT APPLE) set(oracle_RESOURCES oracle.qrc) -FILE(GLOB oracle_TS "${CMAKE_CURRENT_SOURCE_DIR}/translations/*.ts") IF(UPDATE_TRANSLATIONS) FILE(GLOB_RECURSE translate_oracle_SRCS ${CMAKE_SOURCE_DIR}/oracle/src/*.cpp ${CMAKE_SOURCE_DIR}/oracle/src/*.h) SET(translate_SRCS ${translate_oracle_SRCS}) + SET(oracle_TS "${CMAKE_CURRENT_SOURCE_DIR}/translations/oracle_en.ts") +ELSE() + FILE(GLOB oracle_TS "${CMAKE_CURRENT_SOURCE_DIR}/translations/*.ts") ENDIF(UPDATE_TRANSLATIONS) if(WIN32)