Skip to content

armgit / VERT

Public Imported from GitHub
0

The next-generation file converter. Open source, fully local* and free forever.

add pt-BR configs

Murilo Schunke333f59feeca3
diff --git a/project.inlang/settings.json b/project.inlang/settings.json
index 14adc9c..071b43f 100644
--- a/project.inlang/settings.json
+++ b/project.inlang/settings.json
@@ -1,7 +1,22 @@
{
"$schema": "https://inlang.com/schema/project-settings",
"baseLocale": "en",
- "locales": ["en", "es", "fr", "de", "it", "hr", "tr", "ja", "ko", "el", "id", "zh-Hans", "zh-Hant"],
+ "locales": [
+ "en",
+ "es",
+ "fr",
+ "de",
+ "it",
+ "hr",
+ "tr",
+ "ja",
+ "ko",
+ "el",
+ "id",
+ "zh-Hans",
+ "zh-Hant",
+ "pt-BR"
+ ],
"modules": [
"https://cdn.jsdelivr.net/npm/@inlang/plugin-message-format@4/dist/index.js",
"https://cdn.jsdelivr.net/npm/@inlang/plugin-m-function-matcher@2/dist/index.js"
diff --git a/src/lib/store/index.svelte.ts b/src/lib/store/index.svelte.ts
index 9a7e689..2fe6a46 100644
--- a/src/lib/store/index.svelte.ts
+++ b/src/lib/store/index.svelte.ts
@@ -126,11 +126,9 @@ class Files {
// check if completely transparent
const imageData = ctx.getImageData(0, 0, canvas.width, canvas.height);
- const isTransparent = Array.from(imageData.data).every(
- (value, index) => {
- return (index + 1) % 4 !== 0 || value === 0;
- },
- );
+ const isTransparent = Array.from(imageData.data).every((value, index) => {
+ return (index + 1) % 4 !== 0 || value === 0;
+ });
if (isTransparent) {
canvas.remove();
return undefined;
@@ -177,8 +175,7 @@ class Files {
}
const converterCount = convertersUsed.size;
- const canConvertAsOne =
- converterCount === 1 && !incompatibleFiles;
+ const canConvertAsOne = converterCount === 1 && !incompatibleFiles;
log(
["files"],
@@ -274,9 +271,7 @@ class Files {
}
const converter = converters
.sort(byNative(format))
- .find((converter) =>
- converter.formatStrings().includes(format),
- );
+ .find((converter) => converter.formatStrings().includes(format));
if (!converter) {
log(["files"], `no converter found for ${file.name}`);
this.files.push(new VertFile(file, format));
@@ -317,10 +312,7 @@ class Files {
action: () => {
this.files = [
...this.files.filter(
- (f) =>
- !f.converters
- .map((c) => c.name)
- .includes("vertd"),
+ (f) => !f.converters.map((c) => c.name).includes("vertd"),
),
];
this._warningShown = false;
@@ -329,10 +321,7 @@ class Files {
{
text: m["convert.external_warning.yes"](),
action: () => {
- localStorage.setItem(
- "acceptedExternalWarning",
- "true",
- );
+ localStorage.setItem("acceptedExternalWarning", "true");
this._warningShown = false;
},
},
@@ -348,14 +337,7 @@ class Files {
public add(file: VertFile[] | null | undefined): void;
public add(file: FileList | null | undefined): void;
public add(
- file:
- | VertFile
- | File
- | VertFile[]
- | File[]
- | FileList
- | null
- | undefined,
+ file: VertFile | File | VertFile[] | File[] | FileList | null | undefined,
) {
if (!file) return;
if (Array.isArray(file) || file instanceof FileList) {
@@ -470,6 +452,7 @@ export const availableLocales = {
el: "Ελληνικά",
"zh-Hans": "简体中文",
"zh-Hant": "繁體中文",
+ "pt-BR": "Português (Brasil)",
};
export function updateLocale(newLocale: string) {
@@ -567,10 +550,7 @@ export const getMaxArrayBufferSize = (): number => {
const cached = localStorage.getItem("maxArrayBufferSize");
if (cached) {
const parsed = Number(cached);
- log(
- ["converters"],
- `using cached max ArrayBuffer size: ${parsed} bytes`,
- );
+ log(["converters"], `using cached max ArrayBuffer size: ${parsed} bytes`);
if (!isNaN(parsed) && parsed > 0) return parsed;
}