Code Monkey home page Code Monkey logo

Comments (3)

JiriTrecak avatar JiriTrecak commented on July 17, 2024

Hey Donald,

I will look into it later this week, I have few things that I want to investigate and this is one of them. My understanding is that xliff files are only for interchange between you as developer and translator, but they should get decoded back to Localizable.strings once you actually import them, right (please correct me if I am wrong)? So that means that at the end (once you do round of export - translate - import), the input can still get processed from .strings and nothing changes internally?

I have not personally worked with them - I will try and see, if it presents some problem that would have to be solved on generator level.

I will keep you posted (and if you can give me more insight, that would be also great).

Have a very nice Xmas

Jiri

from laurine.

donaldpiret avatar donaldpiret commented on July 17, 2024

Hi Jiri,

Merry Xmas,
Your understanding of the xliff files is entirely correct. The only thing that makes Laurine hard to use with the built-in xliff system is that apple apparently does not allow you to export to xliff existing .strings files, and will only extract translations from storyboards or from NSLocalizedString calls in the code.
Because of this the only way to work with both systems is to keep the Laurine strings in a manually maintained .strings file (not named Localizable.strings, as that will get overwritten during import of xliff files), and then work with two separate translation files when uploading and downloading from translation management platforms, which is really quite cumbersome.

I haven't been able to figure out a good workaround for this problem, as it seems that the only way to get these tools to properly work together would be to modify the tool apple uses to generate the xliff files to include manually generated .strings files (or perhaps get the Laurine generator to create a source file with dummy NSLocalizedString entries just for the purpose of extraction to xliff).

Cheers,

D

from laurine.

pfandrade avatar pfandrade commented on July 17, 2024

Hey,

If you generate code that calls NSLocalizedString* macros directly instead of using the swift String extensions (like you're doing for ObjC) then Xcode will pick up those string when exporting to XLIff.

The Swift extensions do not bring any advantages anyway.

from laurine.

Related Issues (20)

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.