Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
8f967313
Commit
8f967313
authored
Feb 13, 2015
by
ctrlaltca
Browse files
Merge pull request #737 from ctrlaltca/translations
Translation updates to support Transifex; fix #651
parents
12fe0f53
798dc09f
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
.gitignore
View file @
8f967313
...
@@ -5,3 +5,4 @@ build*
...
@@ -5,3 +5,4 @@ build*
mysql.cnf
mysql.cnf
.DS_Store
.DS_Store
.idea/
.idea/
.tx/
CONTRIBUTING.md
View file @
8f967313
...
@@ -132,3 +132,59 @@ mutating objects.)
...
@@ -132,3 +132,59 @@ mutating objects.)
When pointers can't be avoided, try to use a smart pointer of some sort, such
When pointers can't be avoided, try to use a smart pointer of some sort, such
as
`QScopedPointer`
, or, less preferably,
`QSharedPointer`
.
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
cockatrice/CMakeLists.txt
View file @
8f967313
...
@@ -98,12 +98,14 @@ if (UNIX AND NOT APPLE)
...
@@ -98,12 +98,14 @@ if (UNIX AND NOT APPLE)
endif
(
UNIX AND NOT APPLE
)
endif
(
UNIX AND NOT APPLE
)
set
(
cockatrice_RESOURCES cockatrice.qrc
)
set
(
cockatrice_RESOURCES cockatrice.qrc
)
FILE
(
GLOB cockatrice_TS
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/translations/*.ts"
)
IF
(
UPDATE_TRANSLATIONS
)
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_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
)
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
(
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
)
ENDIF
(
UPDATE_TRANSLATIONS
)
if
(
WIN32
)
if
(
WIN32
)
...
...
cockatrice/translations/cockatrice_en.ts
View file @
8f967313
This diff is collapsed.
Click to expand it.
oracle/CMakeLists.txt
View file @
8f967313
...
@@ -23,11 +23,13 @@ if (UNIX AND NOT APPLE)
...
@@ -23,11 +23,13 @@ if (UNIX AND NOT APPLE)
endif
(
UNIX AND NOT APPLE
)
endif
(
UNIX AND NOT APPLE
)
set
(
oracle_RESOURCES oracle.qrc
)
set
(
oracle_RESOURCES oracle.qrc
)
FILE
(
GLOB oracle_TS
"
${
CMAKE_CURRENT_SOURCE_DIR
}
/translations/*.ts"
)
IF
(
UPDATE_TRANSLATIONS
)
IF
(
UPDATE_TRANSLATIONS
)
FILE
(
GLOB_RECURSE translate_oracle_SRCS
${
CMAKE_SOURCE_DIR
}
/oracle/src/*.cpp
${
CMAKE_SOURCE_DIR
}
/oracle/src/*.h
)
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
(
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
)
ENDIF
(
UPDATE_TRANSLATIONS
)
if
(
WIN32
)
if
(
WIN32
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment