STRINGS file in MemoQ De persoon die dit onderwerp heeft geplaatst: Sergiy Butkov
|
Sergiy Butkov Oekraïne Local time: 10:48 Lid 2014 Russisch naar Engels + ...
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 | | |
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 | | |
Sergiy Butkov Oekraïne Local time: 10:48 Lid 2014 Russisch naar Engels + ... ONDERWERPSTARTER 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 | | |
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 | |
|
|
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 Oekraïne Local time: 10:48 Lid 2014 Russisch naar Engels + ... ONDERWERPSTARTER
Thanks a lot! The Regex filter worked well. It seems I need to learn more about this useful feature. | | |
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 | | |
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 | |
|
|
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) | | |