Hide id on import and unhide on export.
Thread poster: Sempiro
Sempiro
China
English to Russian
+ ...
May 19, 2015

Hello,

I am translating game strings and there is a thing that negate all good aspects of using CAT tools - string ID's.

Quick question: is there any possible way to hide string ID's and put in TM only relevant game content while translating and restore them during exporting?

Now it looks like:

101000=赠送
101001=您搜索的玩家不存在或不在本王国中
101002=是否赠送 {0} 给 {1}?
101003=礼包将以邮件形式发送给对方!赠送礼包不会影响您自身购买礼包。
101004=赠送成功!
101005=我向你赠送 {0}
101006=亲爱的领主大人,您的朋友{0}向您赠送了{1}(价值{2})。礼包内容如下,记得要感谢您朋友的慷慨哦!
101007=来自{0}的礼物
101008=已赠送
101009=您已向{0}赠送了礼包,无法再次赠送相同礼包给同一个领主
101202=是否不再显示游戏说明?同时您可以也在设置中找到游戏说明
101204=反馈
101205=邮件
101207=系统
101209=战斗
101216=游戏说明
101217=消息通知

I need it look like:

赠送
您搜索的玩家不存在或不在本王国中
是否赠送 {0} 给 {1}?
礼包将以邮件形式发送给对方!赠送礼包不会影响您自身购买礼包。
赠送成功!
我向你赠送 {0}
亲爱的领主大人,您的朋友{0}向您赠送了{1}(价值{2})。礼包内容如下,记得要感谢您朋友的慷慨哦!
来自{0}的礼物
已赠送
您已向{0}赠送了礼包,无法再次赠送相同礼包给同一个领主
是否不再显示游戏说明?同时您可以也在设置中找到游戏说明
反馈
邮件
系统
战斗
游戏说明
消息通知


Direct link Reply with quote
 

Anthony Green  Identity Verified
Italy
Local time: 01:18
Italian to English
quick answer May 19, 2015

you can do it in Word by replacing all six-figure numbers plus the equals sign with hidden text (presumably that will handle all of the text you need to hide) and then making all text unhidden after export.
That's a cheap and nasty option but it should work!

The cooler option is with Regex but it would take me forever to write the line of code needed for that!


Direct link Reply with quote
 
Sempiro
China
English to Russian
+ ...
TOPIC STARTER
@@ May 19, 2015

Anthony Green wrote:

you can do it in Word by replacing all six-figure numbers plus the equals sign with hidden text (presumably that will handle all of the text you need to hide) and then making all text unhidden after export.
That's a cheap and nasty option but it should work!

The cooler option is with Regex but it would take me forever to write the line of code needed for that!


Thanks for reply.

You mean I should select six-figure numbers plus the equals sign one by one, then use hidden text in Translator Tools? Man, it will take life time to do that. @@


Direct link Reply with quote
 
Stanislav Okhvat
Local time: 03:18
English to Russian
Re: Hide id on import and unhide on export. May 19, 2015

Hello,

You can do the following:

1) Copy to Word (if it's not in Word)
2) Select all text
3) Convert to table, using = as delimiter (Insert tab, Table - Convert Text to Table)
4) Hide the first column (select it, then use Font dialogue, Hidden attribute)
5) Translate in the CAT tool
6) Export
7) Unhide all
8) Convert table to text with Other option, indicating = (select table, Layout tab, Convert Table to Text)

You can use Hide / Unhide Text command in TransTools (free) to expediting hiding and unhiding, especially when there are several places you want to hide or unhide.

Best regards,
Stanislav Okhvat
Translator Tools – Useful tools for every translator


Direct link Reply with quote
 

Mikhail Popov
Singapore
Local time: 08:18
Member (2015)
English to Russian
+ ...
Use Excel May 19, 2015

Copy all text to Excel. You will get thousand rows and one column - column A.
Then use FIND "=" in column B. You will get location of = from the beginning of each string. This will be 7.
Then use formula LEN to measure the length of the string in column C. You will get length of each cell
Then deduct column B from column C - column D. This will give you location of "=" from the end of each string.
Then use the formula RIGHT that take X symbols from the end of each string. X should be equal to Column D.
You will get column E with strings without ID.

Then you can use formula LEFT to extract the X symbols from the beginning of each string. X should be equal to column B.
And you will get all ID separately. When you will translate all text, you can join both columns together and you will get translation with ID.



Direct link Reply with quote
 

Anthony Green  Identity Verified
Italy
Local time: 01:18
Italian to English
goodness no May 19, 2015

Sempiro wrote:

You mean I should select six-figure numbers plus the equals sign one by one, then use hidden text in Translator Tools? Man, it will take life time to do that. @@


No no at all. If you look at the search and replace window in Word there is a code for "any number" which is ^# and another for the search text which is ^&
Ctrl-Q denotes hidden text

So you would write
^#^#^#^#^#^#^#=
in the Find field
and
^&
in the Replace field (and of course press Ctrl-Q)


Anthony
p.s. Oh and don't worry I wouldn't risk my reputation by writing silly answers! They may not be elegant but they work. That said, Stan's is both elegant and functional


Direct link Reply with quote
 
Sempiro
China
English to Russian
+ ...
TOPIC STARTER
My God! May 20, 2015

My god! Guys, thank you all! You are life saviors!

Direct link Reply with quote
 

Mikhail Popov
Singapore
Local time: 08:18
Member (2015)
English to Russian
+ ...
Yes May 20, 2015

Anthony Green wrote:

So you would write
^#^#^#^#^#^#^#=
in the Find field
and
^&
in the Replace field (and of course press Ctrl-Q)


Yes, this works. But you've typed 1 extra ^# - it should be 6 only, not 7


Direct link Reply with quote
 


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


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

Hide id on import and unhide on export.

Advanced search






Déjà Vu X3
Try it, Love it

Find out why Déjà Vu is today the most flexible, customizable and user-friendly tool on the market. See the brand new features in action: *Completely redesigned user interface *Live Preview *Inline spell checking *Inline

More info »
WordFinder
The words you want Anywhere, Anytime

WordFinder is the market's fastest and easiest way of finding the right word, term, translation or synonym in one or more dictionaries. In our assortment you can choose among more than 120 dictionaries in 15 languages from leading publishers.

More info »



Forums
  • All of ProZ.com
  • Term search
  • Jobs
  • Forums
  • Multiple search