Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Portuguese, Polish 언어 추가 #84

Merged
merged 13 commits into from
Aug 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions public/_locales/pl/messages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": {
"message": "closed caption - Podwójne napisy"
},
"description": {
"message": "Rozszerzenia do wyświetlania napisów w innych językach wraz z istniejącymi napisami"
}
}
8 changes: 8 additions & 0 deletions public/_locales/pt/messages.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"name": {
"message": "legenda fechada - Legendas duplas"
},
"description": {
"message": "Extensões para visualizar legendas noutras línguas juntamente com as legendas existentes"
}
}
34 changes: 34 additions & 0 deletions public/popup.html
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,40 @@
/>
</svg>
</div>
<div data-lang="pl" class="language_wrapper">
<p>Polish</p>
<svg
class="hidden"
height="15"
viewBox="0 0 24 24"
width="15"
xmlns="http://www.w3.org/2000/svg"
>
<path
clip-rule="evenodd"
d="m20.6136 5.64877c.4199.36742.458 1.00751.0845 1.42204l-10.5139 11.66979c-.37544.4167-1.02006.4432-1.42843.0588l-6.08403-5.7276c-.37942-.3572-.41574-.9524-.09021-1.3593.3592-.449 1.02811-.5108 1.4556-.1263l4.72039 4.2459c.41022.369 1.04179.336 1.41138-.0737l9.0435-10.02691c.3659-.40576.99-.44254 1.4012-.08272z"
fill="#ffffff"
fill-rule="evenodd"
/>
</svg>
</div>
<div data-lang="pt" class="language_wrapper">
<p>Portuguese</p>
<svg
class="hidden"
height="15"
viewBox="0 0 24 24"
width="15"
xmlns="http://www.w3.org/2000/svg"
>
<path
clip-rule="evenodd"
d="m20.6136 5.64877c.4199.36742.458 1.00751.0845 1.42204l-10.5139 11.66979c-.37544.4167-1.02006.4432-1.42843.0588l-6.08403-5.7276c-.37942-.3572-.41574-.9524-.09021-1.3593.3592-.449 1.02811-.5108 1.4556-.1263l4.72039 4.2459c.41022.369 1.04179.336 1.41138-.0737l9.0435-10.02691c.3659-.40576.99-.44254 1.4012-.08272z"
fill="#ffffff"
fill-rule="evenodd"
/>
</svg>
</div>
</div>
</div>
<footer class="footer">
Expand Down
2 changes: 2 additions & 0 deletions src/common/isLanguage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,7 @@ export const isLanguage = (language: string): language is LanguageCode => {
"uk",
"vi",
"tr",
"pl",
"pt",
].includes(language);
};
4 changes: 3 additions & 1 deletion src/common/language.types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ export type LanguageCode =
| "th"
| "uk"
| "vi"
| "tr";
| "tr"
| "pl"
| "pt";
4 changes: 4 additions & 0 deletions src/view/popup/LanguageSelectorButtonView.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,8 @@ describe("Language Selector Button View Test", () => {
"uk",
"vi",
"tr",
"pl",
"pt",
];
const LANGUAGES_MAP: Map<LanguageCode, string> = new Map([
["de", "German"],
Expand All @@ -83,6 +85,8 @@ describe("Language Selector Button View Test", () => {
["uk", "Ukrainian"],
["vi", "Vietnamese"],
["tr", "Turkish"],
["pl", "Polish"],
["pt", "Portuguese"],
]);

LANGUAGES.forEach((language) => {
Expand Down
8 changes: 8 additions & 0 deletions src/view/popup/LanguageSelectorButtonView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,14 @@ class LanguageSelectorButtonView extends PopupView {
this.element.textContent = "Turkish";
break;
}
case "pl": {
this.element.textContent = "Polish";
break;
}
case "pt": {
this.element.textContent = "Portuguese";
break;
}
}
};
}
Expand Down