chore: Format XLIFF files (#2074)

Formats XLIFF file to match Weblate per
https://github.com/webrecorder/browsertrix/issues/1416#issuecomment-2344227966
This commit is contained in:
sua yoo 2024-09-11 10:46:39 -07:00 committed by GitHub
parent d3ed78575d
commit f91e32f866
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 3790 additions and 3747 deletions

View File

@ -5,9 +5,9 @@
if git diff --name-only --cached | grep --quiet 'frontend/src/';
then
cd frontend
npx lint-staged
yarn localize:extract
git add xliff
npx lint-staged
else
echo "(no frontend/src changes - skipping pre-commit hook)"
fi

View File

@ -1,5 +1,4 @@
__generated__
__mocks__
xliff
assets
dist

View File

@ -9,6 +9,7 @@
"@lit/localize": "^0.12.1",
"@lit/task": "^1.0.0",
"@novnc/novnc": "^1.4.0-beta",
"@prettier/plugin-xml": "^3.4.1",
"@rollup/plugin-commonjs": "^18.0.0",
"@shoelace-style/shoelace": "~2.15.1",
"@tailwindcss/container-queries": "^0.1.1",
@ -122,7 +123,7 @@
"chromium": "^3.0.3"
},
"lint-staged": {
"*.{ts,js,html,css,json,webmanifest}": "prettier --write"
"*.{ts,js,html,css,json,webmanifest,xlf}": "prettier --write"
},
"husky": {
"hooks": {

View File

@ -2,6 +2,7 @@
module.exports = {
plugins: [
"@ianvs/prettier-plugin-sort-imports",
"@prettier/plugin-xml",
"prettier-plugin-tailwindcss",
],
tailwindFunctions: ["tw"],
@ -24,5 +25,17 @@ module.exports = {
"",
],
importOrderParserPlugins: ["typescript", "decorators-legacy"],
importOrderTypeScriptVersion: "5.0.0",
overrides: [
{
files: "**/*.xlf",
options: {
parser: "xml",
proseWrap: "never",
printWidth: Infinity,
xmlSortAttributesByKey: true,
xmlWhitespaceSensitivity: "preserve",
xmlSelfClosingSpace: false,
},
},
],
};

File diff suppressed because it is too large Load Diff

View File

@ -1284,6 +1284,13 @@
resolved "https://registry.yarnpkg.com/@polka/url/-/url-1.0.0-next.24.tgz#58601079e11784d20f82d0585865bb42305c4df3"
integrity sha512-2LuNTFBIO0m7kKIQvvPHN6UE63VjpmL9rnEEaOOaiSPbZK+zUOYIzBAWcED+3XYzhYsd/0mD57VdxAEqqV52CQ==
"@prettier/plugin-xml@^3.4.1":
version "3.4.1"
resolved "https://registry.yarnpkg.com/@prettier/plugin-xml/-/plugin-xml-3.4.1.tgz#6c3be1184871a983d08c9f81c8a8796f62a19568"
integrity sha512-Uf/6/+9ez6z/IvZErgobZ2G9n1ybxF5BhCd7eMcKqfoWuOzzNUxBipNo3QAP8kRC1VD18TIo84no7LhqtyDcTg==
dependencies:
"@xml-tools/parser" "^1.0.11"
"@replit/codemirror-vim@^6.2.1":
version "6.2.1"
resolved "https://registry.yarnpkg.com/@replit/codemirror-vim/-/codemirror-vim-6.2.1.tgz#6673ff4be93b7da03d303ef37d6cbfa5f647b74b"
@ -2714,6 +2721,13 @@
resolved "https://registry.yarnpkg.com/@webpack-cli/serve/-/serve-1.7.0.tgz#e1993689ac42d2b16e9194376cfb6753f6254db1"
integrity sha512-oxnCNGj88fL+xzV+dacXs44HcDwf1ovs3AuEzvP7mqXw7fQntqIhQ1BRmynh4qEKQSSSRSWVyXRjmTbZIX9V2Q==
"@xml-tools/parser@^1.0.11":
version "1.0.11"
resolved "https://registry.yarnpkg.com/@xml-tools/parser/-/parser-1.0.11.tgz#a118a14099ea5c3c537e4781fad2fc195b57f8ff"
integrity sha512-aKqQ077XnR+oQtHJlrAflaZaL7qZsulWc/i/ZEooar5JiWj1eLt0+Wg28cpa+XLney107wXqneC+oG1IZvxkTA==
dependencies:
chevrotain "7.1.1"
"@xmldom/xmldom@^0.8.2":
version "0.8.6"
resolved "https://registry.npmjs.org/@xmldom/xmldom/-/xmldom-0.8.6.tgz"
@ -3250,6 +3264,13 @@ character-entities@^2.0.0:
resolved "https://registry.yarnpkg.com/character-entities/-/character-entities-2.0.2.tgz#2d09c2e72cd9523076ccb21157dff66ad43fcc22"
integrity sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==
chevrotain@7.1.1:
version "7.1.1"
resolved "https://registry.yarnpkg.com/chevrotain/-/chevrotain-7.1.1.tgz#5122814eafd1585a9601f9180a7be9c42d5699c6"
integrity sha512-wy3mC1x4ye+O+QkEinVJkPf5u2vsrDIYW9G7ZuwFl6v/Yu0LwUuT2POsb+NUWApebyxfkQq6+yDfRExbnI5rcw==
dependencies:
regexp-to-ast "0.5.0"
chokidar@^3.4.2, chokidar@^3.4.3, chokidar@^3.5.3:
version "3.5.3"
resolved "https://registry.npmjs.org/chokidar/-/chokidar-3.5.3.tgz"
@ -7189,6 +7210,11 @@ regex-colorize@^0.0.3:
resolved "https://registry.npmjs.org/regex-colorize/-/regex-colorize-0.0.3.tgz"
integrity sha512-y+GIlZUqhLQ48T1dZ/FRax14lkVZD1NE3/f7xKuBaasiiMLF5T26Ahjym+vswKPDrtMSfElRr+XPAIHx0AT2Hw==
regexp-to-ast@0.5.0:
version "0.5.0"
resolved "https://registry.yarnpkg.com/regexp-to-ast/-/regexp-to-ast-0.5.0.tgz#56c73856bee5e1fef7f73a00f1473452ab712a24"
integrity sha512-tlbJqcMHnPKI9zSrystikWKwHkBqu2a/Sgw01h3zFjvYrMxEDYHzzoMZnUrbIfpTFEsoRnnviOXNCzFiSc54Qw==
relateurl@^0.2.7:
version "0.2.7"
resolved "https://registry.npmjs.org/relateurl/-/relateurl-0.2.7.tgz"