+
@@ -20,6 +20,7 @@
export default {
props: {
value: {required: true},
+ required: {type: Boolean}
},
data() {
return {
diff --git a/components/NounSubmitForm.vue b/components/NounSubmitForm.vue
index 0a40394bb..b6e2ca1e0 100644
--- a/components/NounSubmitForm.vue
+++ b/components/NounSubmitForm.vue
@@ -57,13 +57,13 @@
⁖ nouns.pluralShort
-
+
|
-
+
|
-
+
|
@@ -126,9 +126,9 @@
masc: [''],
fem: [''],
neutr: [''],
- mascPl: [''],
- femPl: [''],
- neutrPl: [''],
+ mascPl: this.config.nouns.pluralsRequired ? [''] : [],
+ femPl: this.config.nouns.pluralsRequired ? [''] : [],
+ neutrPl: this.config.nouns.pluralsRequired ? [''] : [],
base: null,
},
submitting: false,
@@ -149,9 +149,9 @@
masc: [''],
fem: [''],
neutr: [''],
- mascPl: [''],
- femPl: [''],
- neutrPl: [''],
+ mascPl: this.config.nouns.pluralsRequired ? [''] : [],
+ femPl: this.config.nouns.pluralsRequired ? [''] : [],
+ neutrPl: this.config.nouns.pluralsRequired ? [''] : [],
base: null,
};
this.templateVisible = false;
diff --git a/locale/en/config.suml b/locale/en/config.suml
index 07385f0a6..c1c53efed 100644
--- a/locale/en/config.suml
+++ b/locale/en/config.suml
@@ -46,6 +46,7 @@ nouns:
route: 'dictionary'
collapsable: false
plurals: true
+ pluralsRequired: false
declension: false
submit: true
templates: true
diff --git a/locale/en/translations.suml b/locale/en/translations.suml
index 2b4197cb5..482249eb6 100644
--- a/locale/en/translations.suml
+++ b/locale/en/translations.suml
@@ -177,7 +177,7 @@ faq:
Because addressing people in the way they want to be addressed is the basis of social relations.
You wouldn't call Ashley “Samantha”, you wouldn't drop “sir”/“madam” when addressing your supervisor, etc.
And there's people who don't want to be called either “{/he=he}” or “{/she=she}”.
- If you don't accept that, if only shows you in bad light.
+ If you don't accept that, it only shows you in bad light.
- >
“Strange pronouns” are just a matter of getting used to.
how-to-know:
diff --git a/locale/pl/config.suml b/locale/pl/config.suml
index 7a34bdde4..9ec829c2d 100644
--- a/locale/pl/config.suml
+++ b/locale/pl/config.suml
@@ -26,6 +26,7 @@ nouns:
route: 'słownik'
collapsable: true
plurals: true
+ pluralsRequired: true
declension: true
submit: true
templates: true
diff --git a/server/routes/nouns.js b/server/routes/nouns.js
index e65eb6839..24ce5d5e4 100644
--- a/server/routes/nouns.js
+++ b/server/routes/nouns.js
@@ -174,7 +174,7 @@ router.get('/nouns/:word.png', async (req, res) => {
['masc', 'fem', 'neutr'].forEach((form, column) => {
let i = 0;
for (let [key, symbol] of [['', '⋅'], ['Pl', '⁖']])
- noun[form + key].split('|').forEach(part => {
+ noun[form + key].split('|').filter(x => x.length).forEach(part => {
context.fillText(symbol + ' ' + part, column * (width - 2 * padding) / 3 + padding, 244 + i * 48);
i++;
});
diff --git a/src/classes.js b/src/classes.js
index f78059705..16dd91f0f 100644
--- a/src/classes.js
+++ b/src/classes.js
@@ -322,9 +322,9 @@ export class Noun {
this.masc = masc.split('|');
this.fem = fem.split('|');
this.neutr = neutr.split('|');
- this.mascPl = mascPl.split('|');
- this.femPl = femPl.split('|');
- this.neutrPl = neutrPl.split('|');
+ this.mascPl = mascPl ? mascPl.split('|') : [];
+ this.femPl = femPl ? femPl.split('|') : [];
+ this.neutrPl = neutrPl ? neutrPl.split('|') : [];
this.approved = !!approved;
this.base = base_id;
}