From 09dc8317687b67488e6527ec31e2c00203ae09a2 Mon Sep 17 00:00:00 2001 From: David Jennes Date: Sun, 14 Jun 2020 20:54:44 +0200 Subject: [PATCH] Update docs --- Documentation/templates/strings/flat-swift4.md | 2 +- Documentation/templates/strings/flat-swift5.md | 2 +- Documentation/templates/strings/structured-swift4.md | 2 +- Documentation/templates/strings/structured-swift5.md | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Documentation/templates/strings/flat-swift4.md b/Documentation/templates/strings/flat-swift4.md index 594fd325..3fb672d2 100644 --- a/Documentation/templates/strings/flat-swift4.md +++ b/Documentation/templates/strings/flat-swift4.md @@ -21,7 +21,7 @@ You can customize some elements of this template by overriding the following par | `enumName` | `L10n` | Allows you to change the name of the generated `enum` containing all string tables. | | `noComments` | N/A | Setting this parameter will disable the comments describing the translation of a key. | | `publicAccess` | N/A | If set, the generated constants will be marked as `public`. Otherwise, they'll be declared `internal`. | -| `localizeFunction` | `NSLocalizedString` | Allows you to set your own custom localization function. Your custom function must have the same signature as the one provided by `Foundation`, i.e. `yourFunctionName(_:tableName:bundle:comment:)` | +| `lookupFunction` | N/A | Allows you to set your own custom localization function. The function needs to accepts 2 parameters: the localization key (`String`), and the localization table (`String`). If the function has named parameters, you must provide the complete function signature, including those named parameters – e.g. `yourFunctionName(forKey:table:)`. | | `forceFileNameEnum` | N/A | Setting this parameter will generate an `enum ` _even if_ only one FileName was provided as input. | ## Generated Code diff --git a/Documentation/templates/strings/flat-swift5.md b/Documentation/templates/strings/flat-swift5.md index f891962d..17508d81 100644 --- a/Documentation/templates/strings/flat-swift5.md +++ b/Documentation/templates/strings/flat-swift5.md @@ -21,7 +21,7 @@ You can customize some elements of this template by overriding the following par | `enumName` | `L10n` | Allows you to change the name of the generated `enum` containing all string tables. | | `noComments` | N/A | Setting this parameter will disable the comments describing the translation of a key. | | `publicAccess` | N/A | If set, the generated constants will be marked as `public`. Otherwise, they'll be declared `internal`. | -| `localizeFunction` | `NSLocalizedString` | Allows you to set your own custom localization function. Your custom function must have the same signature as the one provided by `Foundation`, i.e. `yourFunctionName(_:tableName:bundle:comment:)` | +| `lookupFunction` | N/A | Allows you to set your own custom localization function. The function needs to accepts 2 parameters: the localization key (`String`), and the localization table (`String`). If the function has named parameters, you must provide the complete function signature, including those named parameters – e.g. `yourFunctionName(forKey:table:)`. | | `forceFileNameEnum` | N/A | Setting this parameter will generate an `enum ` _even if_ only one FileName was provided as input. | ## Generated Code diff --git a/Documentation/templates/strings/structured-swift4.md b/Documentation/templates/strings/structured-swift4.md index f96f78ac..cae2f0b3 100644 --- a/Documentation/templates/strings/structured-swift4.md +++ b/Documentation/templates/strings/structured-swift4.md @@ -27,7 +27,7 @@ You can customize some elements of this template by overriding the following par | `enumName` | `L10n` | Allows you to change the name of the generated `enum` containing all string tables. | | `noComments` | N/A | Setting this parameter will disable the comments describing the translation of a key. | | `publicAccess` | N/A | If set, the generated constants will be marked as `public`. Otherwise, they'll be declared `internal`. | -| `localizeFunction` | `NSLocalizedString` | Allows you to set your own custom localization function. Your custom function must have the same signature as the one provided by `Foundation`, i.e. `yourFunctionName(_:tableName:bundle:comment:)` | +| `lookupFunction` | N/A | Allows you to set your own custom localization function. The function needs to accepts 2 parameters: the localization key (`String`), and the localization table (`String`). If the function has named parameters, you must provide the complete function signature, including those named parameters – e.g. `yourFunctionName(forKey:table:)`. | | `forceFileNameEnum` | N/A | Setting this parameter will generate an `enum ` _even if_ only one FileName was provided as input. | ## Generated Code diff --git a/Documentation/templates/strings/structured-swift5.md b/Documentation/templates/strings/structured-swift5.md index 68a8a78f..2dfa0712 100644 --- a/Documentation/templates/strings/structured-swift5.md +++ b/Documentation/templates/strings/structured-swift5.md @@ -27,7 +27,7 @@ You can customize some elements of this template by overriding the following par | `enumName` | `L10n` | Allows you to change the name of the generated `enum` containing all string tables. | | `noComments` | N/A | Setting this parameter will disable the comments describing the translation of a key. | | `publicAccess` | N/A | If set, the generated constants will be marked as `public`. Otherwise, they'll be declared `internal`. | -| `localizeFunction` | `NSLocalizedString` | Allows you to set your own custom localization function. Your custom function must have the same signature as the one provided by `Foundation`, i.e. `yourFunctionName(_:tableName:bundle:comment:)` | +| `lookupFunction` | N/A | Allows you to set your own custom localization function. The function needs to accepts 2 parameters: the localization key (`String`), and the localization table (`String`). If the function has named parameters, you must provide the complete function signature, including those named parameters – e.g. `yourFunctionName(forKey:table:)`. | | `forceFileNameEnum` | N/A | Setting this parameter will generate an `enum ` _even if_ only one FileName was provided as input. | ## Generated Code