mirror of
https://github.com/suitenumerique/meet.git
synced 2026-09-01 05:07:56 +00:00
🌐(addon) internationalize the addon
Refactor the plugin to support internationalization and ship it in three languages. Internationalizing requires updating the manifest, which involves touching the Helm chart and releasing a new version. Ship a beta version of the plugin once the i18n work is done to bundle these changes together.
This commit is contained in:
committed by
aleb_the_flash
parent
818d20888e
commit
0065527a5e
@@ -5,8 +5,12 @@ const { saveSession, loadSession } = require("../common/session");
|
||||
const { openTransitDialog } = require("../common/transitDialog");
|
||||
const { buildMeetingMessage } = require("../common/messageBuilder");
|
||||
const { applyAppName } = require("../common/helpers");
|
||||
const { initI18n, t } = require("../common/i18n");
|
||||
|
||||
Office.onReady(async function (info) {
|
||||
|
||||
await initI18n()
|
||||
|
||||
Office.onReady(function (info) {
|
||||
if (info.host === Office.HostType.Outlook) {
|
||||
applyAppName();
|
||||
}
|
||||
@@ -32,22 +36,22 @@ function insertMeetingLink(event, session) {
|
||||
return new Promise((resolve, reject) => {
|
||||
item.body.setSelectedDataAsync(text, { coercionType }, (setResult) => {
|
||||
if (setResult.status !== Office.AsyncResultStatus.Succeeded) {
|
||||
notify(`Erreur d'insertion : ${setResult.error.message}`);
|
||||
notify(t('meeting.error.details', { message: setResult.error.message }));
|
||||
resolve();
|
||||
return;
|
||||
}
|
||||
|
||||
if (item.itemType !== Office.MailboxEnums.ItemType.Appointment) {
|
||||
notify("Lien de réunion inséré !");
|
||||
notify(t("meeting.link_inserted"));
|
||||
resolve();
|
||||
return;
|
||||
}
|
||||
|
||||
item.location.setAsync(url, (locationResult) => {
|
||||
if (locationResult.status !== Office.AsyncResultStatus.Succeeded) {
|
||||
notify(`Erreur de localisation : ${locationResult.error.message}`);
|
||||
notify(t("meeting.error.details", { message: locationResult.error.message }));
|
||||
} else {
|
||||
notify("Lien de réunion inséré !");
|
||||
notify(t("meeting.link_inserted"));
|
||||
}
|
||||
resolve();
|
||||
});
|
||||
@@ -72,11 +76,11 @@ function connect(event) {
|
||||
});
|
||||
},
|
||||
onTimeout: () => {
|
||||
notify("Connexion expirée, veuillez réessayer.");
|
||||
notify(t("meeting.error.auth"));
|
||||
event.completed();
|
||||
},
|
||||
onError: (err) => {
|
||||
notify("Une erreur est survenue, veuillez ré-essayer");
|
||||
notify(t("meeting.error.retry"));
|
||||
event.completed();
|
||||
},
|
||||
});
|
||||
@@ -92,7 +96,7 @@ function connect(event) {
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
notify(`Erreur : ${err.message}`);
|
||||
notify(t("meeting.error.details", { message: err.message }));
|
||||
event.completed();
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user