STRINGS file in MemoQ
Thread poster: Sergiy Butkov
Sergiy Butkov
Sergiy Butkov
Ukraine
Local time: 19:48
Member (2014)
English to Russian
+ ...
Mar 20, 2020

Hi everyone!

I've received the .STRINGS file for translation and I'm wondering if it's possible to handle it in the MemoQ (and then export translation back into the .STRINGS file).

In fact, it's like a text file with the string IDs and the content for translation. The strings content looks like this:

"weeklyDungeonPrizeNotification" = "Congratulations! This week's dungeon has ended and you ranked among the top players!";
"weeklyDungeonPrizeTipB" = "B
... See more
Hi everyone!

I've received the .STRINGS file for translation and I'm wondering if it's possible to handle it in the MemoQ (and then export translation back into the .STRINGS file).

In fact, it's like a text file with the string IDs and the content for translation. The strings content looks like this:

"weeklyDungeonPrizeNotification" = "Congratulations! This week's dungeon has ended and you ranked among the top players!";
"weeklyDungeonPrizeTipB" = "Being ranked among the top players by the end of a Weekly Dungeon grants exclusive prizes.";
"papaHendrix40-1-0-3" = "We'll have to sneak into the Castle from here.";
"papaHendrix40-1-0-4" = "We don't have much time. I'll tell\nyou about our plan while we move.";

I'd appreciate any ideas and advice, as I'm quite new to the MemoQ and couldn't find a solution myself.

Thank you in advance and stay safe in these crazy times!
Collapse


 
Philippe Etienne
Philippe Etienne  Identity Verified
Spain
Local time: 18:48
Member
English to French
The workhorse way Mar 20, 2020

This method is neither elegant nor quick, but sometimes it does save huge amounts of time compared to translating in a plain txt editor.

1. Prepare the file to be translated

- Open the .strings file in Word and convert it to .docx - check that you can go back to .strings without coding issue.
- Replace " = " with ^t (replace the middle bit with tabs)
- Replace ";^p" with ^p (clean start and end bits)
- Clean the bits left at the start and end of
... See more
This method is neither elegant nor quick, but sometimes it does save huge amounts of time compared to translating in a plain txt editor.

1. Prepare the file to be translated

- Open the .strings file in Word and convert it to .docx - check that you can go back to .strings without coding issue.
- Replace " = " with ^t (replace the middle bit with tabs)
- Replace ";^p" with ^p (clean start and end bits)
- Clean the bits left at the start and end of doc -> you have a tabbed file with variable names on the left and clean source text on the right
- Convert this to a table -> You have a table with variables in the left column and clean source in the right column
- Select the left column and hide it (font attribute hide)
- Save a docx file

2. Translate the source

- Stick the .docx file in MemoQ: you should have only the source
- Check that you can go back to a .strings file without issues
- Optionally and if possible, set \n (and any other tags) as tags in MemoQ for clarity (not sure how from the top of my head, but I think I've done it)
- Translate

3. Reinsert the target into the .strings file

Reverse the process of the first step.

Good luck,
Philippe
Collapse


John Fossey
 
Sergiy Butkov
Sergiy Butkov
Ukraine
Local time: 19:48
Member (2014)
English to Russian
+ ...
TOPIC STARTER
Time consuming but better than nothing ;) Mar 20, 2020

Thanks Philippe. I'll try this method, as I don't have anything better for now. Though, I hope some better (automated) way exists

 
Philippe Etienne
Philippe Etienne  Identity Verified
Spain
Local time: 18:48
Member
English to French
Apologies! Mar 20, 2020

Sergey Butkov wrote:
...I don't have anything better for now….

Although a manual and brutal way, it's a 5 min job (using replace all, of course).
Don't be so demanding.

Philippe


John Fossey
 
Stepan Konev
Stepan Konev  Identity Verified
Russian Federation
Local time: 20:48
English to Russian
Regex Tagger Mar 20, 2020

You can use Regex Tagger
Go to 'Preparation' tab > Regex Tagger
In the Regular expression field type: "(.*?)" = "
Tag type: Open
Press 'Add'
Don't press OK now.

Go back to the Regular expression field and type: ";
Tag type: Close
Press 'Add'

Press OK.

This will convert all your untranslatable content into tags.


Sergiy Butkov
ATET
 
Sergiy Butkov
Sergiy Butkov
Ukraine
Local time: 19:48
Member (2014)
English to Russian
+ ...
TOPIC STARTER
It worked Mar 21, 2020

Thanks a lot! The Regex filter worked well. It seems I need to learn more about this useful feature.

 
Johan Kjallman
Johan Kjallman  Identity Verified
Local time: 18:48
Member (2008)
English to Swedish
+ ...
Use the Regex text filter Mar 26, 2020

Hi Sergey,

I believe the best import filter for this type of file is the Regex text filter. There you can setup a paragraph rule to define what should be translated, what should be used for Context, Comments etc. If configured properly, you could use that context to generate 102 % TM matches (double context) in memoQ. I did a quick test with your file, but for some reason memoQ did not import the context as such this time. Still, you will get a clean import of only the parts that sh
... See more
Hi Sergey,

I believe the best import filter for this type of file is the Regex text filter. There you can setup a paragraph rule to define what should be translated, what should be used for Context, Comments etc. If configured properly, you could use that context to generate 102 % TM matches (double context) in memoQ. I did a quick test with your file, but for some reason memoQ did not import the context as such this time. Still, you will get a clean import of only the parts that should be translated while you can see the context in the Preview pane. You could also use the Regex Tagger to tag e.g. "\n" to avoid false positives during spellcheck etc. Hope that helps /J


Skärmavbild 2020-03-26 kl. 10.07.55

Skärmavbild 2020-03-26 kl. 10.23.48

Skärmavbild 2020-03-26 kl. 10.24.05
Collapse


 
Stepan Konev
Stepan Konev  Identity Verified
Russian Federation
Local time: 20:48
English to Russian
Thank you Johan Kjallman Mar 26, 2020

This is a very handy method. I didn't know I could do this. Will use it from now on. Thank you

 
Anthony Rudd
Anthony Rudd

Local time: 18:48
German to English
+ ...
Regex Tagger - other uses Mar 28, 2020

Another use of the Regex Tagger is to tag names in source programs (and similar) when the comments need to be translated.
This has 2 effects:
1. The names are protected
2. They are excluded from the SpellChecker to greatly reduce the number of false positives (in one document I had more than 600 such names)


 


To report site rules violations or get help, contact a site moderator:


You can also contact site staff by submitting a support request »

STRINGS file in MemoQ






Protemos translation business management system
Create your account in minutes, and start working! 3-month trial for agencies, and free for freelancers!

The system lets you keep client/vendor database, with contacts and rates, manage projects and assign jobs to vendors, issue invoices, track payments, store and manage project files, generate business reports on turnover profit per client/manager etc.

More info »
Anycount & Translation Office 3000
Translation Office 3000

Translation Office 3000 is an advanced accounting tool for freelance translators and small agencies. TO3000 easily and seamlessly integrates with the business life of professional freelance translators.

More info »