diff --git a/bun.lockb b/bun.lockb index 3f29711..8ac131c 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index d2808ac..eebcd80 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,5 @@ { - "name": "GitHub: Better Line Counts", - "description": "Remove generated files from GitHub line counts", + "name": "github-better-line-counts", "private": true, "version": "1.7.0", "packageManager": "bun@1.1.31", @@ -37,6 +36,8 @@ "@types/chrome": "^0.0.269", "@types/jsdom": "^21.1.3", "@vitest/coverage-v8": "^2.1.3", + "@wxt-dev/auto-icons": "^1.0.2", + "@wxt-dev/i18n": "^0.2.0", "@wxt-dev/module-vue": "^1.0.0", "autoprefixer": "^10.4.16", "env-cmd": "^10.1.0", diff --git a/src/public/icon/128.png b/src/assets/icon.png similarity index 100% rename from src/public/icon/128.png rename to src/assets/icon.png diff --git a/src/components/CommitDiff.ts b/src/components/CommitDiff.ts index 2525960..a1bcd27 100644 --- a/src/components/CommitDiff.ts +++ b/src/components/CommitDiff.ts @@ -7,7 +7,7 @@ export const CommitDiff = createDiffComponent({ const container = this.getDeletionsElement()?.parentElement; container?.appendChild(spinner); }, - getAdditionsText: (count) => `${count} additions`, - getDeletionsText: (count) => `${count} deletions`, - getGeneratedText: (count) => `${count} generated lines.`, + getAdditionsText: (count) => i18n.t("diffs.additionsText", count), + getDeletionsText: (count) => i18n.t("diffs.deletionsText", count), + getGeneratedText: (count) => i18n.t("diffs.generatedText", count), }); diff --git a/src/components/CompareDiff.ts b/src/components/CompareDiff.ts index c909552..9d52728 100644 --- a/src/components/CompareDiff.ts +++ b/src/components/CompareDiff.ts @@ -7,7 +7,7 @@ export const CompareDiff = createDiffComponent({ const container = this.getDeletionsElement()?.parentElement; container?.appendChild(spinner); }, - getAdditionsText: (count) => `${count} additions`, - getDeletionsText: (count) => `${count} deletions`, - getGeneratedText: (count) => `${count} generated lines.`, + getAdditionsText: (count) => i18n.t("diffs.additionsText", count), + getDeletionsText: (count) => i18n.t("diffs.deletionsText", count), + getGeneratedText: (count) => i18n.t("diffs.generatedText", count), }); diff --git a/src/components/CustomListItem.vue b/src/components/CustomListItem.vue index ef06dce..1aa6f76 100644 --- a/src/components/CustomListItem.vue +++ b/src/components/CustomListItem.vue @@ -1,5 +1,5 @@ diff --git a/src/components/OptionsForm.vue b/src/components/OptionsForm.vue index 1866495..da0c2a4 100644 --- a/src/components/OptionsForm.vue +++ b/src/components/OptionsForm.vue @@ -31,6 +31,8 @@ const { state, hasChanges, reset, saveChanges } = useForm<{ await commitHashDiffsCache.clear(); }, ); + +const { t } = i18n;