Giter VIP home page Giter VIP logo

localizedstringkit's Issues

plural and stringsdict support

People familiar with other systems will almost immediately recognize this English-as-key approach as similar to gettext, a Unix translation facility from the late 1980s. Such a comparison will almost immediately raise a question: where is the plural facility?

If I am not mistaken, the current form of the python tool only generates strings files, which has no capacity to handle plural stuff (NSStringPluralRuleType). For truly international programs, this is often needed since plural rules vary widely among languages. Please consider putting plural support on your TODO list.

(Python has a builtin plistlib library that makes dealing with plists less of a headache. You will still need to come up with a way to select the NSStringFormatValueTypeKey used for the plural though.)

What is the use-case for this library compared to Xcode - Export for Localization and import?

I am trying to better understand the use-case for this library compared to the standard localisation workflow in Xcode.

In the readme you say:

LocalizedStringKit is a tool that lets you write English strings directly into your source code and generate the required .strings files later. No more manually managing string keys or remembering to add them to the strings file later. All you do is change:
label.text = NSLocalizedString("TERMS_SCREEN_MAIN_HEADER", "Comment here...")
...

If you use NSLocalizedString, you can write English strings directly into the source code as the key parameter (in the same way as with the replacement function in this library). Then to generate the strings files for the other languages, in Xcode,

  1. Select the project in the sidebar
  2. Select, menu item Editor -> Export for Localization
  3. Add the target translations to the resulting XLIFF
  4. Then import again with Editor -> Import Localisation
    Result: Xcode will create the strings files and add them to the project

Furthermore, If you alternatively use keys such as NSLocalizedString("my.string.a", ..), you can export the development language, in the same way as described above, and import to generate the strings file for the development language.

Is this library for when you don't use Xcode, or don't want to use the xliff-based workflow (for some reason)?

Swift Package Manager support

Thanks a lot for this library, I'd be interested to integrate it into my projects, but none of those use Carthage. It would be great if LocalizedStringKit supported SwiftPM, are there any plans for that?

Failed to exclude Carthage file

My command:
localizedstringkit --exclude Carthage --path . --localized-string-kit-path ./LocalizedStringKit

Then the error is:
Found invalid calls to Localized in file Found invalid calls to Localized ./Carthage/Checkouts/localizedstringkit

My project directory looks like:

project root
- Carthage
- LocalizedStringKit
- LocalizedStringKit.bundle

Not sure what's wrong, but I have to use SPM to workaround this issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.