chore: Migrate l10n repo to the main repository, p=#9662, c=l10n

This commit is contained in:
mr. m
2025-07-28 14:26:41 +02:00
committed by GitHub
parent e5d4e91e61
commit 36a84261b3
366 changed files with 18782 additions and 18 deletions

View File

@@ -31,7 +31,7 @@ def copy_browser_locales(lang_id: str):
os.remove(os.path.join(root, file))
# Copy files from the source directory
source_path = "./l10n/en-US/browser/"
source_path = "./locales/en-US/browser/"
copy_files(source_path, lang_path)
return
@@ -39,7 +39,7 @@ def copy_browser_locales(lang_id: str):
if os.path.exists(lang_path):
shutil.rmtree(lang_path) # Remove existing directory
source_path = f"./l10n/{lang_id}/"
source_path = f"./locales/{lang_id}/"
copy_files(source_path, lang_path)

View File

@@ -8,9 +8,9 @@ if ! [ -z "$ZEN_L10N_CURR_DIR" ]; then
cd $ZEN_L10N_CURR_DIR
fi
# remove "\r" from ./l10n/supported-languages
# remove "\r" from ./locales/supported-languages
# note: it's fine if it fails
sed -i 's/\r$//' ./l10n/supported-languages
sed -i 's/\r$//' ./locales/supported-languages
CURRENT_DIR=$(pwd)
@@ -21,7 +21,7 @@ cd $CURRENT_DIR
LAST_FIREFOX_L10N_COMMIT=$(cat ./build/firefox-cache/l10n-last-commit-hash)
cd ./l10n
cd ./locales
rm -rf firefox-l10n
# clone only from LAST_FIREFOX_L10N_COMMIT
git clone https://github.com/mozilla-l10n/firefox-l10n
@@ -41,15 +41,15 @@ set -e
update_language() {
langId=$1
cd ./l10n
cd ./locales
cd $langId
echo "Updating $langId"
# move the contents from ../firefox-l10n/$langId to ./l10n/$langId
# move the contents from ../firefox-l10n/$langId to ./locales/$langId
# if rsync exists, use it
# if not, use cp
if [ -z "$rsyncExists" ]; then
cp -r $CURRENT_DIR/l10n/firefox-l10n/$langId/* .
cp -r $CURRENT_DIR/locales/firefox-l10n/$langId/* .
else
rsync -av --progress ../firefox-l10n/$langId/ . --exclude .git
fi
@@ -58,7 +58,7 @@ update_language() {
}
export PATH=~/tools/git-cinnabar:$PATH
for lang in $(cat ./l10n/supported-languages); do
for lang in $(cat ./locales/supported-languages); do
update_language $lang
done
cd $CURRENT_DIR
@@ -66,7 +66,7 @@ cd $CURRENT_DIR
# Move all the files to the correct location
python3 scripts/copy_language_pack.py en-US
for lang in $(cat ./l10n/supported-languages); do
for lang in $(cat ./locales/supported-languages); do
python3 scripts/copy_language_pack.py $lang
done
@@ -76,9 +76,9 @@ echo "Cleaning up"
rm -rf ~/tools
rm -rf ~/.git-cinnabar
for lang in $(cat ./l10n/supported-languages); do
for lang in $(cat ./locales/supported-languages); do
# remove every file except if it starts with "zen"
find ./l10n/$lang -type f -not -name "zen*" -delete
find ./locales/$lang -type f -not -name "zen*" -delete
done
rm -rf ./l10n/firefox-l10n
rm -rf ./locales/firefox-l10n