How to hide first part of a sentence Thread poster: Christophe Delaunay (X)
|
Christophe Delaunay (X) France Local time: 04:59 Spanish to French + ...
Hi all,
I've started translating an app about guitar chords.
It shows like this:
"GtrLib Chords" = "GtrLib Chords";
"Search" = "Search";
"Search Chords" = "Search Chords";
...
I would need to hide the first part until the third " so that it ends like this:
"GtrLib Chords";
"Search";
"Search Chords";
I've tried to fiddle with Regex but it's late and I can't figure how to do it. Should I use... See more Hi all,
I've started translating an app about guitar chords.
It shows like this:
"GtrLib Chords" = "GtrLib Chords";
"Search" = "Search";
"Search Chords" = "Search Chords";
...
I would need to hide the first part until the third " so that it ends like this:
"GtrLib Chords";
"Search";
"Search Chords";
I've tried to fiddle with Regex but it's late and I can't figure how to do it. Should I use Excel instead? Any smart idea is welcome! ▲ Collapse | | |
What's the programming language/software? | Jul 10, 2018 |
Regex? I'd say something along the lines of
[code type="PHP"] $texte = preg_replace('#^(.+) = (.+)$#i', '$2', $texte); [/code]
Not sure however what's the big idea. I mean, in jEdit even a macro can handle this in no time. | | |
Christophe Delaunay (X) France Local time: 04:59 Spanish to French + ... TOPIC STARTER
What's the programming language/software? No idea. I got the text from the developer. This is not about programming. I have the text in txt form and I have both the LHS (for the source) and the translation goes on the RHS. But I need to get rid of the LHS. Nothing more, nothing less. As we say in French, this is ma (internal) cuisine. Nothing to do with the developer or the programming language. Thanx for the answer nonetheless. | | |
Excel, "Text in columns" | Jul 10, 2018 |
Excel can be a powerful tool for operations like this. Import or copy your text into Excel and then use "Data" -> "Text in Columns" and use the "=" character as separator. That should give you the desired result in the second column.
(I am not sure about the Excel menu because my Excel is a German version) | |
|
|
Christophe Delaunay (X) France Local time: 04:59 Spanish to French + ... TOPIC STARTER I'll try that... tomorrow morning! | Jul 10, 2018 |
Thank you Kay-Viktor. | | |
Also in MS Word | Jul 11, 2018 |
You can do this in Word as follows:
Replace every ' = ' with '^t' (that's a tab character)
Then convert the text to a table, using the default settings.
Then delete what you don't want.
Modify to suit your precise needs. | | |
Samuel Murray Netherlands Local time: 04:59 Member (2006) English to Afrikaans + ... Which program | Jul 11, 2018 |
Christophe Delaunay wrote:
I've tried to fiddle with regex but ... I can't figure how to do it. Should I use Excel instead?
In what program are you currently trying to edit/translate the text? | | |
Christophe Delaunay (X) France Local time: 04:59 Spanish to French + ... TOPIC STARTER @Philip Lees | Jul 11, 2018 |
Thank you. I'll try that too. Just for curiosity and productiveness | |
|
|
Christophe Delaunay (X) France Local time: 04:59 Spanish to French + ... TOPIC STARTER
Hi Samuel,
I thought you would show up in my post
I work with memoQ 2014 (but I tried to hide the beginning parts in Word) | | |
Rolf Keller Germany Local time: 04:59 English to German Whats the goal? | Jul 11, 2018 |
Christophe Delaunay wrote:
I have the text in txt form and I have both the LHS (for the source) and the translation goes on the RHS. But I need to get rid of the LHS.
The result would be a .txt file that includes no references to the original meanings of the snippets. Are you sure the programmer wants such a file? | | |
Samuel Murray Netherlands Local time: 04:59 Member (2006) English to Afrikaans + ...
Christophe Delaunay wrote:
I work with memoQ 2014 (but I tried to hide the beginning parts in Word)
The web site says MemoQ has an INI filter. What happens if you use it? I'm not sure if MemoQ requires you to rename the file to ".ini" to use the INI filter.
Your file's format looks like it's in a dialect of the file format called key=value, commonly used in INI and LNG files. The part before the = sign is the "key" and should not be altered, and the part after the = sign is the value, which must be translated. Some CAT tools have INI file filters hide the quotes as well.
Rolf Keller wrote:
Christophe Delaunay wrote:
I have the text in txt form and I have both the LHS (for the source) and the translation goes on the RHS. But I need to get rid of the LHS.
The result would be a .txt file that includes no references to the original meanings of the snippets.
I think Christophe wants to hide it, not actually "get rid of" it. In many CAT tools, if text in a document (e.g. MS Word file) is marked as hidden text, it is not displayed to the translator, but it is still present in the final file.
[Edited at 2018-07-11 12:23 GMT] | | |
Christophe Delaunay (X) France Local time: 04:59 Spanish to French + ... TOPIC STARTER
Rolf Keller wrote:
The result would be a .txt file that includes no references to the original meanings of the snippets. Are you sure the programmer wants such a file?
The text would be hidden so that memoq does do anythign with it and then I would get it back again in the final Word file. I've never had to do many times but it seems many people use this trick.
As to the programmer, he just told me he's fine with just the translated text. So now it is just a technical trick I'd like to know just for the sake of it. | |
|
|
Christophe Delaunay (X) France Local time: 04:59 Spanish to French + ... TOPIC STARTER Sorry, response disappeared! | Jul 11, 2018 |
Samuel Murray wrote:
The web site says MemoQ has an INI filter. What happens if you use it? I'm not sure if MemoQ requires you to rename the file to ".ini" to use the INI filter.
Your file's format looks like it's in a dialect of the file format called key=value, commonly used in INI and LNG files. The part before the = sign is the "key" and should not be altered, and the part after the = sign is the value, which must be translated. Some CAT tools have INI file filters hide the quotes as well.
I am not up to that level, Samuel. I know a bit about .ini files but not as much as to fiddle with them.
Rolf Keller wrote:
Christophe Delaunay wrote:
I have the text in txt form and I have both the LHS (for the source) and the translation goes on the RHS. But I need to get rid of the LHS.
The result would be a .txt file that includes no references to the original meanings of the snippets.
I think Christophe wants to hide it, not actually "get rid of" it. In many CAT tools, if text in a document (e.g. MS Word file) is marked as hidden text, it is not displayed to the translator, but it is still present in the final file.
[Edited at 2018-07-11 12:23 GMT]
Exactly! You got my point, Samuel.
Sorry, Rolf, if I used the wrong terminology. | | |