mirror of
https://codeberg.org/librewolf/source.git
synced 2024-12-22 05:33:03 -05:00
Fix l10n folder structure
This commit is contained in:
parent
a287b0ff64
commit
8cc562f87a
3 changed files with 15 additions and 9 deletions
|
@ -17,7 +17,7 @@ ac_add_options --with-branding=browser/branding/librewolf
|
||||||
|
|
||||||
ac_add_options --with-unsigned-addon-scopes=app,system
|
ac_add_options --with-unsigned-addon-scopes=app,system
|
||||||
|
|
||||||
ac_add_options --with-l10n-base=$PWD/browser/locales
|
ac_add_options --with-l10n-base=$PWD/lw/l10n
|
||||||
|
|
||||||
ac_add_options --enable-bootstrap
|
ac_add_options --enable-bootstrap
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ ac_add_options --with-branding=browser/branding/librewolf
|
||||||
|
|
||||||
ac_add_options --with-unsigned-addon-scopes=app,system
|
ac_add_options --with-unsigned-addon-scopes=app,system
|
||||||
|
|
||||||
ac_add_options --with-l10n-base=$PWD/browser/locales/l10n
|
ac_add_options --with-l10n-base=$PWD/lw/l10n
|
||||||
|
|
||||||
export MOZ_REQUIRE_SIGNING=
|
export MOZ_REQUIRE_SIGNING=
|
||||||
|
|
||||||
|
|
|
@ -151,11 +151,11 @@ def librewolf_patches():
|
||||||
with TemporaryDirectory() as tmpdir:
|
with TemporaryDirectory() as tmpdir:
|
||||||
exec(f"wget -qO {tmpdir}/l10n.zip 'https://codeload.github.com/mozilla-l10n/firefox-l10n/zip/refs/heads/main'")
|
exec(f"wget -qO {tmpdir}/l10n.zip 'https://codeload.github.com/mozilla-l10n/firefox-l10n/zip/refs/heads/main'")
|
||||||
exec(f"unzip -qo {tmpdir}/l10n.zip -d {tmpdir}/l10n")
|
exec(f"unzip -qo {tmpdir}/l10n.zip -d {tmpdir}/l10n")
|
||||||
exec(f"mv {tmpdir}/l10n/firefox-l10n-main/* browser/locales")
|
exec(f"mv {tmpdir}/l10n/firefox-l10n-main lw/l10n")
|
||||||
|
|
||||||
print("-> Patching appstrings.properties")
|
print("-> Patching appstrings.properties")
|
||||||
# Why is "Firefox" hardcoded there???
|
# Why is "Firefox" hardcoded there???
|
||||||
exec("find browser/locales -path '*/appstrings.properties' -exec sed -i s/Firefox/LibreWolf/ {} \;")
|
exec("find . -path '*/appstrings.properties' -exec sed -i s/Firefox/LibreWolf/ {} \;")
|
||||||
|
|
||||||
print("-> Applying LibreWolf locales")
|
print("-> Applying LibreWolf locales")
|
||||||
l10n_dir = Path("..", "l10n")
|
l10n_dir = Path("..", "l10n")
|
||||||
|
@ -164,11 +164,17 @@ def librewolf_patches():
|
||||||
continue
|
continue
|
||||||
|
|
||||||
rel_path = source_path.relative_to(l10n_dir)
|
rel_path = source_path.relative_to(l10n_dir)
|
||||||
|
if rel_path.parts[0] == "en-US":
|
||||||
target_path = Path(
|
target_path = Path(
|
||||||
"browser", "locales",
|
rel_path.parts[1],
|
||||||
rel_path.parts[0],
|
"locales", "en-US",
|
||||||
*([] if rel_path.parts[0] == "en-US" else ["browser"]) ,
|
*rel_path.parts[1:]
|
||||||
*rel_path.parts[1:])
|
)
|
||||||
|
else:
|
||||||
|
target_path = Path(
|
||||||
|
"lw", "l10n",
|
||||||
|
*rel_path.parts
|
||||||
|
)
|
||||||
target_path.parent.mkdir(parents=True, exist_ok=True)
|
target_path.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
|
||||||
write_mode = "w"
|
write_mode = "w"
|
||||||
|
|
Loading…
Reference in a new issue