Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
1b11900
Refactor combineWithAnd function for l18n
AbbyRead Mar 26, 2026
fafc39b
Make qb functionality more l10n-friendly
AbbyRead Mar 26, 2026
b7c5697
Add localization support to sbz_base's init.lua's strings
AbbyRead Mar 26, 2026
fe7894a
Add localization support for item name/description text
AbbyRead Mar 26, 2026
3f1678a
Update minetest to core where applicable
AbbyRead Mar 26, 2026
7f0d891
Fix issues with l10n implementation for descriptions
AbbyRead Mar 26, 2026
f249a36
Add localization support for chat strings
AbbyRead Mar 27, 2026
46dd948
Add a recursive pot file generator
AbbyRead Mar 27, 2026
e6ed97e
Generate translation template files
AbbyRead Mar 27, 2026
2f15f5d
Update api call to make merging easier
AbbyRead Mar 27, 2026
4600ffe
Merge remote-tracking branch 'upstream/master' into localization-support
AbbyRead Mar 27, 2026
f8a1fd3
Finish merge I guess
AbbyRead Mar 27, 2026
6ba01f1
Finish merge more betterer
AbbyRead Mar 27, 2026
29f6940
Revert localization-centric changes to sbz_logic
AbbyRead Mar 28, 2026
0ba3899
Revert localization-centric changes to sbz_logic_devices
AbbyRead Mar 28, 2026
358c509
Move quest md docs to a language-specific subfolder
AbbyRead Mar 28, 2026
a7b64e5
Refactor md ingest to separate concerns and prevent crash
AbbyRead Mar 28, 2026
12dd320
Add a modpath local
AbbyRead Mar 28, 2026
4281204
Change path and crash with error on missing fallback
AbbyRead Mar 28, 2026
648da74
Index quests and fix credits text indentation
AbbyRead Mar 28, 2026
c05f666
Make key/value pairs read better
AbbyRead Mar 28, 2026
f08509f
Add id and wrap translatable strings
AbbyRead Mar 28, 2026
7f02ac5
Populate a quest object with supported translations
AbbyRead Mar 28, 2026
517e239
Add id field to quest parser
AbbyRead Mar 28, 2026
bd049fe
Change quest handling to be based on id
AbbyRead Mar 28, 2026
97c0b60
Show localized quest titles and text to players
AbbyRead Mar 28, 2026
50a6a7f
Collapse duplicate secret-quest branches
AbbyRead Mar 28, 2026
41a2053
Clean up comments and style
AbbyRead Mar 28, 2026
e397a65
Make parser ingest a clear, static ID for the quest
AbbyRead Mar 29, 2026
f6f1e84
Add quest ID update pass
AbbyRead Mar 29, 2026
25293c0
Update achievement unlock to use qid
AbbyRead Mar 29, 2026
e27e709
Change achievement_table over to use qid slugs
AbbyRead Mar 29, 2026
18630dc
Fix typos, misspellings, and non-words
AbbyRead Mar 29, 2026
a86ad98
Update markdown documents to use qids
AbbyRead Mar 29, 2026
bbf2485
Update legacy_key_map
AbbyRead Mar 29, 2026
11803ec
Mark things as to-do and circle back later
AbbyRead Mar 29, 2026
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
55 changes: 55 additions & 0 deletions extract_translations.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
#!/usr/bin/env bash
set -e

# Get submodule mod names from .gitmodules
SUBMODULES=$(grep 'path = mods/' .gitmodules 2>/dev/null | sed 's|.*mods/||')

for mod in mods/*; do
[ -d "$mod" ] || continue

modname="$(basename "$mod")"

# Skip if this mod is a git submodule
if echo "$SUBMODULES" | grep -qx "$modname"; then
echo "Skipping git submodule: $modname"
continue
fi

# Skip mods that don’t use translations
if ! grep -qr "get_translator" "$mod"; then
echo "Skipping (no translations): $modname"
continue
fi

outdir="$mod/locale"
outfile="$outdir/$modname.pot"

echo "Processing $modname..."

mkdir -p "$outdir"

find "$mod" -type f -name "*.lua" \
-not -path "*/.git/*" \
-not -path "*/vendor/*" \
-not -path "*/deps/*" \
-not -path "*/third_party/*" \
| xgettext \
--from-code=UTF-8 \
-L lua \
-kS -kPS:1,2 \
-kcore.translate:1c,2 \
-kcore.translate_n:1c,2,3 \
-d "$modname" \
-o "$outfile" \
-f -

# Fix charset
if [ -f "$outfile" ]; then
sed -i 's/charset=CHARSET/charset=UTF-8/' "$outfile"
else
echo "No translatable strings found in $modname"
fi

done

echo "Done."
Loading