mirror of
https://github.com/opf/openproject.git
synced 2026-06-14 03:30:14 +00:00
less repetition in script fixing pt root keys
This commit is contained in:
@@ -1,10 +1,11 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
echo "Fixing language root key in pt-BR and pt-PT crowdin files to match the filename"
|
|
||||||
if [ "$(uname -s)" = "Darwin" ]; then
|
if [ "$(uname -s)" = "Darwin" ]; then
|
||||||
sed -i '' 's/^pt:/pt-BR:/' config/locales/crowdin/*pt-BR*.yml modules/*/config/locales/crowdin/*pt-BR*.yml
|
sed_inplace() { sed -i '' "$@"; }
|
||||||
sed -i '' 's/^pt:/pt-PT:/' config/locales/crowdin/*pt-PT*.yml modules/*/config/locales/crowdin/*pt-PT*.yml
|
|
||||||
else
|
else
|
||||||
sed -i 's/^pt:/pt-BR:/' config/locales/crowdin/*pt-BR*.yml modules/*/config/locales/crowdin/*pt-BR*.yml
|
sed_inplace() { sed -i "$@"; }
|
||||||
sed -i 's/^pt:/pt-PT:/' config/locales/crowdin/*pt-PT*.yml modules/*/config/locales/crowdin/*pt-PT*.yml
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Fixing language root key in pt-BR and pt-PT crowdin files to match the filename"
|
||||||
|
sed_inplace 's/^pt:/pt-BR:/' config/locales/crowdin/*pt-BR*.yml modules/*/config/locales/crowdin/*pt-BR*.yml
|
||||||
|
sed_inplace 's/^pt:/pt-PT:/' config/locales/crowdin/*pt-PT*.yml modules/*/config/locales/crowdin/*pt-PT*.yml
|
||||||
|
|||||||
Reference in New Issue
Block a user