Refresh POT in PoEdit - localization

I created a POT to translate my website and generated a MO file.
I created a new project and improted from POT file, during the translation I noticed a few errors on my original POT.
I made the corrections and now I want to "refresh" the POT file, to update my translation project without lossing all the translation I've done.
How can I do this?

Use msgmerge. Everything is explained in the GNU gettext manual.

Related

need to recover trados project with translation

I was working on a language translation project in trados on a virtual machine. Half of the work was done and the translated words were exported into a Word docx file. Upon restarting the virtul machine, the project file appears to have been corrupted as trados shows no signs that the project was worked on. When I manually open the sdlproj (trados project) file, trados cannot open the file mentioning the following:
: An error occured whilst trying to determine the file version
I have tried creating a new project and used pre-translate using batch tasks but that did not seem to have imported the previously translated document. I need to figure out how to recover my project so that I can recover the translated document (so I do not have to redo the work) as well as recover the translation memory for trados. The translation memory folder is present inside the original project folder. I would really appreciate any suggestion to further troubleshoot and fix this issue. I have tried their support desk but they do not appear to be available today. Two solutions I observed from their forum suggested:
save the project file with a zip extension, extract the contents and then open the sdlxiff file from there
recreate the project and use pre-translate.
In my case, I was able to open the sdlxiff file from the translated language directory. This opened the project with the text that had previously been translated. I am not certain whether I need to remove the sdlproj file or simply save the project hoping that it will overwrite the corrupted file. In either case, I will update this post once I get an answer to that.

Why did the Atom text editor make unexpected changes to these po files when I saved them?

I used Atom to edit some PO translation files for the Neovim project, but when I saved the files, Atom changed a bunch of other lines (which I did not edit) in each file.
You can see the results in this commit. Basically each translation file has 5-10 other lines that git says are also changed.
I'm guessing there was some kind of encoding issue, can anyone provide a more detailed explanation?
Also, how do I edit these files without messing with the encoding?

Cocos 2D GUI & Xcode 5

I have an iOS game app that was created in Cocos 2D & Box 2D by an outside developer where I need to make some minor UI modifications (nudging platforms, item positions, etc.).
Normally, to get a visual view of the app in previous versions of Xcode, you would go to the .xib file. In Xcode 5 this is supposedly replaced with main.storyboard. Though I can build & run my project in the simulator or as an .iap file on my device, I cannot figure out how to make corrections to graphics (re positioning) as I would normally do. The main.storyboard file doesn't exist in my project.
Current file extensions represented:
.h, .mm, .cpp, .cmake, .pch
Thanks in advance.
Most cocos2d apps position "graphics" in code. Storyboard and xib files are not used at all for visual layout of cocos2d elements (nodes).
At best you'll find ccb or ccbi files which would indicate that CocosBuilder was used to design the scene's layouts. If there are no such files, you have to look into and modify the code.
If it was created in cocos2d/box2d, there are any number of ways that the presentation could have been created. Usually these don't involve storyboard/.xib files for cocos2d/box2d.
All the files you listed are standard code files; I don't see any graphics files (.png, .pvr, etc.) or physics editor files (.pes) in your list, or CocosBuilder files (ccb/ccbi). There are probably more file extensions in your project that you may want to find. You could potentially list out all the file extensions in your project, and maybe somebody on SO will be able to help you identify the tool or tweak the code by posting it.
However, I think the best option is to find a developer familiar with these technologies, let them take a look at the code, and get you back on track.
You may type a lot into SO and wait a long time for an answer to something a good developer could find for you in a few hours. If this is an academic (no commercial project), they may do it for free. Or for a nominal fee for a commercial project. Or for good will. Or the fun of it. etc.

Can't find a working free xliff editor for OSX Lion

Attempts
I tried:
Virtaal
PoEdit (not xliff but convertible)
Open Language Tools TransEditor
LocFactory Editor
And I think I'm getting nuts.
Virtaal
With Virtaal it seems I can't create files (or am I to stupid ?). Also when I open the tutorial .po and try to save that, Virtaal crashes.
PoEdit
With PoEdit I can create a new project but on finishing he throws me an error:
Poedit did not find any files in scanned directories.
Entries in the catalog are probably incorrect.
Updating the catalog failed. Click on 'More>>' for details.
Open Language Tools TransEditor
And in Open Language Tools TransEditor I created a new project but I can't create any new lines/translations.
LocFactory Editor
I also tried LocFactory Editor. When I launch it I get
No document could be created
And in the menus I also can't find anything like New File or so.
Question
So what is that ? Am I to dumb to create xliff files using an xliff editor ? should I google for xliff creator or what ?
Requirements
I want to have xliff files for a FLOW3 project.
I'd like to use an editor that supports plural forms.
Support for Mac OS X
Hi you can try this one
XLIFFTool
You may want to try OmegaT.
It's not just for XLIFF, but it should work reasonably well with XLIFF documents.
Make sure the elements have a copy of the text to translate before opening the file in OmegaT. You can also use Rainbow to create an OmegaT project with XLIFF files: it will add the copy of the source text for you.
Hope this helps,
-ys
There is free XLIFF online editor at Brightec. Not sure about plural forms support.
you can use poedit tool for that.

How does incremental localization work?

I'm trying to build my first localized application. I have all the strings in code translated using NSLocalizedString (for use with genstrings tool). Now I'm bumping into ibtool. How does incremental localization work? Regarding to the manual page, I should write something like this:
$ ibtool --previous-file path/to/prev.xib \
--incremental-file path/to/inc.xib --localize-incremental \
--write path/to/new.xib mod.xib
Where do I get the incremental file? To my understanding if I'm using the version control (git/svn), the "old" file is at few commits ago, the incremental file is the diff and path/to/new.xib is newly produced xib file. mod.nib is a mystery to me. Can anyone explain me how this works? Also - how do I start the localization of a xib if no previous versions are available (i.e. doing not incremental, but initial localization)?
I think their choice of terminology, particularly for --incremental-file, is causing confusion. The idea is that you have an old version of your xib in two languages (source and target) and that you have since changed it in your source-language and want to update the target-language version to match.
Let's take an example. You previously had home.xib in English (source language) and got someone to translate it to French (target language). You've since developed a new feature and you now have an updated version of home.xib in English in which you added a UILabel and a UITextField and moved things around. The command you showed can help you get an updated version of home.xib in French so that it has the new UILabel and UITextField and that things are moved around like in English. Note that any textual content that you set in your new UILabel and UITextField will be added in English and will then need to be translated in the French xib (but you can automate this by adding --import-strings-file and providing the translations in one more file).
So if we map the command you showed to this example:
--previous-file path/to/prev.xib specifies the old English xib
--incremental-file path/to/inc.xib specifies the old French xib
--write path/to/new.xib specifies the new French xib that will be created
mod.xib specifies the new English xib
For your other question regarding how you start the process, really it depends how you will localize your xibs. You'll obviously create the new language versions of the xibs (in XCode, you just add a language to the language list of the xib and the localized xibs are created automatically). And then if you localize them in Interface Builder yourself, then you'll simply make the relevant changes (translation of text and any necessary resizing) in the localized xibs. Or you could extract the text in the xibs into .strings files, get them translated, and inject them into the relevant language version of these xibs. For this, again you will use ibtool but with --generate-strings-file for the extract phase and with --import-strings-file for the inject phase.
I wrote a script for git projects which automates the steps necessary (as described in the answer above) to migrate a change to a different language.
Usage:
migrate_changes.sh <target_language> <xib file without ending>
Example:
After you've committed your changes to the english xib file, run the script at the root of your resource folder.
migrate_changes.sh de MyViewController
Source:
#!/bin/sh
LANG_FROM='en'
LANG_TO=$1
XIB_FILE=$2
FROM_FILE=${LANG_FROM}.lproj/${XIB_FILE}.xib
PREV_FILE=${LANG_FROM}.lproj/${XIB_FILE}_old.xib
TO_FILE=${LANG_TO}.lproj/${XIB_FILE}.xib
# checkout old version of xib file
git show `git log -2 --format="%H" $FROM_FILE | tail -n 1`:./$FROM_FILE > $PREV_FILE
# merge changes
ibtool --previous-file $PREV_FILE --incremental-file $TO_FILE --localize-incremental --write $TO_FILE $FROM_FILE
# remove previous version
rm $PREV_FILE

Resources