From 7eb1a88fafdc7678a1c3f0b270158633f02df577 Mon Sep 17 00:00:00 2001
From: Valentyne Stigloher
Date: Tue, 30 Apr 2024 22:05:36 +0200
Subject: [PATCH] (style) unified styling for example buttons and tooltips for
accessibility
---
assets/dark.scss | 3 ++-
components/ExampleCategory.vue | 24 ++++++++++++++++--------
components/PronunciationSpeaker.vue | 20 +++++++++++---------
locale/_base/translations.suml | 8 +++++++-
locale/ar/translations.suml | 3 ++-
locale/de/translations.suml | 8 +++++++-
locale/en/translations.suml | 8 +++++++-
locale/eo/translations.suml | 3 ++-
locale/es/translations.suml | 3 ++-
locale/et/translations.suml | 3 ++-
locale/fr/translations.suml | 3 ++-
locale/gl/translations.suml | 3 ++-
locale/he/translations.suml | 3 ++-
locale/it/translations.suml | 3 ++-
locale/ja/translations.suml | 3 ++-
locale/ko/translations.suml | 3 ++-
locale/lad/translations.suml | 3 ++-
locale/nl/translations.suml | 3 ++-
locale/no/translations.suml | 3 ++-
locale/pl/translations.suml | 6 ++++--
locale/pt/translations.suml | 3 ++-
locale/ro/translations.suml | 3 ++-
locale/ru/translations.suml | 3 ++-
locale/sv/translations.suml | 3 ++-
locale/tr/translations.suml | 3 ++-
locale/ua/translations.suml | 3 ++-
locale/vi/translations.suml | 3 ++-
locale/yi/translations.suml | 3 ++-
locale/zh/translations.suml | 3 ++-
routes/any.vue | 2 +-
routes/pronoun.vue | 4 ++--
routes/pronouns.vue | 2 +-
src/missingTranslations.ts | 4 ++++
33 files changed, 106 insertions(+), 49 deletions(-)
diff --git a/assets/dark.scss b/assets/dark.scss
index e96b30571..c8d90748b 100644
--- a/assets/dark.scss
+++ b/assets/dark.scss
@@ -21,7 +21,8 @@ body[data-theme="dark"] {
/* BUTTONS */
- .btn-link { color: #fff; }
+ .btn-link { color: $primary-dark; }
+ .btn-link:hover { color: lighten($primary-dark, 10%); }
.btn-close { filter: invert(1) grayscale(100%) brightness(200%); }
.btn-dark { color: #000; background-color: #f8f9fa; border-color: #f8f9fa; }
.btn-dark:hover { color: #000; background-color: #f9fafb; border-color: #f9fafb; }
diff --git a/components/ExampleCategory.vue b/components/ExampleCategory.vue
index a5989e577..d42328752 100644
--- a/components/ExampleCategory.vue
+++ b/components/ExampleCategory.vue
@@ -1,14 +1,16 @@
-
+
+
+
@@ -42,6 +44,12 @@ export default Vue.extend({
hasDifferentExample(): boolean {
return this.pronounsChoice.length > 1 || this.suitableExamples.length > 1;
},
+ tooltipText(): string {
+ if (this.exampleCategory.name) {
+ return this.$t('pronouns.examples.shuffleNamed', { category: this.exampleCategory.name });
+ }
+ return this.$t('pronouns.examples.shuffle');
+ },
},
created() {
this.selectPronounForExample(false);
diff --git a/components/PronunciationSpeaker.vue b/components/PronunciationSpeaker.vue
index cd2d33796..dddd62398 100644
--- a/components/PronunciationSpeaker.vue
+++ b/components/PronunciationSpeaker.vue
@@ -1,13 +1,15 @@
-
- {{ name }}
-
+
+
+ {{ name }}
+
+
diff --git a/locale/_base/translations.suml b/locale/_base/translations.suml
index 814ba9cbe..f437eff4c 100644
--- a/locale/_base/translations.suml
+++ b/locale/_base/translations.suml
@@ -63,7 +63,10 @@ home:
pronouns:
header: 'Pronouns'
headerLong: 'Pronouns'
- examples: 'Example usage in sentences'
+ examples:
+ header: 'Example usage in sentences'
+ shuffle: 'Show different example'
+ shuffleNamed: 'Show different example for %category%'
plural: 'Plural'
intro: 'My pronouns are'
normative: 'Normative'
@@ -91,6 +94,9 @@ pronouns:
or: 'or'
grammarTable: 'Table'
+pronunciation:
+ play: 'Play audio sample'
+
sources:
header: 'Sources'
headerLong: 'Examples from cultural texts'
diff --git a/locale/ar/translations.suml b/locale/ar/translations.suml
index c52ba5f62..5d0783a04 100644
--- a/locale/ar/translations.suml
+++ b/locale/ar/translations.suml
@@ -58,7 +58,8 @@ home:
pronouns:
header: 'الضمائر'
headerLong: 'الضمائر'
- examples: 'تُستعمل في الجمل كالآتي'
+ examples:
+ header: 'تُستعمل في الجمل كالآتي'
plural: 'صيغة الجمع'
intro: 'ضمائري هي'
normative: 'المعياريه '
diff --git a/locale/de/translations.suml b/locale/de/translations.suml
index 9a877255e..dfc29f515 100644
--- a/locale/de/translations.suml
+++ b/locale/de/translations.suml
@@ -61,7 +61,10 @@ home:
pronouns:
header: 'Pronomen'
headerLong: 'Pronomen'
- examples: 'Beispielsätze'
+ examples:
+ header: 'Beispielsätze'
+ shuffle: 'Anderen Beispielsatz anzeigen'
+ shuffleNamed: 'Anderen Beispielsatz für %category% anzeigen'
plural: 'Plural'
intro: 'Meine Pronomen sind'
normative: 'Normativ'
@@ -94,6 +97,9 @@ pronouns:
or: 'oder'
grammarTable: 'Tabelle'
+pronunciation:
+ play: 'Hörbeispiel abspielen'
+
sources:
header: 'Quellen'
headerLong: 'Beispiele aus Kulturtexten'
diff --git a/locale/en/translations.suml b/locale/en/translations.suml
index ab705003e..11f337a45 100644
--- a/locale/en/translations.suml
+++ b/locale/en/translations.suml
@@ -63,7 +63,10 @@ home:
pronouns:
header: 'Pronouns'
headerLong: 'Pronouns'
- examples: 'Example usage in sentences'
+ examples:
+ header: 'Example usage in sentences'
+ shuffle: 'Show different example'
+ shuffleNamed: 'Show different example for %category%'
plural: 'Plural'
intro: 'My pronouns are'
normative: 'Normative'
@@ -89,6 +92,9 @@ pronouns:
sentence: >
You can modify the default links so that the URL reads like a sentence; for example:
+pronunciation:
+ play: 'Play audio sample'
+
sources:
header: 'Sources'
headerLong: 'Examples from cultural texts'
diff --git a/locale/eo/translations.suml b/locale/eo/translations.suml
index f8e8d6c11..e1d9f849c 100644
--- a/locale/eo/translations.suml
+++ b/locale/eo/translations.suml
@@ -50,7 +50,8 @@ home:
pronouns:
header: 'Pronomoj'
headerLong: 'Pronomoj'
- examples: 'Ekzempla uzado en frazoj'
+ examples:
+ header: 'Ekzempla uzado en frazoj'
plural: 'Pluralo'
intro: 'Miaj pronomoj estas'
normative: 'Norma'
diff --git a/locale/es/translations.suml b/locale/es/translations.suml
index ab606e4a5..531a42d04 100644
--- a/locale/es/translations.suml
+++ b/locale/es/translations.suml
@@ -61,7 +61,8 @@ home:
pronouns:
header: 'Pronombres'
headerLong: 'Pronombres'
- examples: 'Ejemplos de uso en oraciones'
+ examples:
+ header: 'Ejemplos de uso en oraciones'
plural: 'Plural'
intro: 'Mis pronombres son'
normative: 'Normativo'
diff --git a/locale/et/translations.suml b/locale/et/translations.suml
index adf6eb0a3..fbe2a94d6 100644
--- a/locale/et/translations.suml
+++ b/locale/et/translations.suml
@@ -56,7 +56,8 @@ home:
pronouns:
header: 'Asesõnad'
headerLong: 'Asesõnad'
- examples: 'Kasutuse näide lausetes'
+ examples:
+ header: 'Kasutuse näide lausetes'
plural: 'Mitmus'
intro: 'Minu asesõnad on'
normative: 'Normatiivne'
diff --git a/locale/fr/translations.suml b/locale/fr/translations.suml
index a984ae28e..896f688b8 100644
--- a/locale/fr/translations.suml
+++ b/locale/fr/translations.suml
@@ -58,7 +58,8 @@ home:
pronouns:
header: 'Pronoms'
headerLong: 'Pronoms'
- examples: 'Exemple d’usage dans des phrases'
+ examples:
+ header: 'Exemple d’usage dans des phrases'
plural: 'Pluriel'
intro: 'Mes pronoms sont'
normative: 'Normatif'
diff --git a/locale/gl/translations.suml b/locale/gl/translations.suml
index 99f161236..c8d8929de 100644
--- a/locale/gl/translations.suml
+++ b/locale/gl/translations.suml
@@ -60,7 +60,8 @@ home:
pronouns:
header: 'Pronomes'
headerLong: 'Pronomes'
- examples: 'Exemplos de uso em frases'
+ examples:
+ header: 'Exemplos de uso em frases'
plural: 'Plural'
intro: 'Meus pronomes são'
normative: 'Normativo'
diff --git a/locale/he/translations.suml b/locale/he/translations.suml
index 707df12d7..2ce39d629 100644
--- a/locale/he/translations.suml
+++ b/locale/he/translations.suml
@@ -62,7 +62,8 @@ home:
pronouns:
header: 'Pronouns'
headerLong: 'Pronouns'
- examples: 'Example usage in sentences'
+ examples:
+ header: 'Example usage in sentences'
plural: 'Plural'
intro: 'My pronouns are'
normative: 'Normative'
diff --git a/locale/it/translations.suml b/locale/it/translations.suml
index 69c0ef6f1..7ac7df598 100644
--- a/locale/it/translations.suml
+++ b/locale/it/translations.suml
@@ -60,7 +60,8 @@ home:
pronouns:
header: 'Pronomi'
headerLong: 'Pronomi'
- examples: 'Esempi pratici di utilizzo'
+ examples:
+ header: 'Esempi pratici di utilizzo'
plural: 'Plurale'
intro: 'I miei pronomi sono'
normative: 'Normative'
diff --git a/locale/ja/translations.suml b/locale/ja/translations.suml
index 658c20d75..d6469b699 100644
--- a/locale/ja/translations.suml
+++ b/locale/ja/translations.suml
@@ -44,7 +44,8 @@ home:
pronouns:
header: '三人称代名詞'
headerLong: '三人称代名詞'
- examples: '文章での使い方の例'
+ examples:
+ header: '文章での使い方の例'
plural: '複数形'
intro: '私の三人称代名詞は'
normative: '規範的'
diff --git a/locale/ko/translations.suml b/locale/ko/translations.suml
index 0f35aa5f5..974de9e9d 100644
--- a/locale/ko/translations.suml
+++ b/locale/ko/translations.suml
@@ -61,7 +61,8 @@ home:
pronouns:
header: '대명사'
headerLong: '대명사'
- examples: '문장안에 예'
+ examples:
+ header: '문장안에 예'
plural: '복유의'
intro: '나의 대명사는'
normative: '규범적'
diff --git a/locale/lad/translations.suml b/locale/lad/translations.suml
index eabbe06aa..25699e1ec 100644
--- a/locale/lad/translations.suml
+++ b/locale/lad/translations.suml
@@ -61,7 +61,8 @@ home:
pronouns:
header: 'Pronombres'
headerLong: 'Pronombres'
- examples: 'Enshemplos de uzo en frazas'
+ examples:
+ header: 'Enshemplos de uzo en frazas'
plural: 'Plural'
intro: 'Mis pronombres son'
normative: 'Normativo'
diff --git a/locale/nl/translations.suml b/locale/nl/translations.suml
index d6cd1758d..cc7219ba3 100644
--- a/locale/nl/translations.suml
+++ b/locale/nl/translations.suml
@@ -59,7 +59,8 @@ home:
pronouns:
header: 'Voornaamwoorden'
headerLong: 'Voornaamwoorden'
- examples: 'Gebruiksvoorbeelden in zinnen'
+ examples:
+ header: 'Gebruiksvoorbeelden in zinnen'
plural: 'Meervoud'
intro: 'Mijn voornaamwoorden zijn'
normative: 'Normatief'
diff --git a/locale/no/translations.suml b/locale/no/translations.suml
index 33e5ad076..16214cb37 100644
--- a/locale/no/translations.suml
+++ b/locale/no/translations.suml
@@ -53,7 +53,8 @@ home:
pronouns:
header: 'Pronomen'
headerLong: 'Pronomen'
- examples: 'Eksempler i setninger'
+ examples:
+ header: 'Eksempler i setninger'
plural: 'Flertall'
intro: 'Mine pronomen er'
normative: 'Normativ'
diff --git a/locale/pl/translations.suml b/locale/pl/translations.suml
index c84775d46..518341fa5 100644
--- a/locale/pl/translations.suml
+++ b/locale/pl/translations.suml
@@ -74,7 +74,8 @@ home:
pronouns:
header: 'Zaimki'
headerLong: 'Niebinarne zaimki
i inne formy'
- examples: 'Przykłady użycia w zdaniu'
+ examples:
+ header: 'Przykłady użycia w zdaniu'
plural: 'Liczba mnoga'
intro: 'Moje zaimki to'
normative: 'Normatywne'
@@ -282,7 +283,8 @@ nouns:
Słownik Neutratywów podaje odmianę pasującą do {/ono=„ono/jego”},
lecz możliwa jest też odmiana zgodna z pozostałymi opcjami:
- examples: 'Przykłady'
+ examples:
+ header: 'Przykłady'
dictionary: 'Słownik Neutratywów'
approved: 'wpisów zatwierdzonych'
diff --git a/locale/pt/translations.suml b/locale/pt/translations.suml
index 3804e0815..ca3eeaef8 100644
--- a/locale/pt/translations.suml
+++ b/locale/pt/translations.suml
@@ -65,7 +65,8 @@ home:
pronouns:
header: 'Pronomes'
headerLong: 'Pronomes'
- examples: 'Exemplos de uso em frases'
+ examples:
+ header: 'Exemplos de uso em frases'
plural: 'Plural'
intro: 'Meu conjunto é'
normative: 'Normativo'
diff --git a/locale/ro/translations.suml b/locale/ro/translations.suml
index a467d2d37..5c4ee880c 100644
--- a/locale/ro/translations.suml
+++ b/locale/ro/translations.suml
@@ -61,7 +61,8 @@ home:
pronouns:
header: 'Pronume'
headerLong: 'Listă cu pronume'
- examples: 'Utilizarea pronumelor în propoziții'
+ examples:
+ header: 'Utilizarea pronumelor în propoziții'
plural: 'Plural'
intro: 'Pronumele mele sunt'
normative: 'Normativ'
diff --git a/locale/ru/translations.suml b/locale/ru/translations.suml
index 6ec06de51..a9231bc19 100644
--- a/locale/ru/translations.suml
+++ b/locale/ru/translations.suml
@@ -54,7 +54,8 @@ home:
pronouns:
header: 'Местоимения'
headerLong: 'Местоимения и другие формы'
- examples: 'Примеры употребления в предложениях'
+ examples:
+ header: 'Примеры употребления в предложениях'
plural: 'Множественное число'
intro: 'Мои местоимения'
normative: 'Нормативное'
diff --git a/locale/sv/translations.suml b/locale/sv/translations.suml
index ca2674f84..6cfb8f991 100644
--- a/locale/sv/translations.suml
+++ b/locale/sv/translations.suml
@@ -63,7 +63,8 @@ home:
pronouns:
header: 'Pronomen'
headerLong: 'Pronomen'
- examples: 'Exempel på användningar i meningar'
+ examples:
+ header: 'Exempel på användningar i meningar'
plural: 'Plural'
intro: 'Mina pronomen är'
normative: 'Normativ'
diff --git a/locale/tr/translations.suml b/locale/tr/translations.suml
index 4edee64c6..9f28cf1de 100644
--- a/locale/tr/translations.suml
+++ b/locale/tr/translations.suml
@@ -50,7 +50,8 @@ home:
pronouns:
header: 'Zamirler'
headerLong: 'Zamirler'
- examples: 'Cumlede nasil gözükeceğini anlamak icin örnek kullanım'
+ examples:
+ header: 'Cumlede nasil gözükeceğini anlamak icin örnek kullanım'
plural: 'Birden Çok'
intro: 'Benim zamirlerim'
normative: 'Genel Zamirler'
diff --git a/locale/ua/translations.suml b/locale/ua/translations.suml
index 04e9efa08..d5cd659ac 100644
--- a/locale/ua/translations.suml
+++ b/locale/ua/translations.suml
@@ -54,7 +54,8 @@ home:
pronouns:
header: 'Займенники'
headerLong: 'Займенники та інші форми'
- examples: 'Приклади використання у реченнях'
+ examples:
+ header: 'Приклади використання у реченнях'
plural: 'Множина'
intro: 'Мої займенники'
normative: 'Нормативне'
diff --git a/locale/vi/translations.suml b/locale/vi/translations.suml
index 6c8580c27..edd11ff99 100644
--- a/locale/vi/translations.suml
+++ b/locale/vi/translations.suml
@@ -63,7 +63,8 @@ home:
pronouns:
header: 'Các danh xưng'
headerLong: 'Các danh xưng'
- examples: 'Ví dụ trong câu'
+ examples:
+ header: 'Ví dụ trong câu'
plural: 'Số nhiều'
intro: 'Tôi dùng các danh xưng'
normative: 'Chuẩn mực'
diff --git a/locale/yi/translations.suml b/locale/yi/translations.suml
index b4c8409fb..6634ed315 100644
--- a/locale/yi/translations.suml
+++ b/locale/yi/translations.suml
@@ -60,7 +60,8 @@ home:
pronouns:
header: 'פּראָנאָמען'
headerLong: 'פּראָנאָמען'
- examples: 'Example usage in sentences'
+ examples:
+ header: 'Example usage in sentences'
plural: 'מערצאָל'
intro: 'מײַנע פּראָנאָמען זענען'
normative: 'נאָרמאַטיװ'
diff --git a/locale/zh/translations.suml b/locale/zh/translations.suml
index 5ade602d3..fe65fc271 100644
--- a/locale/zh/translations.suml
+++ b/locale/zh/translations.suml
@@ -62,7 +62,8 @@ home:
pronouns:
header: '代詞'
headerLong: '代詞'
- examples: '例句用法'
+ examples:
+ header: '例句用法'
plural: '複數'
intro: '我的代詞是'
normative: '規範'
diff --git a/routes/any.vue b/routes/any.vue
index 7de689465..a48149b0e 100644
--- a/routes/any.vue
+++ b/routes/any.vue
@@ -29,7 +29,7 @@
- pronouns.examplesquotation.colon
+ pronouns.examples.headerquotation.colon
diff --git a/routes/pronoun.vue b/routes/pronoun.vue
index 88a328460..d683f0700 100644
--- a/routes/pronoun.vue
+++ b/routes/pronoun.vue
@@ -55,7 +55,7 @@
- pronouns.examplesquotation.colon
+ pronouns.examples.headerquotation.colon
@@ -164,7 +164,7 @@ export default {
? head({
title: `${this.$t('pronouns.intro')}: ${this.selectedPronoun.name(this.glue)}`,
description: [
- this.$t('pronouns.examples', {}, false),
+ this.$t('pronouns.examples.header', {}, false),
this.$t('pronouns.grammarTable', {}, false),
this.$t('sources.headerLong', {}, false),
].filter((x) => !!x).join(', '),
diff --git a/routes/pronouns.vue b/routes/pronouns.vue
index e7bb0e023..a228d3eba 100644
--- a/routes/pronouns.vue
+++ b/routes/pronouns.vue
@@ -85,7 +85,7 @@
- pronouns.examplesquotation.colon
+ pronouns.examples.headerquotation.colon
diff --git a/src/missingTranslations.ts b/src/missingTranslations.ts
index ae0ca66eb..2d8c45870 100644
--- a/src/missingTranslations.ts
+++ b/src/missingTranslations.ts
@@ -82,6 +82,10 @@ export function listMissingTranslations(
return false;
}
+ if (!config.pronouns.exampleCategories && keyMatches('pronouns.examples.shuffleNamed')) {
+ return false;
+ }
+
if (!config.pronouns.slashes && keyMatches('pronouns.slashes.')) {
return false;
}