From 16f719386fb83886de8ed0a3fc396838bb763398 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Fri, 1 Aug 2025 17:43:59 +0200 Subject: [PATCH] fix(xcstrings): Remove all languages but English before uploading to transifex Signed-off-by: Joas Schilling --- .../handleSwiftNextcloudUITranslations.sh | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) diff --git a/translations/handleSwiftNextcloudUITranslations.sh b/translations/handleSwiftNextcloudUITranslations.sh index 82bc5b92..66e99c77 100755 --- a/translations/handleSwiftNextcloudUITranslations.sh +++ b/translations/handleSwiftNextcloudUITranslations.sh @@ -14,9 +14,15 @@ gpg --list-keys # fetch git repo git clone git@github.com:nextcloud/swiftnextcloudui /app +# Remove non-english strings from xcstrings before pushing to transifex +cat Sources/SwiftNextcloudUI/Localizable.xcstrings | jq '. | .strings = (.strings | map_values(.localizations = {en: .localizations.en}))' > FixedLocalizable.xcstrings +mv -f FixedLocalizable.xcstrings Sources/SwiftNextcloudUI/Localizable.xcstrings + # push sources tx push -s +git restore Sources/SwiftNextcloudUI/Localizable.xcstrings + # pull translations tx pull -f -a @@ -29,7 +35,11 @@ cat Sources/SwiftNextcloudUI/Localizable.xcstrings | jq '. | del(.strings .[] .l mv -f FixedLocalizable.xcstrings Sources/SwiftNextcloudUI/Localizable.xcstrings # create git commit and push it -git add . -git commit -am "fix(l10n): Update translations from Transifex" -s || true -git push origin main + +git diff + + +#git add . +#git commit -am "fix(l10n): Update translations from Transifex" -s || true +#git push origin main echo "done"