From ada387ff9e7b56033054cebecbb16713c145b16b Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 1 Aug 2025 13:42:07 +0200 Subject: [PATCH 1/2] fix(SwiftNextcloudUI): Correctly map de_DE to de version again Signed-off-by: Joas Schilling --- translations/handleSwiftNextcloudUITranslations.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/translations/handleSwiftNextcloudUITranslations.sh b/translations/handleSwiftNextcloudUITranslations.sh index 9f48bf20..3e175aba 100755 --- a/translations/handleSwiftNextcloudUITranslations.sh +++ b/translations/handleSwiftNextcloudUITranslations.sh @@ -20,6 +20,12 @@ tx push -s # pull translations tx pull -f -a +# Use de_DE instead of de +# 1. Remove informal german keys +# 2. Replace formal german with informal german key +# 3. Save again +cat Sources/SwiftNextcloudUI/Localizable.xcstrings | jq '. | del(.strings .[] .localizations .de)' | sed 's/"de_DE": {/"de": {/' > Sources/SwiftNextcloudUI/Localizable.xcstrings + # create git commit and push it git add . git commit -am "fix(l10n): Update translations from Transifex" -s || true From b5e13a097dffc31c4bd1eb761baed9ee5f6994fd Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 1 Aug 2025 14:41:24 +0200 Subject: [PATCH 2/2] fix: Use temporary file as output Signed-off-by: Joas Schilling --- translations/handleSwiftNextcloudUITranslations.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/translations/handleSwiftNextcloudUITranslations.sh b/translations/handleSwiftNextcloudUITranslations.sh index 3e175aba..82bc5b92 100755 --- a/translations/handleSwiftNextcloudUITranslations.sh +++ b/translations/handleSwiftNextcloudUITranslations.sh @@ -23,8 +23,10 @@ tx pull -f -a # Use de_DE instead of de # 1. Remove informal german keys # 2. Replace formal german with informal german key -# 3. Save again -cat Sources/SwiftNextcloudUI/Localizable.xcstrings | jq '. | del(.strings .[] .localizations .de)' | sed 's/"de_DE": {/"de": {/' > Sources/SwiftNextcloudUI/Localizable.xcstrings +# 3. Save as temp file +# 4. Move to original location +cat Sources/SwiftNextcloudUI/Localizable.xcstrings | jq '. | del(.strings .[] .localizations .de)' | sed 's/"de_DE": {/"de": {/' > FixedLocalizable.xcstrings +mv -f FixedLocalizable.xcstrings Sources/SwiftNextcloudUI/Localizable.xcstrings # create git commit and push it git add .