Skip to content

Commit

Permalink
fix(titleRegex): Simplify options
Browse files Browse the repository at this point in the history
  • Loading branch information
Mara-Li committed Feb 27, 2023
1 parent 52de8b5 commit 37047e8
Show file tree
Hide file tree
Showing 10 changed files with 202 additions and 140 deletions.
1 change: 0 additions & 1 deletion esbuild.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ esbuild.context({
},
entryPoints: ['plugin/main.ts', 'plugin/styles.css'],
bundle: true,
sourcemap: true,
external: ['obsidian', 'electron', ...builtins],
format: 'cjs',
outdir: './',
Expand Down
130 changes: 70 additions & 60 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 8 additions & 8 deletions plugin/i18n/i18next.d.ts → plugin/@types/i18next.d.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ressources } from "./i18next";

declare module "i18next" {
interface CustomTypeOptions {
readonly resources: typeof ressources["en"];
readonly returnNull: false
}
}
import { ressources } from "../i18n/i18next";

declare module "i18next" {
interface CustomTypeOptions {
readonly resources: typeof ressources["en"];
readonly returnNull: false
}
}
9 changes: 5 additions & 4 deletions plugin/i18n/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -349,8 +349,6 @@
"title": "Default Folder"
},
"filepathRegex": {
"desc": "The replacement won't be applied to the filename. Use the same settings than the filename replacement.",
"placeholder": "Filepath edit"
},
"folderBehavior": {
"desc": "Choose the file tree in the repository, with using a frontmatter key, a fixed folder or your Obsidian file tree.",
Expand All @@ -364,9 +362,12 @@
"placeholder": "category",
"title": "Frontmatter key"
},
"frontmatterRegex": {
"regexFilePathTitle": {
"desc": "If the text is between \"//\", it will be used as a regex. Otherwise, it will be used as a string.",
"placeholder": "Filename edit"
"title": {
"FolderPathTitle": "Apply edit on the folder path or the filename (automatically)",
"titleOnly": "Apply edit on the filename (automatically)"
}
},
"rootFolder": {
"desc": "Append this path to the folder set by the frontmatter key",
Expand Down
11 changes: 6 additions & 5 deletions plugin/i18n/locales/fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
"desc": "Replace des textes (ou des regex) dans le fichier par la valeur donnée.",
"title": "Remplacement de texte"
},
"title": "Remplacer le {{- what}}",
"title": "Remplacer les nom du fichier ou son chemin",
"warningPath": "Attention ! Utiliser le caractère \"/\" modifiera le chemin du fichier. Veuillez faire attention avec cette option."
},
"dataview": {
Expand Down Expand Up @@ -349,8 +349,6 @@
"title": "Dossier par défaut"
},
"filepathRegex": {
"desc": "Le remplacement ne sera pas appliqué sur le nom du fichier. Utilise les mêmes options que pour le nom du fichier",
"placeholder": "Modification du chemin"
},
"folderBehavior": {
"desc": "Choisir la hierarchie des dossiers dans le dépôt, en se basant sur une clé frontmatter, un dossier fixe ou la hierarchie des dossiers dans Obsidian.",
Expand All @@ -364,9 +362,12 @@
"placeholder": "category",
"title": "Clé frontmatter"
},
"frontmatterRegex": {
"regexFilePathTitle": {
"desc": "Si le texte est entre \"//\", il sera interprété comme une expression régulière. Sinon, il sera interprété comme du texte brut.",
"placeholder": "Modification du titre"
"title": {
"FolderPathTitle": "Éditer le titre et le chemin du dossier (automatiquement)",
"titleOnly": "Éditer le titre (automatiquement)"
}
},
"rootFolder": {
"desc": "Ajouter ce chemin au dossier définit par la clé frontmatter.",
Expand Down
1 change: 1 addition & 0 deletions plugin/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export default class GithubPublisher extends Plugin {
lng: translationLanguage,
fallbackLng: "en",
resources: ressources,
returnNull: false,
});

await this.loadSettings();
Expand Down
Loading

0 comments on commit 37047e8

Please sign in to comment.