This commit is contained in:
Dale 2020-02-11 11:54:31 +00:00 коммит произвёл GitHub
Родитель 057c899336
Коммит 7a384e3e47
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 0 добавлений и 44 удалений

Просмотреть файл

@ -1,44 +0,0 @@
# LocalizedStringKit.framework
This framework provides a simplified API for localized strings and can be attached to all targets that need string localization.
```swift
public func Localized(value: String, _ comment: String) -> String
// ...
let label = UILabel()
label.text = Localized("Mail", "The label text for the Mail tab.")
```
```objc
NSString *Localized(NSString *value, NSString *comment);
// ...
UILabel *label = [[UILabel alloc] init]
label.text = Localized(@"Mail", @"The label text for the Mail tab.")
```
...
```bash
./LocalizedStringKit/localize.py
git commit -a -m "Add localized label text for the Mail tab label"
```
## `localize.py`
This script processes all of the source files (`*.swift` and `*.m`) for occurrences of the `Localized` function and translates them to `NSLocalizedString` function calls. Then the output is passed to `genstrings` to generate an updated `LocalizedStringKit/en.lproj/LocalizedStringKit.strings` file.
The script currently searches these directories:
- `app-ios`
- `ComposeShareExtension`
- `app-ios WatchKit App`
- `app-ios WatchKit Extension`
- `app-ios WatchOS App`
- `app-ios WatchOS App Extension`
- `OutlookUI`
- `AcompliKit`