diff --git a/src/components/PageRandom.vue b/src/components/PageRandom.vue
index 00de5f1..f17b269 100644
--- a/src/components/PageRandom.vue
+++ b/src/components/PageRandom.vue
@@ -60,6 +60,13 @@ function checkAvailability() {
}
}
+function removeExt() {
+ if (domain.value) {
+ props.factory.removeExt(domain.value.extension);
+ newDomain();
+ }
+}
+
function getTextClass() {
if (!domain.value || domain.value.name.length < 15) {
return "text-5xl";
@@ -121,5 +128,14 @@ watch(i18n.locale, newDomain);
>
{{ $t("button.new_domain") }}
+
+
+ {{ + $t("page_random.dont_suggest", { ext: `.${domain.extension}` }) + }} +
+diff --git a/src/i18n/en.json b/src/i18n/en.json index 80265af..7056124 100644 --- a/src/i18n/en.json +++ b/src/i18n/en.json @@ -1,27 +1,28 @@ { - "tab": { - "random": "Random", - "input": "Input", - "history": "History" - }, - "this_domain": "This domain", - "is_unavailable": "is not available", - "seems": "seems", - "available": "available", - "error": "An error has occured, please reload the page.", - "page_random": { - "state": { - "loading": "Loading the Cool Domain Factory™", - "generating": "Generating a new cool domain", - "fetching": "Checking domain availability" + "tab": { + "random": "Random", + "input": "Input", + "history": "History" + }, + "this_domain": "This domain", + "is_unavailable": "is not available", + "seems": "seems", + "available": "available", + "error": "An error has occured, please reload the page.", + "page_random": { + "state": { + "loading": "Loading the Cool Domain Factory™", + "generating": "Generating a new cool domain", + "fetching": "Checking domain availability" + }, + "dont_suggest": "Don't generate {ext} domains" + }, + "page_input": { + "not_found": "No matching domain found.", + "placeholder": "Type a word or a phrase" + }, + "button": { + "new_domain": "New domain", + "generate": "Generate" } - }, - "page_input": { - "not_found": "No matching domain found.", - "placeholder": "Type a word or a phrase" - }, - "button": { - "new_domain": "New domain", - "generate": "Generate" - } } diff --git a/src/i18n/fr.json b/src/i18n/fr.json index fdfe68e..ec6caa1 100644 --- a/src/i18n/fr.json +++ b/src/i18n/fr.json @@ -1,27 +1,28 @@ { - "tab": { - "random": "Aléatoire", - "input": "Saisie", - "history": "Historique" - }, - "this_domain": "Ce domaine", - "is_unavailable": "n'est pas disponible", - "seems": "semble être", - "available": "disponible", - "error": "Une erreur est survenue, merci de recharger la page.", - "page_random": { - "state": { - "loading": "Chargement de la Cool Domain Factory™", - "generating": "Création d'un domaine cool", - "fetching": "Vérification de la disponibilité" + "tab": { + "random": "Aléatoire", + "input": "Saisie", + "history": "Historique" + }, + "this_domain": "Ce domaine", + "is_unavailable": "n'est pas disponible", + "seems": "semble être", + "available": "disponible", + "error": "Une erreur est survenue, merci de recharger la page.", + "page_random": { + "state": { + "loading": "Chargement de la Cool Domain Factory™", + "generating": "Création d'un domaine cool", + "fetching": "Vérification de la disponibilité" + }, + "dont_suggest": "Ne pas génerer des domaines en {ext}" + }, + "page_input": { + "not_found": "Aucun domaine correspondant.", + "placeholder": "Écrit un mot ou une phrase." + }, + "button": { + "new_domain": "Nouveau domaine", + "generate": "Génerer" } - }, - "page_input": { - "not_found": "Aucun domaine correspondant.", - "placeholder": "Écrit un mot ou une phrase." - }, - "button": { - "new_domain": "Nouveau domaine", - "generate": "Génerer" - } } diff --git a/src/lib/factory.ts b/src/lib/factory.ts index 8d62e7a..1fc6adf 100644 --- a/src/lib/factory.ts +++ b/src/lib/factory.ts @@ -11,10 +11,12 @@ export class DomainFactory { words: Record