ProductPromotion
Logo

Swift

made by https://0x3d.site

GitHub - s2mr/L10nLint: Lint tool for Localizable.strings
Lint tool for Localizable.strings. Contribute to s2mr/L10nLint development by creating an account on GitHub.
Visit Site

GitHub - s2mr/L10nLint: Lint tool for Localizable.strings

GitHub - s2mr/L10nLint: Lint tool for Localizable.strings

L10nLint

Lint tool for your Localizable.strings

Lint command

Lint based on your .l10nlint.yml:

l10nlint

When run with Xcode prebuild script, shows warning and errors.

Rules

duplicate_key     Duplicated key should be resolved.
empty_key         Empty localized key should be resolved.
empty_value       Empty localized value should be resolved.
key_order         Between Base and each language file's key should be same order.
mark_syntax       Annotation should have around one space.
mixed_chinese     The mixing of traditional and simplified chinese characters should be resolved.
multi_linefeed    Linefeed should be one.
space_in_key      Key should not have space.
todo              TODOs and FIXMEs should be resolved.

Copy command

This is useful feature!✨

Copy keys to each strings based on your .l10nlint.yml:

l10nlint copy [--delete-marker]

https://user-images.githubusercontent.com/19924081/217507201-b7933fed-09bb-4ba6-aed0-5bed50b19695.mov

Define markers in your Base.lproj/Localizable.strings Surround to copy content with // @copy and // @end keyword. --delete-marker option is delete marker in your Base.lproj/Localizable.strings

If above line on your marker is comment, detect equality line, if above line on your marker is key, detect equality key.

// MARK: Main
"MainKey" = "Main value";
// @copy
"SecondGen1" = "Second gen value 1";
"SecondGen2" = "Second gen value 2";
// @end

Installation

Homebrew

brew install s2mr/tap/l10nlint

Swift Package Manager

Add the following to the dependencies of your Package.swift:

dependencies: [
    .package(url: "https://github.com/s2mr/L10nLint.git", from: "L10nLint version"),
]

Run command:

swift run -c release l10nlint [COMMAND] [OPTIONS]

Mint

Install with Mint by following command:

mint install s2mr/l10nlint

Run command:

mint run s2mr/l10nlint [COMMAND] [OPTIONS]

Using a pre-built binary

You can also install l10nlint by downloading l10nlint.zip from the latest GitHub release.

Setup

Place .l10nlint.yml file at your repository root. base_path is directory path that is contains Localizable.strings

Example:

base_path: YourApp/Resources/

disabled_rules:
  - empty_value

todo:
  is_summary_enabled: true
  summary_violation_limit: 20

Command completion

This command is built on swift-argument-parser.

Please refer to this article.

Replace example with l10nlint.

Help

l10nlint --help

---
OVERVIEW: Lint tool for your Localizable.strings

USAGE: l10nlint [--config <config>] <subcommand>

OPTIONS:
  --config <config>       Custom config file path
  --version               Show the version.
  -h, --help              Show help information.

SUBCOMMANDS:
  lint (default)          Lint your Localizable.strings
  rules                   Show all rules whether enabled or disabled
  copy                    Copy keys your Base Localizable.strings

  See 'l10nlint help <subcommand>' for detailed help.
l10nlint rules --help

---
OVERVIEW: Show all rules whether enabled or disabled

USAGE: l10nlint rules [--config <config>] [--print-parameters]

OPTIONS:
  --config <config>       Custom config file path
  --print-parameters      Show your rule's parameters in config
  -h, --help              Show help information.

More Resources
to explore the angular.

mail [email protected] to add your project or resources here 🔥.

Related Articles
to learn about angular.

FAQ's
to learn more about Angular JS.

mail [email protected] to add more queries here 🔍.

More Sites
to check out once you're finished browsing here.

0x3d
https://www.0x3d.site/
0x3d is designed for aggregating information.
NodeJS
https://nodejs.0x3d.site/
NodeJS Online Directory
Cross Platform
https://cross-platform.0x3d.site/
Cross Platform Online Directory
Open Source
https://open-source.0x3d.site/
Open Source Online Directory
Analytics
https://analytics.0x3d.site/
Analytics Online Directory
JavaScript
https://javascript.0x3d.site/
JavaScript Online Directory
GoLang
https://golang.0x3d.site/
GoLang Online Directory
Python
https://python.0x3d.site/
Python Online Directory
Swift
https://swift.0x3d.site/
Swift Online Directory
Rust
https://rust.0x3d.site/
Rust Online Directory
Scala
https://scala.0x3d.site/
Scala Online Directory
Ruby
https://ruby.0x3d.site/
Ruby Online Directory
Clojure
https://clojure.0x3d.site/
Clojure Online Directory
Elixir
https://elixir.0x3d.site/
Elixir Online Directory
Elm
https://elm.0x3d.site/
Elm Online Directory
Lua
https://lua.0x3d.site/
Lua Online Directory
C Programming
https://c-programming.0x3d.site/
C Programming Online Directory
C++ Programming
https://cpp-programming.0x3d.site/
C++ Programming Online Directory
R Programming
https://r-programming.0x3d.site/
R Programming Online Directory
Perl
https://perl.0x3d.site/
Perl Online Directory
Java
https://java.0x3d.site/
Java Online Directory
Kotlin
https://kotlin.0x3d.site/
Kotlin Online Directory
PHP
https://php.0x3d.site/
PHP Online Directory
React JS
https://react.0x3d.site/
React JS Online Directory
Angular
https://angular.0x3d.site/
Angular JS Online Directory