Compare commits

..

No commits in common. "fbc0b6f7410a5abb6fa94964f345652a103c7908" and "76d29a0dabe4ef14325147124a2023518b917236" have entirely different histories.

2 changed files with 38 additions and 68 deletions

View File

@ -53,7 +53,6 @@ api.onToolbarCreate(toolbar => {
// EXTRAS // EXTRAS
api.addToolbarPopupMenuOptionsCallback(() => { api.addToolbarPopupMenuOptionsCallback(() => {
return { return {
id: "bleu_color",
action: "bleucolor", action: "bleucolor",
icon: "palette", icon: "palette",
label: "bleu_color_button" label: "bleu_color_button"
@ -61,7 +60,6 @@ api.addToolbarPopupMenuOptionsCallback(() => {
}); });
api.addToolbarPopupMenuOptionsCallback(() => { api.addToolbarPopupMenuOptionsCallback(() => {
return { return {
id: "rose_color",
action: "rosecolor", action: "rosecolor",
icon: "palette", icon: "palette",
label: "rose_color_button" label: "rose_color_button"
@ -69,7 +67,6 @@ api.addToolbarPopupMenuOptionsCallback(() => {
}); });
api.addToolbarPopupMenuOptionsCallback(() => { api.addToolbarPopupMenuOptionsCallback(() => {
return { return {
id: "jaune_color",
action: "jaunecolor", action: "jaunecolor",
icon: "palette", icon: "palette",
label: "jaune_color_button" label: "jaune_color_button"
@ -77,7 +74,6 @@ api.addToolbarPopupMenuOptionsCallback(() => {
}); });
api.addToolbarPopupMenuOptionsCallback(() => { api.addToolbarPopupMenuOptionsCallback(() => {
return { return {
id: "orange_color",
action: "orangecolor", action: "orangecolor",
icon: "palette", icon: "palette",
label: "orange_color_button" label: "orange_color_button"
@ -85,7 +81,6 @@ api.addToolbarPopupMenuOptionsCallback(() => {
}); });
api.addToolbarPopupMenuOptionsCallback(() => { api.addToolbarPopupMenuOptionsCallback(() => {
return { return {
id: "rouge_color",
action: "rougecolor", action: "rougecolor",
icon: "palette", icon: "palette",
label: "rouge_color_button" label: "rouge_color_button"
@ -93,7 +88,6 @@ api.addToolbarPopupMenuOptionsCallback(() => {
}); });
api.addToolbarPopupMenuOptionsCallback(() => { api.addToolbarPopupMenuOptionsCallback(() => {
return { return {
id: "vert_color",
action: "vertcolor", action: "vertcolor",
icon: "palette", icon: "palette",
label: "vert_color_button" label: "vert_color_button"
@ -132,52 +126,51 @@ if (!translations.composer) {
translations.composer = {}; translations.composer = {};
} }
translations.composer.underline_button_title = settings.underline_button; // Define default values for buttons
translations.composer.underline_text = const defaultButtons = {
settings.underline_text; underline_button: "Souligner",
underline_text: "Texte",
translations.composer.align_center_button_title = settings.align_center_button; strikethrough_button: "Barrer",
translations.composer.align_center_text = strikethrough_text: "Texte",
settings.align_center_text;
translations.composer.align_justify_button_title = settings.align_justify_button; superscript_button: "Exposant",
translations.composer.align_justify_text = superscript_text: "Texte",
settings.align_justify_text;
translations.composer.strikethrough_button_title = settings.strikethrough_button; subscript_button: "Indice",
translations.composer.strikethrough_text = subscript_text: "Texte",
settings.strikethrough_text;
translations.composer.superscript_button_title = settings.superscript_button; align_center_button: "Centrer",
translations.composer.superscript_text = align_center_text: "Texte",
settings.superscript_text;
translations.composer.subscript_button_title = settings.subscript_button; align_justify_button: "Justifier",
translations.composer.subscript_text = align_justify_text: "Texte",
settings.subscript_text;
translations.bleu_color_button = settings.bleu_color_button; // Définissez les boutons de couleur avec un traitement spécial
translations.composer.bleu_color_text = bleu_color_button: "Colorer en bleu",
settings.bleu_color_text; bleu_color_text: "Texte",
translations.rose_color_button = settings.rose_color_button; rose_color_button: "Colorer en rose",
translations.composer.rose_color_text = rose_color_text: "Texte",
settings.rose_color_text;
translations.jaune_color_button = settings.jaune_color_button; jaune_color_button: "Colorer en jaune",
translations.composer.jaune_color_text = jaune_color_text: "Texte",
settings.jaune_color_text;
translations.orange_color_button = settings.orange_color_button; orangecolor_button: "Colorer en orange",
translations.composer.orange_color_text = orangecolor_text: "Texte",
settings.orange_color_text;
translations.rouge_color_button = settings.rouge_color_button; rouge_color_button: "Colorer en rouge",
translations.composer.rouge_color_text = rouge_color_text: "Texte",
settings.rouge_color_text;
translations.vert_color_button = settings.vert_color_button; vert_color_button: "Colorer en vert",
translations.composer.vert_color_text = vert_color_text: "Texte"
settings.vert_color_text; };
// Assign default values if translations are not present
Object.keys(defaultButtons).forEach(key => {
const settingKey = key.replace("_button", "");
translations.composer[key + "_title"] = settings[settingKey] && settings[settingKey].default ? settings[settingKey].default : defaultButtons[key];
translations.composer[key + "_text"] = settings[key + "_text"] && settings[key + "_text"].default ? settings[key + "_text"].default : defaultButtons[key];
});
</script> </script>

View File

@ -2,122 +2,99 @@ underline_button:
default: "Souligner" default: "Souligner"
description: description:
en: Enter the text for the title of the button in the composer. en: Enter the text for the title of the button in the composer.
fr: Saisissez le texte du titre du bouton dans le compositeur.
underline_text: underline_text:
default: "Texte" default: "Texte"
description: description:
en: Enter the placeholder text that appears in the composer after the user clicks the button. en: Enter the placeholder text that appears in the composer after the user clicks the button.
fr: Saisissez le texte de remplacement qui apparaît dans le compositeur après que l'utilisateur a cliqué sur le bouton.
align_center_button: align_center_button:
default: "Centrer" default: "Centrer"
description: description:
en: Enter the text for the title of the button in the composer. en: Enter the text for the title of the button in the composer.
fr: Saisissez le texte du titre du bouton dans le compositeur.
align_center_text: align_center_text:
default: "Texte" default: "Texte"
description: description:
en: Enter the placeholder text that appears in the composer after the user clicks the button. en: Enter the placeholder text that appears in the composer after the user clicks the button.
fr: Saisissez le texte de remplacement qui apparaît dans le compositeur après que l'utilisateur a cliqué sur le bouton.
align_justify_button: align_justify_button:
default: "Justifier" default: "Justifier"
description: description:
en: Enter the text for the title of the button in the composer. en: Enter the text for the title of the button in the composer.
fr: Saisissez le texte du titre du bouton dans le compositeur.
align_justify_text: align_justify_text:
default: "Texte" default: "Texte"
description: description:
en: Enter the placeholder text that appears in the composer after the user clicks the button. en: Enter the placeholder text that appears in the composer after the user clicks the button.
fr: Saisissez le texte de remplacement qui apparaît dans le compositeur après que l'utilisateur a cliqué sur le bouton.
strikethrough_button: strikethrough_button:
default: "Barrer" default: "Barrer"
description: description:
en: Enter the text for the title of the button in the composer. en: Enter the text for the title of the button in the composer.
fr: Saisissez le texte du titre du bouton dans le compositeur.
strikethrough_text: strikethrough_text:
default: "Texte" default: "Texte"
description: description:
en: Enter the placeholder text that appears in the composer after the user clicks the button. en: Enter the placeholder text that appears in the composer after the user clicks the button.
fr: Saisissez le texte de remplacement qui apparaît dans le compositeur après que l'utilisateur a cliqué sur le bouton.
superscript_button: superscript_button:
default: "Exposant" default: "Exposant"
description: description:
en: Enter the text for the title of the button in the composer. en: Enter the text for the title of the button in the composer.
fr: Saisissez le texte du titre du bouton dans le compositeur.
superscript_text: superscript_text:
default: "Texte" default: "Texte"
description: description:
en: Enter the placeholder text that appears in the composer after the user clicks the button. en: Enter the placeholder text that appears in the composer after the user clicks the button.
fr: Saisissez le texte de remplacement qui apparaît dans le compositeur après que l'utilisateur a cliqué sur le bouton.
subscript_button: subscript_button:
default: "Indice" default: "Indice"
description: description:
en: Enter the text for the title of the button in the composer. en: Enter the text for the title of the button in the composer.
fr: Saisissez le texte du titre du bouton dans le compositeur.
subscript_text: subscript_text:
default: "Texte" default: "Texte"
description: description:
en: Enter the placeholder text that appears in the composer after the user clicks the button. en: Enter the placeholder text that appears in the composer after the user clicks the button.
fr: Saisissez le texte de remplacement qui apparaît dans le compositeur après que l'utilisateur a cliqué sur le bouton.
bleu_color_button: bleu_color_button:
default: "Colorer en bleu" default: "Colorer en bleu"
description: description:
en: Enter the text for the title of the button in the composer. en: Enter the text for the title of the button in the composer.
fr: Saisissez le texte du titre du bouton dans le compositeur.
bleu_color_text: bleu_color_text:
default: "Texte" default: "Texte"
description: description:
en: Enter the placeholder text that appears in the composer after the user clicks the button. en: Enter the placeholder text that appears in the composer after the user clicks the button.
fr: Saisissez le texte de remplacement qui apparaît dans le compositeur après que l'utilisateur a cliqué sur le bouton.
rose_color_button: rose_color_button:
default: "Colorer en rose" default: "Colorer en rose"
description: description:
en: Enter the text for the title of the button in the composer. en: Enter the text for the title of the button in the composer.
fr: Saisissez le texte du titre du bouton dans le compositeur.
rose_color_text: rose_color_text:
default: "Texte" default: "Texte"
description: description:
en: Enter the placeholder text that appears in the composer after the user clicks the button. en: Enter the placeholder text that appears in the composer after the user clicks the button.
fr: Saisissez le texte de remplacement qui apparaît dans le compositeur après que l'utilisateur a cliqué sur le bouton.
jaune_color_button: jaune_color_button:
default: "Colorer en jaune" default: "Colorer en jaune"
description: description:
en: Enter the text for the title of the button in the composer. en: Enter the text for the title of the button in the composer.
fr: Saisissez le texte du titre du bouton dans le compositeur.
jaune_color_text: jaune_color_text:
default: "Texte" default: "Texte"
description: description:
en: Enter the placeholder text that appears in the composer after the user clicks the button. en: Enter the placeholder text that appears in the composer after the user clicks the button.
fr: Saisissez le texte de remplacement qui apparaît dans le compositeur après que l'utilisateur a cliqué sur le bouton.
orange_color_button: orange_color_button:
default: "Colorer en orange" default: "Colorer en orange"
description: description:
en: Enter the text for the title of the button in the composer. en: Enter the text for the title of the button in the composer.
fr: Saisissez le texte du titre du bouton dans le compositeur.
orange_color_text: orange_color_text:
default: "Texte" default: "Texte"
description: description:
en: Enter the placeholder text that appears in the composer after the user clicks the button. en: Enter the placeholder text that appears in the composer after the user clicks the button.
fr: Saisissez le texte de remplacement qui apparaît dans le compositeur après que l'utilisateur a cliqué sur le bouton.
rouge_color_button: rouge_color_button:
default: "Colorer en rouge" default: "Colorer en rouge"
description: description:
en: Enter the text for the title of the button in the composer. en: Enter the text for the title of the button in the composer.
fr: Saisissez le texte du titre du bouton dans le compositeur.
rouge_color_text: rouge_color_text:
default: "Texte" default: "Texte"
description: description:
en: Enter the placeholder text that appears in the composer after the user clicks the button. en: Enter the placeholder text that appears in the composer after the user clicks the button.
fr: Saisissez le texte de remplacement qui apparaît dans le compositeur après que l'utilisateur a cliqué sur le bouton.
vert_color_button: vert_color_button:
default: "Colorer en vert" default: "Colorer en vert"
description: description:
en: Enter the text for the title of the button in the composer. en: Enter the text for the title of the button in the composer.
fr: Saisissez le texte du titre du bouton dans le compositeur.
vert_color_text: vert_color_text:
default: "Texte" default: "Texte"
description: description:
en: Enter the placeholder text that appears in the composer after the user clicks the button. en: Enter the placeholder text that appears in the composer after the user clicks the button.
fr: Saisissez le texte de remplacement qui apparaît dans le compositeur après que l'utilisateur a cliqué sur le bouton.
Svg_icons: Svg_icons:
type: 'list' type: 'list'
list_type: 'compact' list_type: 'compact'