This PR syncs the weblate branch back to main, and adds: - New Spanish translations contributed in weblate! - New GH action which reformats weblate commits with `localize:extract`, ensuring strings are not changed, and also runs `localize:build` to extract templates (as tested in PR: #2207) - Reformats existing XLIFF files to match `localize:extract`, including adding self-closing tags. - Update on generated templates - Prettier: disable alpha sorting XML attributes to hopefully minimize conflcits - Strings: change some strings that use `&` to be wrapped in html`` to ensure proper unencoding, or just switch to 'and' where that's not possible. --------- Co-authored-by: Weblate (bot) <hosted@weblate.org> Co-authored-by: Webrecorder Dev <dev@webrecorder.org> Co-authored-by: Kamborio <Kamborio15@users.noreply.hosted.weblate.org> Co-authored-by: Clara Itzel <missclaraitzel@gmail.com> Co-authored-by: weblate <weblate@users.noreply.github.com> Co-authored-by: emma <hi@emma.cafe> Co-authored-by: sua yoo <sua@webrecorder.org>
42 lines
889 B
JavaScript
42 lines
889 B
JavaScript
/** @type {import("@ianvs/prettier-plugin-sort-imports").PrettierConfig} */
|
|
module.exports = {
|
|
plugins: [
|
|
"@ianvs/prettier-plugin-sort-imports",
|
|
"@prettier/plugin-xml",
|
|
"prettier-plugin-tailwindcss",
|
|
],
|
|
tailwindFunctions: ["tw"],
|
|
importOrder: [
|
|
"<BUILTIN_MODULES>",
|
|
"",
|
|
"<THIRD_PARTY_MODULES>",
|
|
"",
|
|
// Parent directory items
|
|
"^\\.\\.$",
|
|
"^\\.\\.(/.+)$",
|
|
"",
|
|
// This directory items
|
|
"^\\.(/.+)$",
|
|
"",
|
|
"^\\.$",
|
|
"",
|
|
"^@/(.*)$",
|
|
"^~assets/(.*)",
|
|
"",
|
|
],
|
|
importOrderParserPlugins: ["typescript", "decorators-legacy"],
|
|
overrides: [
|
|
{
|
|
files: "**/*.xlf",
|
|
options: {
|
|
parser: "xml",
|
|
proseWrap: "never",
|
|
printWidth: Infinity,
|
|
xmlSortAttributesByKey: false,
|
|
xmlWhitespaceSensitivity: "preserve",
|
|
xmlSelfClosingSpace: false,
|
|
},
|
|
},
|
|
],
|
|
};
|