Skip to content

Commit 7c6060c

Browse files
committed
Added localization for intents
1 parent f055447 commit 7c6060c

File tree

3 files changed

+62
-29
lines changed

3 files changed

+62
-29
lines changed

Cryptomator.xcodeproj/project.pbxproj

+16-6
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,8 @@
7373
4A248231266FB799002D9F59 /* FileProviderAdapterStartProvidingItemTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A248230266FB799002D9F59 /* FileProviderAdapterStartProvidingItemTests.swift */; };
7474
4A2482332670D6FB002D9F59 /* FileProviderAdapterManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A2482322670D6FB002D9F59 /* FileProviderAdapterManager.swift */; };
7575
4A2482352671110A002D9F59 /* DBManagerError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A2482342671110A002D9F59 /* DBManagerError.swift */; };
76+
4A2745E228475F3500E70D5F /* Intents.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = 4A2745E528475F3600E70D5F /* Intents.intentdefinition */; settings = {ATTRIBUTES = (no_codegen, ); }; };
77+
4A2745E328475F3600E70D5F /* Intents.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = 4A2745E528475F3600E70D5F /* Intents.intentdefinition */; };
7678
4A2C1E7B2760B09A000CD726 /* IAPViewModelTestCase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A2C1E7A2760B09A000CD726 /* IAPViewModelTestCase.swift */; };
7779
4A2F373724B47DB800460FD3 /* UploadTaskManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A2F373624B47DB800460FD3 /* UploadTaskManagerTests.swift */; };
7880
4A2FD04425B1C3BB008565C8 /* EmptyListMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A2FD04325B1C3BB008565C8 /* EmptyListMessage.swift */; };
@@ -199,7 +201,6 @@
199201
4A80407D27692A0100D7D999 /* FileProviderEnumeratorSnapshotMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A80407C27692A0100D7D999 /* FileProviderEnumeratorSnapshotMock.swift */; };
200202
4A80408027694C6600D7D999 /* VaultUnlockingServiceSourceSnapshotMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A80407F27694C6600D7D999 /* VaultUnlockingServiceSourceSnapshotMock.swift */; };
201203
4A804082276952C300D7D999 /* FileProviderCoordinatorSnapshotMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A804081276952C300D7D999 /* FileProviderCoordinatorSnapshotMock.swift */; };
202-
4A82C88A2832443D00548F87 /* Intents.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = 4ABB4626282EBE4B00968C5E /* Intents.intentdefinition */; settings = {ATTRIBUTES = (no_codegen, ); }; };
203204
4A85ECBE283CBF4700E23024 /* FileImportingServiceSourceTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A85ECBD283CBF4700E23024 /* FileImportingServiceSourceTests.swift */; };
204205
4A85ECC4283D0DED00E23024 /* GetFolderIntentHandlerError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A85ECC3283D0DED00E23024 /* GetFolderIntentHandlerError.swift */; };
205206
4A88816427440CE300F7AA6E /* BaseUITableViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A88816327440CE300F7AA6E /* BaseUITableViewController.swift */; };
@@ -273,7 +274,6 @@
273274
4AB8539826BA881F00555F00 /* VaultDetailUnlockVaultViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4AB8539726BA881F00555F00 /* VaultDetailUnlockVaultViewModel.swift */; };
274275
4AB8539C26BA8A8200555F00 /* VaultPasswordVerifying.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4AB8539B26BA8A8200555F00 /* VaultPasswordVerifying.swift */; };
275276
4AB8539E26BA8B4C00555F00 /* VaultDetailUnlockCoordinator.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4AB8539D26BA8B4C00555F00 /* VaultDetailUnlockCoordinator.swift */; };
276-
4ABB4627282EBE4B00968C5E /* Intents.intentdefinition in Sources */ = {isa = PBXBuildFile; fileRef = 4ABB4626282EBE4B00968C5E /* Intents.intentdefinition */; };
277277
4ABC08D7250D1EB600E3CEDC /* DeletionTaskManagerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4ABC08D6250D1EB600E3CEDC /* DeletionTaskManagerTests.swift */; };
278278
4ABCF3522726D24800A7FBB7 /* MoveVaultViewModelTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4ABCF3512726D24800A7FBB7 /* MoveVaultViewModelTests.swift */; };
279279
4AC005F127C3D80B006FFE87 /* PremiumManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4AC005F027C3D80B006FFE87 /* PremiumManager.swift */; };
@@ -585,6 +585,8 @@
585585
4A248230266FB799002D9F59 /* FileProviderAdapterStartProvidingItemTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileProviderAdapterStartProvidingItemTests.swift; sourceTree = "<group>"; };
586586
4A2482322670D6FB002D9F59 /* FileProviderAdapterManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FileProviderAdapterManager.swift; sourceTree = "<group>"; };
587587
4A2482342671110A002D9F59 /* DBManagerError.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DBManagerError.swift; sourceTree = "<group>"; };
588+
4A2745E428475F3600E70D5F /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.intentdefinition; name = Base; path = Base.lproj/Intents.intentdefinition; sourceTree = "<group>"; };
589+
4A2745F7284769B800E70D5F /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Intents.strings; sourceTree = "<group>"; };
588590
4A2C1E7A2760B09A000CD726 /* IAPViewModelTestCase.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IAPViewModelTestCase.swift; sourceTree = "<group>"; };
589591
4A2F373624B47DB800460FD3 /* UploadTaskManagerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UploadTaskManagerTests.swift; sourceTree = "<group>"; };
590592
4A2FD04325B1C3BB008565C8 /* EmptyListMessage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = EmptyListMessage.swift; sourceTree = "<group>"; };
@@ -790,7 +792,6 @@
790792
4AB8539726BA881F00555F00 /* VaultDetailUnlockVaultViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VaultDetailUnlockVaultViewModel.swift; sourceTree = "<group>"; };
791793
4AB8539B26BA8A8200555F00 /* VaultPasswordVerifying.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VaultPasswordVerifying.swift; sourceTree = "<group>"; };
792794
4AB8539D26BA8B4C00555F00 /* VaultDetailUnlockCoordinator.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = VaultDetailUnlockCoordinator.swift; sourceTree = "<group>"; };
793-
4ABB4626282EBE4B00968C5E /* Intents.intentdefinition */ = {isa = PBXFileReference; lastKnownFileType = file.intentdefinition; path = Intents.intentdefinition; sourceTree = "<group>"; };
794795
4ABC08D6250D1EB600E3CEDC /* DeletionTaskManagerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DeletionTaskManagerTests.swift; sourceTree = "<group>"; };
795796
4ABCF3512726D24800A7FBB7 /* MoveVaultViewModelTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MoveVaultViewModelTests.swift; sourceTree = "<group>"; };
796797
4AC005F027C3D80B006FFE87 /* PremiumManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PremiumManager.swift; sourceTree = "<group>"; };
@@ -1654,7 +1655,7 @@
16541655
isa = PBXGroup;
16551656
children = (
16561657
4A753FBB2832A371006A9C3F /* CryptomatorIntents.entitlements */,
1657-
4ABB4626282EBE4B00968C5E /* Intents.intentdefinition */,
1658+
4A2745E528475F3600E70D5F /* Intents.intentdefinition */,
16581659
4AD3D7DA282EBDE7008188CD /* Info.plist */,
16591660
4AA08E7E28379C6100972A15 /* GetFolderIntentHandler.swift */,
16601661
4A85ECC3283D0DED00E23024 /* GetFolderIntentHandlerError.swift */,
@@ -2529,7 +2530,7 @@
25292530
buildActionMask = 2147483647;
25302531
files = (
25312532
4A33092B282EBF9900876A3E /* SaveFileIntentHandler.swift in Sources */,
2532-
4ABB4627282EBE4B00968C5E /* Intents.intentdefinition in Sources */,
2533+
4A2745E328475F3600E70D5F /* Intents.intentdefinition in Sources */,
25332534
4A85ECC4283D0DED00E23024 /* GetFolderIntentHandlerError.swift in Sources */,
25342535
4AD3D7D9282EBDE7008188CD /* IntentHandler.swift in Sources */,
25352536
4AA08E7F28379C6100972A15 /* GetFolderIntentHandler.swift in Sources */,
@@ -2696,7 +2697,7 @@
26962697
4A644B4B267B4C08008CBB9A /* CreateNewVaultChooseFolderViewController.swift in Sources */,
26972698
4A447E1B25BF0DE300D9520D /* ChooseFolderViewController.swift in Sources */,
26982699
4A88816427440CE300F7AA6E /* BaseUITableViewController.swift in Sources */,
2699-
4A82C88A2832443D00548F87 /* Intents.intentdefinition in Sources */,
2700+
4A2745E228475F3500E70D5F /* Intents.intentdefinition in Sources */,
27002701
4AF91CE225A7234500ACF01E /* DatabaseManager.swift in Sources */,
27012702
4A3C5DDA272BF52600EB7C7A /* TextFieldCellViewModel.swift in Sources */,
27022703
4AFCE51F25B89CD80069C4FC /* CloudProviderType+Localization.swift in Sources */,
@@ -2896,6 +2897,15 @@
28962897
/* End PBXTargetDependency section */
28972898

28982899
/* Begin PBXVariantGroup section */
2900+
4A2745E528475F3600E70D5F /* Intents.intentdefinition */ = {
2901+
isa = PBXVariantGroup;
2902+
children = (
2903+
4A2745E428475F3600E70D5F /* Base */,
2904+
4A2745F7284769B800E70D5F /* en */,
2905+
);
2906+
name = Intents.intentdefinition;
2907+
sourceTree = "<group>";
2908+
};
28992909
4AE97DB524572E4A00452814 /* LaunchScreen.storyboard */ = {
29002910
isa = PBXVariantGroup;
29012911
children = (

CryptomatorIntents/Intents.intentdefinition renamed to CryptomatorIntents/Base.lproj/Intents.intentdefinition

+25-23
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,9 @@
2424
<key>INIntentDefaultImageName</key>
2525
<string>bot</string>
2626
<key>INIntentDescription</key>
27-
<string>Saves a file to a vault</string>
27+
<string>Saves a file to a vault.</string>
2828
<key>INIntentDescriptionID</key>
29-
<string>UN1SvF</string>
29+
<string>saveFileIntent.description</string>
3030
<key>INIntentIneligibleForSuggestions</key>
3131
<true/>
3232
<key>INIntentInput</key>
@@ -44,7 +44,7 @@
4444
<key>INIntentParameterCombinationTitle</key>
4545
<string>Save ${file} to ${folder}</string>
4646
<key>INIntentParameterCombinationTitleID</key>
47-
<string>PkFbjn</string>
47+
<string>saveFileIntent.text</string>
4848
<key>INIntentParameterCombinationUpdatesLinked</key>
4949
<true/>
5050
</dict>
@@ -59,7 +59,7 @@
5959
<key>INIntentParameterDisplayName</key>
6060
<string>File</string>
6161
<key>INIntentParameterDisplayNameID</key>
62-
<string>AJzrnx</string>
62+
<string>saveFileIntent.file</string>
6363
<key>INIntentParameterDisplayPriority</key>
6464
<integer>1</integer>
6565
<key>INIntentParameterMetadata</key>
@@ -112,7 +112,7 @@
112112
<key>INIntentParameterDisplayName</key>
113113
<string>Folder</string>
114114
<key>INIntentParameterDisplayNameID</key>
115-
<string>2o44Pd</string>
115+
<string>common.folder</string>
116116
<key>INIntentParameterDisplayPriority</key>
117117
<integer>2</integer>
118118
<key>INIntentParameterName</key>
@@ -149,7 +149,7 @@
149149
<key>INIntentParameterDisplayName</key>
150150
<string>Ignore existing file with same name</string>
151151
<key>INIntentParameterDisplayNameID</key>
152-
<string>ft89SM</string>
152+
<string>saveFileIntent.parameter.ignoreExisting</string>
153153
<key>INIntentParameterDisplayPriority</key>
154154
<integer>3</integer>
155155
<key>INIntentParameterMetadata</key>
@@ -159,11 +159,11 @@
159159
<key>INIntentParameterMetadataFalseDisplayName</key>
160160
<string>false</string>
161161
<key>INIntentParameterMetadataFalseDisplayNameID</key>
162-
<string>WrUDZT</string>
162+
<string>common.false</string>
163163
<key>INIntentParameterMetadataTrueDisplayName</key>
164164
<string>true</string>
165165
<key>INIntentParameterMetadataTrueDisplayNameID</key>
166-
<string>3g4nj9</string>
166+
<string>common.true</string>
167167
</dict>
168168
<key>INIntentParameterName</key>
169169
<string>ignoreExisting</string>
@@ -202,7 +202,7 @@
202202
<key>INIntentResponseCodeConciseFormatString</key>
203203
<string>${failureReason}</string>
204204
<key>INIntentResponseCodeConciseFormatStringID</key>
205-
<string>NSH4gZ</string>
205+
<string>common.response.failure</string>
206206
<key>INIntentResponseCodeName</key>
207207
<string>failure</string>
208208
</dict>
@@ -215,7 +215,7 @@
215215
<key>INIntentResponseParameterDisplayName</key>
216216
<string>Failure Reason</string>
217217
<key>INIntentResponseParameterDisplayNameID</key>
218-
<string>CjPrfS</string>
218+
<string>common.failureReason</string>
219219
<key>INIntentResponseParameterDisplayPriority</key>
220220
<integer>1</integer>
221221
<key>INIntentResponseParameterName</key>
@@ -230,7 +230,7 @@
230230
<key>INIntentTitle</key>
231231
<string>Save File</string>
232232
<key>INIntentTitleID</key>
233-
<string>dlePJ1</string>
233+
<string>saveFileIntent.title</string>
234234
<key>INIntentType</key>
235235
<string>Custom</string>
236236
<key>INIntentVerb</key>
@@ -241,8 +241,10 @@
241241
<string>generic</string>
242242
<key>INIntentConfigurable</key>
243243
<true/>
244+
<key>INIntentDescription</key>
245+
<string>Returns a folder object for the given path in the given vault.</string>
244246
<key>INIntentDescriptionID</key>
245-
<string>dh0Nnc</string>
247+
<string>getFolderIntent.description</string>
246248
<key>INIntentIneligibleForSuggestions</key>
247249
<true/>
248250
<key>INIntentLastParameterTag</key>
@@ -256,7 +258,7 @@
256258
<key>INIntentParameterCombinationTitle</key>
257259
<string>Get folder located at ${path} in ${vault}</string>
258260
<key>INIntentParameterCombinationTitleID</key>
259-
<string>getFolderIntent.test</string>
261+
<string>getFolderIntent.text</string>
260262
<key>INIntentParameterCombinationUpdatesLinked</key>
261263
<true/>
262264
</dict>
@@ -271,7 +273,7 @@
271273
<key>INIntentParameterDisplayName</key>
272274
<string>Path</string>
273275
<key>INIntentParameterDisplayNameID</key>
274-
<string>0wBj7w</string>
276+
<string>getFolderIntent.path</string>
275277
<key>INIntentParameterDisplayPriority</key>
276278
<integer>1</integer>
277279
<key>INIntentParameterMetadata</key>
@@ -309,7 +311,7 @@
309311
<key>INIntentParameterDisplayName</key>
310312
<string>Vault</string>
311313
<key>INIntentParameterDisplayNameID</key>
312-
<string>W0waaV</string>
314+
<string>common.vault</string>
313315
<key>INIntentParameterDisplayPriority</key>
314316
<integer>2</integer>
315317
<key>INIntentParameterName</key>
@@ -355,7 +357,7 @@
355357
<key>INIntentResponseCodeConciseFormatString</key>
356358
<string>${failureReason}</string>
357359
<key>INIntentResponseCodeConciseFormatStringID</key>
358-
<string>KDmUbi</string>
360+
<string>common.response.failure</string>
359361
<key>INIntentResponseCodeName</key>
360362
<string>failure</string>
361363
</dict>
@@ -370,7 +372,7 @@
370372
<key>INIntentResponseParameterDisplayName</key>
371373
<string>Folder</string>
372374
<key>INIntentResponseParameterDisplayNameID</key>
373-
<string>7aJMCw</string>
375+
<string>common.folder</string>
374376
<key>INIntentResponseParameterDisplayPriority</key>
375377
<integer>1</integer>
376378
<key>INIntentResponseParameterName</key>
@@ -388,7 +390,7 @@
388390
<key>INIntentResponseParameterDisplayName</key>
389391
<string>Failure Reason</string>
390392
<key>INIntentResponseParameterDisplayNameID</key>
391-
<string>EdwH3n</string>
393+
<string>common.failureReason</string>
392394
<key>INIntentResponseParameterDisplayPriority</key>
393395
<integer>2</integer>
394396
<key>INIntentResponseParameterName</key>
@@ -403,7 +405,7 @@
403405
<key>INIntentTitle</key>
404406
<string>Get Folder</string>
405407
<key>INIntentTitleID</key>
406-
<string>Fdd6ta</string>
408+
<string>getFolderIntent.title</string>
407409
<key>INIntentType</key>
408410
<string>Custom</string>
409411
<key>INIntentVerb</key>
@@ -416,7 +418,7 @@
416418
<key>INTypeDisplayName</key>
417419
<string>Vault</string>
418420
<key>INTypeDisplayNameID</key>
419-
<string>lXc2vD</string>
421+
<string>common.vault</string>
420422
<key>INTypeLastPropertyTag</key>
421423
<integer>99</integer>
422424
<key>INTypeName</key>
@@ -477,9 +479,9 @@
477479
</dict>
478480
<dict>
479481
<key>INTypeDisplayName</key>
480-
<string>VaultFolder</string>
482+
<string>Vault Folder</string>
481483
<key>INTypeDisplayNameID</key>
482-
<string>9EErZb</string>
484+
<string>vaultFolder.displayName</string>
483485
<key>INTypeLastPropertyTag</key>
484486
<integer>100</integer>
485487
<key>INTypeName</key>
@@ -540,7 +542,7 @@
540542
<key>INTypePropertyDisplayName</key>
541543
<string>Vault Identifier</string>
542544
<key>INTypePropertyDisplayNameID</key>
543-
<string>BJqJ7P</string>
545+
<string>vaultFolder.vaultIdentifier</string>
544546
<key>INTypePropertyDisplayPriority</key>
545547
<integer>5</integer>
546548
<key>INTypePropertyName</key>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
"common.failureReason" = "Failure Reason";
2+
"common.false" = "false";
3+
"common.folder" = "Folder";
4+
"common.response.failure" = "${failureReason}";
5+
"common.true" = "true";
6+
"common.vault" = "Vault";
7+
8+
"getFolderIntent.description" = "Returns a folder object for the given path in the given vault.";
9+
"getFolderIntent.path" = "Path";
10+
"getFolderIntent.text" = "Get folder located at ${path} in ${vault}";
11+
"getFolderIntent.title" = "Get Folder";
12+
13+
"saveFileIntent.description" = "Saves a file to a vault.";
14+
"saveFileIntent.file" = "File";
15+
"saveFileIntent.parameter.ignoreExisting" = "Ignore existing file with same name";
16+
"saveFileIntent.text" = "Save ${file} to ${folder}";
17+
"saveFileIntent.title" = "Save File";
18+
19+
"vaultFolder.displayName" = "Vault Folder";
20+
"vaultFolder.vaultIdentifier" = "Vault Identifier";
21+

0 commit comments

Comments
 (0)