Skip to content

Commit

Permalink
fix: rename "default folder" by "root folder" in the settings (didn't…
Browse files Browse the repository at this point in the history
… change any behavior)

the other description was wrong and doesn't help user
  • Loading branch information
Mara-Li committed Oct 19, 2023
1 parent f3d4364 commit 1f5ce3f
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,8 @@
"defaultFolder": {
"desc": "Set the default reception folder. Let it empty to use the root of the repository.",
"placeholder": "docs",
"title": "Default Folder"
"title": "Default Folder",
"other" : "Use this folder as root within the repository (each path will be prepend by it)"
},
"folderBehavior": {
"desc": "Choose the file tree in the repository, with using a properties key, a fixed folder or your Obsidian file tree.",
Expand All @@ -513,6 +514,7 @@
},
"rootFolder": {
"desc": "Append this path to the folder set by the properties key",
"other": "Use this folder as root within the repository (each path will be prepend by it).",
"title": "Root folder"
},
"title": "Upload configuration",
Expand Down
1 change: 1 addition & 0 deletions src/i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@
},
"rootFolder": {
"desc": "Ajouter ce chemin au dossier définit par la clé de propriété.",
"other": "Utilisez ce dossier comme racine dans le référentiel (chaque chemin sera précédé de ce nom).",
"title": "Dossier racine"
},
"title": "Configuration du transfert",
Expand Down
14 changes: 12 additions & 2 deletions src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -378,9 +378,19 @@ export class GithubPublisherSettingsTab extends PluginSettingTab {
});
});

const defaultFolder = uploadSettings.behavior !== FolderSettings.yaml ?
{
desc: i18next.t("settings.upload.rootFolder.other"),
title: i18next.t("settings.upload.rootFolder.title"),
}
: {
desc: i18next.t("settings.upload.defaultFolder.desc"),
title: i18next.t("settings.upload.defaultFolder.title"),
};

new Setting(this.settingsPage)
.setName(i18next.t("settings.upload.defaultFolder.title"))
.setDesc(i18next.t("settings.upload.defaultFolder.desc"))
.setName(defaultFolder.title)
.setDesc(defaultFolder.desc)
.addText((text) => {
text.setPlaceholder(i18next.t("settings.upload.defaultFolder.placeholder"))
.setValue(uploadSettings.defaultName)
Expand Down

0 comments on commit 1f5ce3f

Please sign in to comment.