Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
01ac52d
feat: add i18n infrastructure (Phase 0)
derrickmehaffy Mar 9, 2026
5d71da8
feat: migrate faction management and claim commands to i18n keys (Pha…
derrickmehaffy Mar 9, 2026
18398b4
feat: migrate member commands to i18n keys (Phase 1b)
derrickmehaffy Mar 9, 2026
7f47fe9
feat: migrate territory and teleport commands to i18n keys (Phase 1c)
derrickmehaffy Mar 9, 2026
ecb1e07
feat: migrate relation, social, info, and economy commands to i18n ke…
derrickmehaffy Mar 9, 2026
fb6dd72
feat: migrate UI commands and ProtectionChecker to i18n keys (Phase 1e)
derrickmehaffy Mar 9, 2026
8336c15
feat: migrate AnnouncementManager, TeleportManager, ChatManager to i1…
derrickmehaffy Mar 9, 2026
06be789
feat: add help system markdown-to-lang build pipeline (Phase 2)
derrickmehaffy Mar 9, 2026
9ea102a
chore: exclude build package from gitignore pattern
derrickmehaffy Mar 9, 2026
5ad45e0
feat: localize nav system, shared pages, and modal pages (Phase 3a)
derrickmehaffy Mar 9, 2026
6cf3396
feat: localize FactionDashboardPage and FactionMainPage (Phase 3b)
derrickmehaffy Mar 9, 2026
18ee92c
feat: localize Members, Browser, Leaderboard, and PlayerInfo pages (P…
derrickmehaffy Mar 9, 2026
55a37c2
feat: localize Relations, Settings, and Modules pages (Phase 3d)
derrickmehaffy Mar 9, 2026
b8d955c
feat: localize Treasury pages (Phase 3e)
derrickmehaffy Mar 9, 2026
96a3629
feat: localize confirmation, logs, chat, invites, and map pages (Phas…
derrickmehaffy Mar 9, 2026
b572584
feat: localize create faction and new player pages (Phase 3g)
derrickmehaffy Mar 9, 2026
7867f74
feat: localize admin GUI pages (Phase 4)
derrickmehaffy Mar 10, 2026
d3267e9
feat: add Player Settings GUI with language and notification preferen…
derrickmehaffy Mar 10, 2026
20644cc
feat: add Spanish translations, locale stubs, and translator workflow…
derrickmehaffy Mar 10, 2026
894a7b3
fix: redesign Player Settings UI and fix nav bar placement
derrickmehaffy Mar 10, 2026
e62e2d9
feat: use native locale display names and add es-ES to language selector
derrickmehaffy Mar 10, 2026
028e53e
feat: localize all GUI pages with i18n support
derrickmehaffy Mar 10, 2026
9bc2c0f
feat: localize admin zone wizard, unclaim confirm, and type modal pages
derrickmehaffy Mar 10, 2026
27346d8
fix: admin GUI crash, help i18n resolution, and dropdown display names
derrickmehaffy Mar 10, 2026
ea2da8e
fix: persist player preferences to JSON storage
derrickmehaffy Mar 10, 2026
c14c7c0
fix: disable Power Notifications toggle (not yet wired up)
derrickmehaffy Mar 10, 2026
3bcafdf
refactor: relocate help markdown to Server/Languages and remove stale…
derrickmehaffy Mar 10, 2026
f6b5bc5
feat: restructure admin test commands and extend help markdown syntax
derrickmehaffy Mar 10, 2026
b31839e
feat: add markdown rendering test page (/f admin test md)
derrickmehaffy Mar 10, 2026
e58857a
docs: add help markdown style guide and move translation guide to docs/
derrickmehaffy Mar 10, 2026
4e8f0d0
feat: add new UI Gallery elements to button test page
derrickmehaffy Mar 10, 2026
5d878ae
fix: pin markdown test page title bar to top of container
derrickmehaffy Mar 10, 2026
e3b26aa
fix: remove invalid #Title/#Content slots from Panel and SimpleContainer
derrickmehaffy Mar 10, 2026
0d8c8e7
fix: enable text wrapping and vertical centering in help templates
derrickmehaffy Mar 10, 2026
43188f5
feat: add table support to help markdown system
derrickmehaffy Mar 10, 2026
f818927
fix: improve table visual styling with GitHub-style grid borders
derrickmehaffy Mar 10, 2026
c106a59
feat: add admin help infrastructure with category filtering
derrickmehaffy Mar 10, 2026
65d5e1d
feat: rewrite player help categories 1-4 (en-US) with enhanced format…
derrickmehaffy Mar 10, 2026
82fe5f8
feat: rewrite player help categories 5-7 (en-US), add spawn protectio…
derrickmehaffy Mar 10, 2026
112120f
feat: add comprehensive admin help content (en-US) — 18 topics across…
derrickmehaffy Mar 10, 2026
a0d2000
feat: rewrite Spanish player help translations (es-ES) — 25 topics
derrickmehaffy Mar 10, 2026
436c124
feat: add Spanish admin help translations (es-ES), remove placeholder…
derrickmehaffy Mar 10, 2026
2e276cd
fix: strip inline markdown markers, join continuation lines, fix inva…
derrickmehaffy Mar 10, 2026
4492fba
feat: table rendering with inline rows, rich text, and help window re…
derrickmehaffy Mar 11, 2026
7847e4d
fix: remove duplicate gui.cancel key in admin lang files
derrickmehaffy Mar 11, 2026
7281969
feat: localize GUI labels for es-ES — browse stats, log time/types, s…
derrickmehaffy Mar 11, 2026
e7dc944
feat(i18n): localize admin GUI pages, entry templates, and zone flag …
derrickmehaffy Mar 11, 2026
1eb62c5
feat(i18n): localize player member and browser entry templates
derrickmehaffy Mar 11, 2026
feab965
feat(i18n): localize admin member entries and player info page
derrickmehaffy Mar 11, 2026
0d20d6b
feat(i18n): localize player invite and relation entry templates
derrickmehaffy Mar 11, 2026
2b6a713
feat(i18n): localize all hardcoded Java strings in GUI pages
derrickmehaffy Mar 11, 2026
073e8ac
feat(i18n): localize admin nav bar title and economy entry buttons
derrickmehaffy Mar 11, 2026
3efaa51
feat(i18n): localize remaining hardcoded fallbacks and format strings
derrickmehaffy Mar 11, 2026
d7078dd
fix(i18n): resolve Spanish truncation, crashes, and missing translati…
derrickmehaffy Mar 11, 2026
4d152f5
i18n: add German (de-DE) translations
derrickmehaffy Mar 13, 2026
334be6d
i18n: add French (fr-FR) translations
derrickmehaffy Mar 13, 2026
412dbab
i18n: add Brazilian Portuguese (pt-BR) translations
derrickmehaffy Mar 13, 2026
28a362a
i18n: add Simplified Chinese (zh-CN) translations
derrickmehaffy Mar 13, 2026
89b153d
i18n: add Japanese (ja-JP) translations
derrickmehaffy Mar 13, 2026
56bacc7
i18n: add Russian (ru-RU) translations
derrickmehaffy Mar 13, 2026
725ae9c
i18n: add Korean (ko-KR) translations
derrickmehaffy Mar 13, 2026
62b33a1
i18n: add Polish (pl-PL) translations
derrickmehaffy Mar 13, 2026
a951175
i18n: add Italian (it-IT) translations
derrickmehaffy Mar 13, 2026
5d9e7f5
i18n: add Dutch (nl-NL) translations
derrickmehaffy Mar 13, 2026
0fb07ce
i18n: add Filipino/Tagalog (tl-PH) translations
derrickmehaffy Mar 13, 2026
8ad07b7
i18n: add all 13 locales to settings dropdown and CI verification
derrickmehaffy Mar 13, 2026
f13d530
i18n: remove zh-CN, ja-JP, ko-KR locales
derrickmehaffy Mar 13, 2026
f38cfd3
i18n: add French (fr-FR) help file translations
derrickmehaffy Mar 13, 2026
425cf98
i18n: add Brazilian Portuguese (pt-BR) help file translations
derrickmehaffy Mar 13, 2026
4d95638
i18n: add Russian (ru-RU) help file translations
derrickmehaffy Mar 13, 2026
c88198a
i18n: add Italian (it-IT) help file translations
derrickmehaffy Mar 13, 2026
00e8365
i18n: add Polish (pl-PL) help file translations
derrickmehaffy Mar 13, 2026
760fd61
i18n: add German (de-DE) help file translations
derrickmehaffy Mar 13, 2026
9151dca
i18n: add Dutch (nl-NL) help file translations
derrickmehaffy Mar 13, 2026
af0d97a
i18n: add Filipino/Tagalog (tl-PH) help file translations
derrickmehaffy Mar 13, 2026
1fed61c
ci: add help file verification to check-translations workflow
derrickmehaffy Mar 13, 2026
51d1730
Merge branch 'main' into feat/i18n
derrickmehaffy Mar 13, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
171 changes: 171 additions & 0 deletions .github/workflows/check-translations.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
name: Check Translations

on:
pull_request:
paths:
- 'src/main/resources/Server/Languages/**'

jobs:
check-lang-keys:
name: Verify .lang keys
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Check for missing translation keys
run: |
LANG_DIR="src/main/resources/Server/Languages"
EN_DIR="$LANG_DIR/en-US"
EXIT_CODE=0
TOTAL_MISSING=0

if [ ! -d "$EN_DIR" ]; then
echo "::error::No en-US directory found at $EN_DIR"
exit 1
fi

# Collect en-US keys per file
for en_file in "$EN_DIR"/*.lang; do
[ -f "$en_file" ] || continue
filename=$(basename "$en_file")

# Extract keys (non-blank, non-comment lines before '=')
en_keys=$(grep -v '^\s*#' "$en_file" | grep -v '^\s*$' | sed 's/=.*//' | sed 's/\s*$//' | sort)
en_count=$(echo "$en_keys" | wc -l)

# Check each locale
for locale_dir in "$LANG_DIR"/*/; do
locale=$(basename "$locale_dir")
[ "$locale" = "en-US" ] && continue

locale_file="$locale_dir/$filename"

if [ ! -f "$locale_file" ]; then
echo "::error file=$locale_file::[$locale] MISSING FILE: $filename ($en_count keys)"
TOTAL_MISSING=$((TOTAL_MISSING + en_count))
EXIT_CODE=1
continue
fi

# Extract locale keys
locale_keys=$(grep -v '^\s*#' "$locale_file" | grep -v '^\s*$' | sed 's/=.*//' | sed 's/\s*$//' | sort)

# Find missing keys
missing=$(comm -23 <(echo "$en_keys") <(echo "$locale_keys"))

if [ -n "$missing" ]; then
count=$(echo "$missing" | wc -l)
echo "::warning file=$locale_file::[$locale] $filename: $count missing key(s)"
echo "$missing" | while read -r key; do
echo " - $key"
done
TOTAL_MISSING=$((TOTAL_MISSING + count))
EXIT_CODE=1
fi

# Find extra keys (in locale but not in en-US)
extra=$(comm -13 <(echo "$en_keys") <(echo "$locale_keys"))
if [ -n "$extra" ]; then
extra_count=$(echo "$extra" | wc -l)
echo "::notice file=$locale_file::[$locale] $filename: $extra_count extra key(s) not in en-US"
fi
done
done

echo ""
if [ $TOTAL_MISSING -gt 0 ]; then
echo "::error::Total missing keys across all locales: $TOTAL_MISSING"
else
echo "All locales have complete .lang key coverage."
fi

exit $EXIT_CODE

check-help-files:
name: Verify help files
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Check for missing help files
run: |
LANG_DIR="src/main/resources/Server/Languages"
EN_HELP="$LANG_DIR/en-US/help"
EXIT_CODE=0
TOTAL_MISSING=0

if [ ! -d "$EN_HELP" ]; then
echo "::error::No en-US/help directory found at $EN_HELP"
exit 1
fi

# Collect all en-US help file relative paths
en_files=$(cd "$EN_HELP" && find . -name "*.md" -type f | sort)
en_count=$(echo "$en_files" | wc -l)
echo "Found $en_count help files in en-US"

# Check each locale
for locale_dir in "$LANG_DIR"/*/; do
locale=$(basename "$locale_dir")
[ "$locale" = "en-US" ] && continue

locale_help="$locale_dir/help"

if [ ! -d "$locale_help" ]; then
echo "::error file=$locale_help::[$locale] MISSING help/ directory ($en_count files)"
TOTAL_MISSING=$((TOTAL_MISSING + en_count))
EXIT_CODE=1
continue
fi

# Check each en-US help file exists in locale
missing_files=""
missing_count=0
while IFS= read -r relpath; do
locale_file="$locale_help/$relpath"
if [ ! -f "$locale_file" ]; then
missing_files="$missing_files - $relpath"$'\n'
missing_count=$((missing_count + 1))
fi
done <<< "$en_files"

if [ $missing_count -gt 0 ]; then
echo "::error file=$locale_help::[$locale] $missing_count missing help file(s)"
echo "$missing_files"
TOTAL_MISSING=$((TOTAL_MISSING + missing_count))
EXIT_CODE=1
fi

# Check for untranslated files (identical to en-US)
untranslated=0
while IFS= read -r relpath; do
locale_file="$locale_help/$relpath"
en_file="$EN_HELP/$relpath"
if [ -f "$locale_file" ] && cmp -s "$en_file" "$locale_file"; then
untranslated=$((untranslated + 1))
fi
done <<< "$en_files"

if [ $untranslated -gt 0 ]; then
echo "::warning file=$locale_help::[$locale] $untranslated help file(s) identical to en-US (possibly untranslated)"
fi

# Check for extra files not in en-US
if [ -d "$locale_help" ]; then
locale_files=$(cd "$locale_help" && find . -name "*.md" -type f | sort)
extra=$(comm -13 <(echo "$en_files") <(echo "$locale_files"))
if [ -n "$extra" ]; then
extra_count=$(echo "$extra" | wc -l)
echo "::notice file=$locale_help::[$locale] $extra_count extra help file(s) not in en-US"
fi
fi
done

echo ""
if [ $TOTAL_MISSING -gt 0 ]; then
echo "::error::Total missing help files across all locales: $TOTAL_MISSING"
else
echo "All locales have complete help file coverage."
fi

exit $EXIT_CODE
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
.gradle/
build/
!gradle/wrapper/gradle-wrapper.jar
!src/main/java/com/hyperfactions/build/

# IDE
.idea/
Expand Down
84 changes: 84 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,85 @@ public final class BuildInfo {
}
}

// Generate help .lang files from markdown sources
tasks.register('generateHelpLang', JavaExec) {
group = 'build'
description = 'Generate help .lang files from markdown sources'
dependsOn 'compileJava'
classpath = sourceSets.main.compileClasspath + files(sourceSets.main.java.classesDirectory)
mainClass = 'com.hyperfactions.build.HelpLangGenerator'
args = [
file('src/main/resources/Server/Languages').absolutePath,
layout.buildDirectory.dir('generated/resources').get().asFile.absolutePath
]
inputs.dir(file('src/main/resources/Server/Languages'))
outputs.dir(layout.buildDirectory.dir('generated/resources'))
}

sourceSets.main.resources.srcDir(layout.buildDirectory.dir('generated/resources'))

// Check translations: compare keys in en-US against other locales
tasks.register('checkTranslations') {
group = 'verification'
description = 'Report missing translation keys compared to en-US'
doLast {
def langDir = file('src/main/resources/Server/Languages')
def enDir = new File(langDir, 'en-US')
if (!enDir.exists()) {
println "No en-US directory found at ${enDir.absolutePath}"
return
}
// Collect en-US keys per file
def enKeys = [:]
enDir.listFiles({ f -> f.name.endsWith('.lang') } as FileFilter).each { f ->
def keys = []
f.eachLine { line ->
line = line.trim()
if (line && !line.startsWith('#') && line.contains('=')) {
keys << line.substring(0, line.indexOf('=')).trim()
}
}
enKeys[f.name] = keys
}
// Check each locale
def locales = langDir.listFiles({ f -> f.isDirectory() && f.name != 'en-US' } as FileFilter)
if (!locales) {
println "No non-English locales found."
return
}
def totalMissing = 0
locales.sort { it.name }.each { localeDir ->
def localeMissing = 0
enKeys.each { fileName, keys ->
def localeFile = new File(localeDir, fileName)
if (!localeFile.exists()) {
println "[${localeDir.name}] MISSING FILE: ${fileName} (${keys.size()} keys)"
localeMissing += keys.size()
return
}
def localeKeys = []
localeFile.eachLine { line ->
line = line.trim()
if (line && !line.startsWith('#') && line.contains('=')) {
localeKeys << line.substring(0, line.indexOf('=')).trim()
}
}
def missing = keys.findAll { !localeKeys.contains(it) }
if (missing) {
println "[${localeDir.name}] ${fileName}: ${missing.size()} missing keys"
missing.each { println " - ${it}" }
localeMissing += missing.size()
}
}
if (localeMissing == 0) {
println "[${localeDir.name}] All keys present"
}
totalMissing += localeMissing
}
println "\nTotal missing keys across all locales: ${totalMissing}"
}
}

// Expand version placeholder in manifest.json
processResources {
def ver = buildVersion
Expand Down Expand Up @@ -192,6 +271,11 @@ javadoc {
failOnError = false
}

// Ensure help lang files are generated before processResources copies them
tasks.named('processResources') {
dependsOn 'generateHelpLang'
}

// Ensure build info is generated and HyperPerms shadowJar is built before compiling
tasks.named('compileJava') {
dependsOn 'generateBuildInfo'
Expand Down
Loading
Loading