diff --git a/CotEditor/Localizables/AppShortcuts.xcstrings b/CotEditor/Localizables/AppShortcuts.xcstrings index 02f9c5434..511ffa975 100644 --- a/CotEditor/Localizables/AppShortcuts.xcstrings +++ b/CotEditor/Localizables/AppShortcuts.xcstrings @@ -1,14 +1,14 @@ { "sourceLanguage" : "en", "strings" : { - "Create Document in ${applicationName}" : { + "Create a document in ${applicationName}" : { "extractionState" : "extracted_with_value", "localizations" : { "de" : { "stringSet" : { "state" : "translated", "values" : [ - "Dokument in ${applicationName} erstellen" + "Ein Dokument in ${applicationName} erstellen" ] } }, @@ -16,7 +16,7 @@ "stringSet" : { "state" : "new", "values" : [ - "Create Document in ${applicationName}" + "Create a document in ${applicationName}" ] } }, @@ -24,7 +24,8 @@ "stringSet" : { "state" : "translated", "values" : [ - "Create Document in ${applicationName}" + "Create a document in ${applicationName}", + "Make a document in ${applicationName}" ] } }, @@ -32,7 +33,8 @@ "stringSet" : { "state" : "translated", "values" : [ - "${applicationName}で書類を作成" + "${applicationName}で書類を作成", + "${applicationName}で書類作成" ] } } diff --git a/CotEditor/Localizables/Intents.xcstrings b/CotEditor/Localizables/Intents.xcstrings index df3b09b48..0cce0f488 100644 --- a/CotEditor/Localizables/Intents.xcstrings +++ b/CotEditor/Localizables/Intents.xcstrings @@ -59,6 +59,35 @@ } } }, + "CreateDocumentIntent.shortTitle" : { + "extractionState" : "extracted_with_value", + "localizations" : { + "de" : { + "stringUnit" : { + "state" : "translated", + "value" : "Dokument erstellen" + } + }, + "en" : { + "stringUnit" : { + "state" : "new", + "value" : "Create Document" + } + }, + "en-GB" : { + "stringUnit" : { + "state" : "translated", + "value" : "Create Document" + } + }, + "ja" : { + "stringUnit" : { + "state" : "translated", + "value" : "書類を作成" + } + } + } + }, "CreateDocumentIntent.title" : { "extractionState" : "extracted_with_value", "localizations" : { diff --git a/CotEditor/Sources/DocumentShortcuts.swift b/CotEditor/Sources/DocumentShortcuts.swift index 63755c61f..67d9ade6c 100644 --- a/CotEditor/Sources/DocumentShortcuts.swift +++ b/CotEditor/Sources/DocumentShortcuts.swift @@ -32,9 +32,10 @@ struct DocumentShortcuts: AppShortcutsProvider { AppShortcut(intent: CreateDocumentIntent(), phrases: [ - "Create Document in \(.applicationName)", + "Create a document in \(.applicationName)", ], - shortTitle: "Create Document", + shortTitle: LocalizedStringResource("CreateDocumentIntent.shortTitle", + defaultValue: "Create Document", table: "Intents"), systemImageName: "text.document") } @@ -45,19 +46,18 @@ struct DocumentShortcuts: AppShortcutsProvider { struct CreateDocumentIntent: AppIntent { static let title = LocalizedStringResource("CreateDocumentIntent.title", - defaultValue: "Create Document", - table: "Intents") + defaultValue: "Create Document", table: "Intents") static let description = IntentDescription( - .init("CreateDocumentIntent.description", - defaultValue: "Create a new document with the specified text in CotEditor.", - table: "Intents") + LocalizedStringResource("CreateDocumentIntent.description", + defaultValue: "Create a new document with the specified text in CotEditor.", + table: "Intents") ) static let openAppWhenRun: Bool = true - @Parameter(title: .init("CreateDocumentIntent.Parameter.contents", - defaultValue: "Contents", table: "Intents"), + @Parameter(title: LocalizedStringResource("CreateDocumentIntent.Parameter.contents", + defaultValue: "Contents", table: "Intents"), inputOptions: .init(multiline: true)) var contents: String?