Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add french translation for env names #251

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 35 additions & 6 deletions src/settings/profile.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export const PROOF_SETTING_KEYS = [
export type ProofSettingKey = typeof PROOF_SETTING_KEYS[number];
export type ProofDisplay = { [k in ProofSettingKey]: string };
export type ProfileBody = {
theorem: TheoremLinkEnvDisplay;
theorem: TheoremLinkEnvDisplay;
proof: ProofDisplay;
};
export type Profile = {
Expand Down Expand Up @@ -52,7 +52,7 @@ export const DEFAULT_PROFILES: Record<string, Profile> = {
begin: "Proof.",
end: "□",
linkedBeginPrefix: "Proof of ",
linkedBeginSuffix: ".",
linkedBeginSuffix: ".",
},
},
},
Expand Down Expand Up @@ -85,6 +85,35 @@ export const DEFAULT_PROFILES: Record<string, Profile> = {
},
},
},
"Français": {
id: "Français",
meta: {
tags: ["fr"],
},
body: {
theorem: {
"axiom": "Axiome",
"definition": "Définition",
"lemma": "Lemme",
"proposition": "Proposition",
"theorem": "Théorème",
"corollary": "Corollaire",
"claim": "Affirmation",
"assumption": "Supposition",
"example": "Exemple",
"exercise": "Exercice",
"conjecture": "Conjecture",
"hypothesis": "Hypothèses",
"remark": "Remarque",
},
proof: {
begin: "Preuve.",
end: "□",
linkedBeginPrefix: "Preuve (",
linkedBeginSuffix: ").",
},
},
},
};


Expand Down Expand Up @@ -227,10 +256,10 @@ class EditProfileModal extends Modal {

// const linkedProofHeading = contentEl.createEl("h6", {text: "Linked proofs"});
const linkedProofHeading = new Setting(contentEl)
.setName("Linked proofs")
.setDesc(`For example, you can render \`${DEFAULT_SETTINGS.beginProof}\`@[[link to Theorem 1]] as "${DEFAULT_PROFILES[DEFAULT_SETTINGS.profile].body.proof.linkedBeginPrefix}Theorem 1${DEFAULT_PROFILES[DEFAULT_SETTINGS.profile].body.proof.linkedBeginSuffix}".`)
.setHeading().settingEl;
// const linkedProofDesc = contentEl.createDiv({
.setName("Linked proofs")
.setDesc(`For example, you can render \`${DEFAULT_SETTINGS.beginProof}\`@[[link to Theorem 1]] as "${DEFAULT_PROFILES[DEFAULT_SETTINGS.profile].body.proof.linkedBeginPrefix}Theorem 1${DEFAULT_PROFILES[DEFAULT_SETTINGS.profile].body.proof.linkedBeginSuffix}".`)
.setHeading().settingEl;
// const linkedProofDesc = contentEl.createDiv({
// text: `For example, you can render \`${DEFAULT_SETTINGS.beginProof}\`@[[link to Theorem 1]] as "${DEFAULT_PROFILES[DEFAULT_SETTINGS.profile].body.proof.linkedBeginPrefix}Theorem 1${DEFAULT_PROFILES[DEFAULT_SETTINGS.profile].body.proof.linkedBeginSuffix}".`,
// cls: ["setting-item-description", "math-booster-setting-item-description"],
// });
Expand Down