Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
5dcbf92
now translatable: (server-side) "running smb" in motd, radio notif
NaitLee Aug 5, 2023
917992d
more translatable strings in gamemodes and minigames
NaitLee Jan 15, 2024
ce21258
a bit more notification strings made translatable
NaitLee Jan 15, 2024
e1f3213
Initial localization + transifex infrastructure
NaitLee Jan 18, 2024
6609532
Translate lang/common.pot in zh-Hant
transifex-integration[bot] Jan 18, 2024
55395e1
Translate lang/common.pot in zh_CN
transifex-integration[bot] Jan 18, 2024
48d2cc5
Translate lang/common.pot in zh_HK
transifex-integration[bot] Jan 18, 2024
13007fa
Translate lang/common.pot in zh_TW
transifex-integration[bot] Jan 18, 2024
4af3350
multi-branch support for l10n
NaitLee Feb 8, 2024
ed19b8f
Merge remote-tracking branch 'refs/remotes/origin/NaitLee/more-locali…
NaitLee Feb 8, 2024
96b029c
existing po files should be updated manually when needed
NaitLee Feb 8, 2024
07915a7
keep zh-hant po file from transifex
NaitLee Feb 8, 2024
9bfc953
use env bash for translation helper scripts, and make them sh compatible
NaitLee May 20, 2024
17e0f6c
[lang] debug env SMB_KEEP_POT
NaitLee May 20, 2024
bfb3315
[lang] gettext only on qc and qh files
NaitLee May 20, 2024
5d01863
[lang] fix gettext charset header, use msgmerge
NaitLee May 20, 2024
081fe7f
up-to-date common.pot, add *~ to gitignore (backup of msgmerge)
NaitLee May 20, 2024
fffd916
[lang] remove obsolete localization pk3s when merging translations
NaitLee May 20, 2024
efc9171
Translate lang/common.pot in ja_JP
transifex-integration[bot] May 20, 2024
cdc42a1
Translate lang/common.pot in ja_JP
transifex-integration[bot] May 21, 2024
eb4f9f1
update merge.sh to have cleaner output
NaitLee Jul 19, 2024
83b11a9
docs(l10n): add transifex link to team-smb, clarify readme and commen…
NaitLee Sep 15, 2024
6d671ac
chore(l10n): update common.pot
NaitLee Sep 15, 2024
405dce1
fix(radio): revert localization of sv_radio.qc
NaitLee Sep 15, 2024
8819730
Translate lang/common.pot in zh-Hant
transifex-integration[bot] Sep 15, 2024
1e6b512
Translate lang/common.pot in zh_TW
transifex-integration[bot] Sep 15, 2024
b3e3bc9
Translate lang/common.pot in zh_CN
transifex-integration[bot] Sep 15, 2024
4173804
Translate lang/common.pot in ja_JP
transifex-integration[bot] Sep 15, 2024
d74c3b8
Translate lang/common.pot in zh_HK
transifex-integration[bot] Sep 15, 2024
cd8ec29
fix(l10n): date+hash version scheme for l10n pk3s
NaitLee Sep 15, 2024
4923fdc
Merge branch 'MarioSMB:master' into NaitLee/more-localizable-strings
NaitLee Jan 28, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ gmqcc/
*.lno
.cache/
.DS_Store
lang/common.pot.new*
*~
7 changes: 7 additions & 0 deletions .transifex.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
git:
filters:
- filter_type: file
file_format: PO
source_file: lang/common.pot
source_language: en
translation_files_expression: 'lang/common.<lang>.po'
31 changes: 29 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,37 @@ Note: PATH is one of the following depending on your system
|Mac|~/Library/Application Support/xonotic|
Nothing should *ever* be added to the main installation folder of Xonotic, use these paths!

1. Run this from a terminal in the modpack folder: `./update.sh`
2. Run this from a terminal in the modpack folder: `./build.sh` <br/>
1. Run this from a terminal in the modpack folder to complete setup: `./update.sh`
2. Run this from a terminal in the modpack folder to build the mod: `./build.sh` <br/>
For speed up compilation, if you want to execute without compression (without `csprogs-*.pk3` file): `ZIP=: ./build.sh`
3. Copy the compiled .dat files from modpack to `PATH/data`
4. Download the content packs to `PATH/data` and make sure they're available on your map download server

To update your server, repeat the above steps, but skip step 4 unless the packages available are newer than the ones you have


Localization
============

Translation work is done on Transifex: https://app.transifex.com/team-xonsmb/xonotic-smb-modpack/dashboard/

Also see Xonotic Wiki for translation guidelines and good practices: https://gitlab.com/xonotic/xonotic/-/wikis/Translating

Localization files dedicated to SMB are in the folder `lang`.

There are some scripts to help translaton work. To use them, please ensure `gettext` is installed, and complete setup with `./update.sh`.

1. `makepot.sh` will generate `common.pot` from SMB source code and *excludes vanilla Xonotic strings* from the same file in Xonotic data.
- Run this after you have added new strings in the source code.
- Transifex checks this file.
2. `merge.sh` will merge existing SMB translations and corresponding vanilla translations, when both exists, to `compiled/zzz-smb-l10n.pk3dir`
- Run this if you are going to release your mod & translations.
- To make translations available for your server players, use the `zzz-smb-l10n.xxxxxx.pk3` for your server (to skip creating it, use `ZIP=: ./merge.sh`)
- This step is automatically done when executing `./build.sh` (to skip, use `L10N=0 ./build.sh`)
3. `updatepo.sh` will get new strings from the source code and put to your translated .po files.
- Run this if you translate by directly editing `.po` files and new strings are available in the source code.
- In most cases, you want to run `makepot.sh` before running this.

You can also integrate Transifex service to your own mod repository.

To avoid merge conflicts from upstream, be sure to develop & translate your own mod in a seperate branch.
6 changes: 6 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,12 @@ mkdir -vp $(dirname "$0")/compiled
mv -v *.lno $(dirname "$0")/compiled
mv -v *.dat $(dirname "$0")/compiled

if [ -n "${L10N:-}" ]; then
tput bold; tput setaf 3; echo "Not merging localizations."; tput sgr0
else
./lang/merge.sh
fi

if [ -n "${ZIP:-}" ]; then
tput bold; tput setaf 3; echo "Done without compression."; tput sgr0
else
Expand Down
Loading