From 656dc7459c4f41e9157336843d74529f5a67506f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20Pr=C3=A9vost?= Date: Tue, 30 Jan 2024 21:15:15 -0500 Subject: [PATCH] Add dot-in-slug-directory example in cli --- .../Project/Resources/en.lproj/Localizable.strings | 1 + .../Project/Resources/fr.lproj/Localizable.strings | 1 + cli/examples/dot-in-slug-directory/accent.json | 10 ++++++++++ cli/src/commands/sync.ts | 2 +- 4 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 cli/examples/dot-in-slug-directory/Project/Resources/en.lproj/Localizable.strings create mode 100644 cli/examples/dot-in-slug-directory/Project/Resources/fr.lproj/Localizable.strings create mode 100644 cli/examples/dot-in-slug-directory/accent.json diff --git a/cli/examples/dot-in-slug-directory/Project/Resources/en.lproj/Localizable.strings b/cli/examples/dot-in-slug-directory/Project/Resources/en.lproj/Localizable.strings new file mode 100644 index 00000000..dcdced2f --- /dev/null +++ b/cli/examples/dot-in-slug-directory/Project/Resources/en.lproj/Localizable.strings @@ -0,0 +1 @@ +"key" = "value"; diff --git a/cli/examples/dot-in-slug-directory/Project/Resources/fr.lproj/Localizable.strings b/cli/examples/dot-in-slug-directory/Project/Resources/fr.lproj/Localizable.strings new file mode 100644 index 00000000..caf196fb --- /dev/null +++ b/cli/examples/dot-in-slug-directory/Project/Resources/fr.lproj/Localizable.strings @@ -0,0 +1 @@ +"key" = "valeur"; diff --git a/cli/examples/dot-in-slug-directory/accent.json b/cli/examples/dot-in-slug-directory/accent.json new file mode 100644 index 00000000..251f89d9 --- /dev/null +++ b/cli/examples/dot-in-slug-directory/accent.json @@ -0,0 +1,10 @@ +{ + "files": [ + { + "namePattern": "file", + "format": "strings", + "source": "Project/Resources/en.lproj/Localizable.strings", + "target": "Project/Resources/%slug%.lproj/%document_path%.strings" + } + ] +} diff --git a/cli/src/commands/sync.ts b/cli/src/commands/sync.ts index 7a501a7e..45bdd9ca 100644 --- a/cli/src/commands/sync.ts +++ b/cli/src/commands/sync.ts @@ -180,7 +180,7 @@ export default class Sync extends Command { flags ); - if (operation.addTranslations && !operation.peek) { + if (!operation.peek) { formatter.logAddTranslations(operation.file, operation.documentPath); }