From dcaa5d0ba40e141336915e0a3b5ac130e3155584 Mon Sep 17 00:00:00 2001 From: Avris Date: Mon, 12 Oct 2020 16:41:25 +0200 Subject: [PATCH 1/7] #70 [nouns][pl] /rzeczowniki - rename routes, set up redirects --- locale/en/config.suml | 2 ++ locale/pl/config.suml | 10 +++++++--- locale/pl/translations.suml | 10 +++++----- nuxt.config.js | 8 ++++++-- package.json | 1 + yarn.lock | 5 +++++ 6 files changed, 26 insertions(+), 10 deletions(-) diff --git a/locale/en/config.suml b/locale/en/config.suml index d7335375..6322a08c 100644 --- a/locale/en/config.suml +++ b/locale/en/config.suml @@ -74,3 +74,5 @@ contact: mail: 'zuzannagrzybowska@protonmail.com' areas: social_media: ~ + +redirects: [] diff --git a/locale/pl/config.suml b/locale/pl/config.suml index f7e71288..0b06ae2a 100644 --- a/locale/pl/config.suml +++ b/locale/pl/config.suml @@ -8,11 +8,11 @@ template: sources: enabled: true - route: 'literatura' + route: 'korpus' nouns: enabled: true - route: 'neutratywy' + route: 'rzeczowniki' names: enabled: false @@ -191,7 +191,7 @@ contact: twitter: 'mykofanes' mail: 'zuzannagrzybowska@protonmail.com' areas: - neutratywy: '/neutratywy' + neutratywy: '/rzeczowniki' # imiona: '/imiona' social_media: ~ @@ -203,3 +203,7 @@ support: iconSet: 'b' url: 'https://paypal.me/AndreAvris' headline: 'PayPal' + +redirects: + - { from: '^/neutratywy', to: '/rzeczowniki' } + - { from: '^/literatura', to: '/korpus' } diff --git a/locale/pl/translations.suml b/locale/pl/translations.suml index df5f0974..74426119 100644 --- a/locale/pl/translations.suml +++ b/locale/pl/translations.suml @@ -88,8 +88,8 @@ sources: Other: 'Inne' nouns: - header: 'Neutratywy' - headerLong: 'Słownik neutratywów' + header: 'Rzeczowniki' + headerLong: 'Słownik neutralnych rzeczowników' description: 'Feminatywy feminatywami, ale prawdziwe wyzwanie to tworzenie neutratywów! Przedstawiamy tworzony przez społeczność słownik rzeczowników z wyszczególnieniem ich formy męskiej, żeńskiej i neutralnej.' intro: - > @@ -346,7 +346,7 @@ faq: Na przykład: owszem, można pisać „kandydaci/tki”, co jest inkluzywne dla kobiet, wciąż jednak pomija osoby niebinarne. Jednym z popularnieszych normatywnych pomysłów na neutralne rzeczowniki - (alternatywa dla {/neutratywy=neutratywów}) + (alternatywa dla {/rzeczowniki=neutratywów}) są konstrukcje „osoba” + imiesłów lub „osoba” + przymiotnik. Zamiast „kandydaci” lub „kandydatki” możemy mówić „osoby kandydujące”. {http://transfuzja.org/=Fundacja Trans-Fuzja} na przykład zamiast „prezesa” lub „prezeski” ma „osobę prezesującą”. @@ -481,7 +481,7 @@ english: We need to come up with a system that also includes neutral forms for adjectives, conjugated forms of verbs and declined forms of pronouns. (also: nouns like “painter”, “politician”, “journalist” etc. are also gendered, - but that's [atom-alt] {/neutratywy=a story for another time}). + but that's [atom-alt] {/rzeczowniki=a story for another time}). - > This website is an effort to put together in a structured and accessible way the existing ideas for less gendered pronouns and other forms. @@ -492,7 +492,7 @@ english: contact: header: 'Kontakt' - authors: '{/neutratywy#autor=Autorza} strony' + authors: '{/rzeczowniki#autor=Autorza} strony' support: header: 'Wsparcie' diff --git a/nuxt.config.js b/nuxt.config.js index 7e7ff13b..da3aed0a 100644 --- a/nuxt.config.js +++ b/nuxt.config.js @@ -1,6 +1,7 @@ import translations from './server/translations'; import config from './server/config'; +const locale = config.locale; const title = translations.title; const description = translations.description; const banner = process.env.BASE_URL + '/banner/zaimki.png'; @@ -48,6 +49,9 @@ export default { modules: [ '@nuxtjs/pwa', '@nuxtjs/axios', + ['@nuxtjs/redirect-module', { + rules: config.redirects, + }] ], pwa: { manifest: { @@ -56,7 +60,7 @@ export default { description: description, background_color: '#ffffff', theme_color: colour, - lang: 'pl', + lang: locale, } }, build: { @@ -80,7 +84,7 @@ export default { env: { baseUrl: process.env.BASE_URL, secret: process.env.SECRET, - lang: process.env.LANG, + lang: locale, }, serverMiddleware: { '/': bodyParser.json(), diff --git a/package.json b/package.json index c6a6bd97..dceead6c 100644 --- a/package.json +++ b/package.json @@ -12,6 +12,7 @@ "dependencies": { "@nuxtjs/axios": "^5.12.0", "@nuxtjs/pwa": "^3.0.0-beta.20", + "@nuxtjs/redirect-module": "^0.3.1", "body-parser": "^1.19.0", "canvas": "^2.6.1", "dotenv": "^8.2.0", diff --git a/yarn.lock b/yarn.lock index 25ca3868..9a1f75ab 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1174,6 +1174,11 @@ jimp-compact "^0.8.0" workbox-cdn "^4.3.1" +"@nuxtjs/redirect-module@^0.3.1": + version "0.3.1" + resolved "https://registry.yarnpkg.com/@nuxtjs/redirect-module/-/redirect-module-0.3.1.tgz#90a6986882337401cb0576cdf9479d4e3b552cce" + integrity sha512-yL2unrYfUSqs+4cUtkQvEQMsuTeCOlQd+Y5sTqMZzWBadF8h01tCVDG95zmOTNIiCupb+sQho2Tixwl1f826aw== + "@nuxtjs/youch@^4.2.3": version "4.2.3" resolved "https://registry.yarnpkg.com/@nuxtjs/youch/-/youch-4.2.3.tgz#36f8b22df5a0efaa81373109851e1d857aca6bed" From d5a15e6a9f73350fa5df46f43d1decccdc23aee8 Mon Sep 17 00:00:00 2001 From: Avris Date: Mon, 12 Oct 2020 20:28:20 +0200 Subject: [PATCH 2/7] #70 [nouns][pl] /rzeczowniki - osobatywy, dukatywy, neutratywy --- components/Declension.vue | 9 +- locale/en/nouns/NounsExtra.vue | 3 + locale/pl/nouns/NounsExtra.vue | 193 +++++++++++++++++++++++++++++++++ locale/pl/translations.suml | 77 ++++++++++--- routes/nouns.vue | 4 +- src/classes.js | 2 +- 6 files changed, 264 insertions(+), 24 deletions(-) create mode 100644 locale/en/nouns/NounsExtra.vue create mode 100644 locale/pl/nouns/NounsExtra.vue diff --git a/components/Declension.vue b/components/Declension.vue index 2d8c6226..cff4fed0 100644 --- a/components/Declension.vue +++ b/components/Declension.vue @@ -1,9 +1,9 @@