-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
16 changed files
with
59 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
## Deprecated Assets | ||
|
||
##### 2024-11-21 | ||
|
||
- Old launcher has been deprecated due to it not supporting non-Linux platforms, and for using FF's debugging protocol to load addons [#90](https://github.com/daijro/camoufox/issues/90). | ||
- `generate-locales.sh` (based on [LibreWolf's locale build system](https://gitlab.com/librewolf-community/browser/source/-/blob/3dc56de7b0665724bf3842198cebe961c42a81e0/scripts/generate-locales.sh)) was deprecated due to "Camoufox" leaking to the page [#90](https://github.com/daijro/camoufox/issues/90). |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/usr/bin/bash | ||
|
||
if [ ! -f browser/locales/shipped-locales ]; then | ||
echo "ERROR: Run this script from the root of the Camoufox source code" | ||
exit 1 | ||
fi | ||
|
||
rm -rf browser/locales/l10n | ||
mkdir browser/locales/l10n | ||
|
||
N=8 | ||
for i in $(seq $N); do echo; done | ||
total=$(wc -l < browser/locales/shipped-locales) | ||
|
||
echo_status() { | ||
printf "\033[$((($N - $n) + 1))A$@ %40s\r\033[$((($N - $n) + 1))B" | ||
} | ||
|
||
generate_locale() { | ||
if echo " en-US ca ja " | grep -q " $1 "; then | ||
echo_status "Skipping locale \"$1\"" | ||
sleep 1 | ||
echo_status | ||
return | ||
fi | ||
echo_status "Downloading locale \"$1\"" | ||
wget -q -O browser/locales/l10n/$1.zip https://hg.mozilla.org/l10n-central/$1/archive/tip.zip | ||
echo_status "Extracting locale \"$1\"" | ||
7z x -y -obrowser/locales/l10n browser/locales/l10n/$1.zip > /dev/null | ||
mv browser/locales/l10n/$1-*/ browser/locales/l10n/$1/ | ||
rm -f browser/locales/l10n/$1.zip | ||
echo_status "Generating locale \"$1\"" | ||
mv browser/locales/l10n/$1/browser/branding/official browser/locales/l10n/$1/browser/branding/camoufox | ||
find browser/locales/l10n/$1 -type f -exec sed -i -e 's/Mozilla Firefox/Camoufox/g' {} \; | ||
find browser/locales/l10n/$1 -type f -exec sed -i -e 's/Mozilla/Camoufox/g' {} \; | ||
find browser/locales/l10n/$1 -type f -exec sed -i -e 's/Firefox/Camoufox/g' {} \; | ||
echo_status "Done" | ||
sleep 0.3 | ||
echo_status | ||
} | ||
|
||
while read in; do | ||
((n=n%N)); ((n++==0)) && wait | ||
generate_locale $in & | ||
done < browser/locales/shipped-locales | ||
|
||
wait | ||
|
||
printf "\033[$(($N))A\rGenerated $total locales %-40s\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters