rpl 2.1.0 guesses each file's character encoding instead of assuming
UTF-8, and aborts on some locale files, leaving the script's later
steps unrun. Pin the encoding, and use -exec + so a failure in one of
these passes actually stops the script.
Also drop the ⏎ replacement, which hasn't matched anything since 2013
and would now insert real newlines rather than literal \n, truncating
.properties entries.
(cherry picked from commit 5a6c9245f0)
- Remove duplicate/missorted locales
- Treat empty files in langpacks as missing and use en-US
- Skip empty lines and comments when using en-US file for empty
non-en-US files, in line with Mozilla langpack files
(Or technically 125, but I don't think any strings we need were
removed)
This fixes the Edit and Window menu (except for some macOS Window
strings that seem to come from the system) in non-English locales.
- Properly handle regular vs. Mozilla locale files
- Avoid whitespaces changes as much as possible
- Keep copyright block at top of all Mozilla files
- Bug fixes
All declared Fluent files need to exist for a locale to be used (in a
window?). Since Mozilla code tries to load Fluent files, we need to copy
non-English Mozilla .ftl files to their default effective path (just in
the app omni.ja instead of the toolkit omni.ja).
Fixes#3094
When switching between master and fx102 bogus files were created outside
of the build/ directory. That's because previously we had a symlinked
file itembox.css and now we compile a file itemBox.css into the same
directory. However when running `npm start`, after switching branch, the
symlink still existed and thus when writing a new file, symlink was
followed and output has been written inside a source file instead.
Build system will now run cleanup step first (where it checks if files
frim `.signatures.json` still exist in src), then proceed with build,
so old symlinks will be removed thus producing a valid build.
This problem probably only happened on case-insensitive file-systems
(like default config on macOS HFS+).