Skip to content

Commit 63ac389

Browse files
committed
fix: Update Crowdin configuration to prevent directory prefixing
Problem: - PR #45 created translations in wrong structure: {lang}/Resources/Private/Language/ - Should be: Resources/Private/Language/{lang}.{filename}.xlf Root cause: - Missing preserve_hierarchy directive caused Crowdin to prepend language codes as base directories - Relative paths instead of absolute paths - Not using proper placeholders for dynamic file handling Changes: - Added preserve_hierarchy: 1 to prevent language directory prefixing - Updated to wildcard pattern with absolute paths (/Resources/...) - Implemented %original_path% and %original_file_name% placeholders - Added ignore directive to exclude existing translations from re-translation This ensures future Crowdin syncs create translations at: Resources/Private/Language/{lang}.{filename}.xlf ✓ Not at: {lang}/Resources/Private/Language/{lang}.{filename}.xlf ✗ Note: Filename remains crowdin.yml (Crowdin default) - .crowdin.yml would require additional configuration in Crowdin project settings. Reference: https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/Localization/TranslationServer/Crowdin/
1 parent 520a30f commit 63ac389

File tree

1 file changed

+14
-10
lines changed

1 file changed

+14
-10
lines changed

crowdin.yml

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,19 @@
11
# TYPO3 Crowdin Integration
22
# This extension is part of the TYPO3 translation project: https://crowdin.com/project/typo3-cms
33
# Translations are managed centrally - no project credentials needed
4+
#
5+
# Official documentation: https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/Localization/TranslationServer/Crowdin/
6+
#
7+
# Configuration syntax updated to TYPO3 standards (2024):
8+
# - preserve_hierarchy: Prevents language code from being used as base directory
9+
# - Absolute paths with leading slashes (/)
10+
# - %original_path% and %original_file_name% placeholders for correct file placement
11+
# - ignore: Excludes existing translation files from re-translation
12+
13+
preserve_hierarchy: 1
414

515
files:
6-
- source: Resources/Private/Language/locallang.xlf
7-
translation: Resources/Private/Language/%two_letters_code%.locallang.xlf
8-
- source: Resources/Private/Language/locallang_db.xlf
9-
translation: Resources/Private/Language/%two_letters_code%.locallang_db.xlf
10-
- source: Resources/Private/Language/locallang_mod.xlf
11-
translation: Resources/Private/Language/%two_letters_code%.locallang_mod.xlf
12-
- source: Resources/Private/Language/locallang_mod_sync.xlf
13-
translation: Resources/Private/Language/%two_letters_code%.locallang_mod_sync.xlf
14-
- source: Resources/Private/Language/locallang_mod_textdb.xlf
15-
translation: Resources/Private/Language/%two_letters_code%.locallang_mod_textdb.xlf
16+
- source: /Resources/Private/Language/*.xlf
17+
translation: /%original_path%/%two_letters_code%.%original_file_name%
18+
ignore:
19+
- /**/%two_letters_code%.%original_file_name%

0 commit comments

Comments
 (0)