How get new strings into xliff?

I only knew xliff export/import last week. I am experimenting with a test project and got a few puzzling questions.


1. I created several localizations, say English, zh-Hans and zh-Hant. After that I add new controls to main window. Now when I export to xliff files, I do not see the new strings in xliff files. I have to regenerate strings files and do export to get new strings into xliffs. Am I doing wrong or is this the required procedures?


2. I know I can use xbuild to automate generating strings files. But I cannot find any docs on xliff. Is xliff export/import feature only available in IDE?


3. Are there any known automating tools for all these tedious work except the translation part?

Accepted Answer

>> Now when I export to xliff files, I do not see the new strings in xliff files. I have to regenerate strings files and do export to get new strings into xliffs.


What exactly did you do? You say you exported to xliff and did not see "new strings", then you say you did get new strings from an xliff export. Those can't both be true, so which is it?


Here's what I did in a project with a base-localized storyboard, and one extra localization (French):


— I exported to xliff to verify that fr.liff contained references to the two labels in my storyboard. It did.


— I added a new label to the storyboard.


— I exported to xliff again. The new fr.liff contained references to all 3 strings.


With the xliff export/import workflow in Xcode, you typically do not "regenerate strings files", not manually. Xcode does this for you when you import, by merging the incoming localized text changes with your existing files. You don't edit language-specific text anywhere except externally to Xcode, in a xliff editor. (Well, I guess you can edit the strings files directly, and Xcode will show you a merge conflict at import time, if the incoming localized text doesn't match your in-Xcode edit.)


So, this is all working correctly for me. I don't know why you're seeing something different, if you are.

Ah, I found out why. It seems I have to save Main.Storyboard first. I thought it should export the current state no matter if the storyboard is saved.

Yeah, I think it should too. Submit a bug report!

Ah, that's not necessarily a bug. But it's should be a useful feature. But I think the devs won't listen to me because I have submitted many bugs, only a few of them are accepted.

How get new strings into xliff?
 
 
Q