Export only checked translation strings

Often a new release of the app building software brings new phrases that need to be translated into other languages. The translation strings can be exported and sent to someone speaking the target language of the app, but the export includes all the possible languages. Would it be possible for an export of the translation strings to only include the languages that have been checked for use in the app?

This would allow for a file that is easier for the person being asked to add the missing phrases to navigate and edit then the entire list of languages included in the export. The difference in the two files would be as shown.

Needed:

needed languages

vs. all the possible languages.

all languages

I use Notepad++. You can use find/replace with regular expressions.

Find:

(?:^\w+(?<!en|fr): [^\r\n]+\r\n)+

Replace with nothing and click Replace All.

In your case find:

(?:^\w+(?<!en|id|bjn): [^\r\n]+\r\n)+

To take it further ... I used regex to add some tabs and copied it to a spreadsheet.

Then I CTRL+click to select the 2nd column and a language column and run a more complicated regex on them to get it back to the original format. I use RegexBuddy for this, but it might work in Notepad++.

The bit with the xxxxx’s is to get rid of the additional translation stuff I added to the spreadsheet for the About page, etc.

There still needs to be a bit of manual cleanup to the final text, but I use the original export as an example.

One of the files I use for import is just to replace one word in the English, and the entire file is:

# Interface Translations
# Bible Society of South Africa
# Created: 20-08-2021

[Translations]

$ Menu_Contents
en: Home

Importing this back into SAB then overwrites the entry for $ Menu_Contents.

Hi Greg,

I’m familiar with and use Notepad++ to clean up the files too. It’s a great text editor. (I wish there was a Mac version.) I don’t do it the same way as you show, I’m not as adapt a coder, but I get it done as my screen shot showed.

Regardless of what we do there are a number of steps to get to the desired result and it’s something that is frequently needed, hence, my suggesting it as a feature request, though I now realize I probably have not submitted it correctly as a feature request.

I really appreciate your examples and will look at them the next time I need to do this. It may be a more direct way over my bookmarking the unneeded lines and then deleting them. But I’m still hopeful the app guys can make an easier way to export the strings as needed.

I also create a new project with each new SAB release and export the languages to compare with the previous version using WinMerge to see what new strings have appeared since the last update. an easier way to do this would be appreciated on my side as well.

I will be happy to help you process your languages for next time.