Author Topic: implement new translation platform  (Read 24548 times)

urfausto

  • Full Member
  • ***
  • Posts: 167
could it be possible to upload translation files to a web based platform to ease translation procedure?

https://docs.weblate.org/en/latest/formats.html

archdron

  • Newbie
  • *
  • Posts: 18
What exactly is the issue with the current process?
“The most essential gift for a good writer is a built-in, shockproof, shit detector.”
― Ernest Hemingway

urfausto

  • Full Member
  • ***
  • Posts: 167
What exactly is the issue with the current process?
no live comparison to string's original language which makes update of current translations a real hassle.

Steven

  • Administrator
  • Sr. Member
  • *****
  • Posts: 34296
what some people do is leave the english text in and comment it by putting a ! at the start.

urfausto

  • Full Member
  • ***
  • Posts: 167
what some people do is leave the english text in and comment it by putting a ! at the start.
thanks i can try this fashion but can you please share an example? thanks.

klint

  • Sr. Member
  • ****
  • Posts: 426
Here is the way I'm doing it, for the translation into French.
In a text file, I start by duplicating every sections, so that all strings are duplicated.
Then, for each entry, I translate the *second* occurence, without even putting a "!" to the first occurence (when the file will be compiled, the translated second occurence will overwrite the English first occurence)/

Here is a self-explaining example:

! preferences/ layout(1) in the player section
#Sys.ctl.FDC2DAF9# show track details on multiple lines
#Sys.ctl.FDC2DAF9# afficher les détails de la piste sur plusieurs lignes

! click on the thumbnail browser header
#Main.menu.DoNoDi# Dont Show Thumbnails
#Main.menu.DoNoDi# Ne pas afficher les vignettes

! 16-1-2019
! messages shown when synching devices
#Tfr.msg.FoldCleanup# Folder Cleanup
#Tfr.msg.Syhtstwtdev# Synchronisation has temporarily stalled for 2-5 minutes while the device processes current file operations. For the next synch, moving the Playlists folder to Music\Playlists in the settings tab will help
#Tfr.msg.FoldCleanup# Nettoyage du dossier
#Tfr.msg.Syhtstwtdev# La synchronisation est suspendue pendant 2 à 5 minutes le temps que l'appareil procède à des opérations. Parfois, déplacer le dossier des listes vers Music\Playlists dans les paramètres peut aider.


! 9-2-2019
! in Preferences/ Devices
#Sys.ctl.F3F5301E# enable Wifi transfer with Android devices
#Sys.ctl.F3F5301E# activer le transfert Wifi avec les appareils Android

Hope this helps

urfausto

  • Full Member
  • ***
  • Posts: 167
Hope this helps

thanks but no please. i already have to do the translation from the ground up since it is impossible to update the current one. i can only translate side to the english string without deleting anything.

hiccup

  • Sr. Member
  • ****
  • Posts: 7759
thanks but no please. i already have to do the translation from the ground up since it is impossible to update the current one. i can only translate side to the english string without deleting anything.

I am only understanding 50% of what you are saying here, but if you really want to do it form the ground up, start with a 'clean' and recent English language file, mark all existing lines with an exclamation in front of them, and then add your Italian translation beneath each English line.

archdron

  • Newbie
  • *
  • Posts: 18
Hope this helps

thanks but no please. i already have to do the translation from the ground up since it is impossible to update the current one. i can only translate side to the english string without deleting anything.

Understood. I'm actually localizing MusicBee in OmegaT - it's a full-featured free CAT tool with translation memory, glossary support and all that stuff that helps keeping translations and terminology consistent. As soon as I have time, I can share the process if you're interested.
Last Edit: April 08, 2020, 10:40:05 PM by archdron
“The most essential gift for a good writer is a built-in, shockproof, shit detector.”
― Ernest Hemingway

urfausto

  • Full Member
  • ***
  • Posts: 167
Hope this helps

thanks but no please. i already have to do the translation from the ground up since it is impossible to update the current one. i can only translate side to the english string without deleting anything.

Understood. I'm actually localizing MusicBee in OmegaT - it's a full-featured free CAT tool with translation memory, glossary support and all that stuff that helps keeping translations and terminology consistent. As soon as I have time, I can share the process if you're interested.
wow cool i've been searching for a translation app that could aid me but had no luck. i would appreciate your help thanks, with these features it will be a real walk in the park
Last Edit: April 09, 2020, 01:21:39 PM by urfausto

Xyzzy

  • Sr. Member
  • ****
  • Posts: 396
I use this: http://www.opentm2.org

Here is the markup file for MB language files:

<TAGTABLE>
  <DESCRIPTION>MusicBee</DESCRIPTION>
  <DESCRNAME>MusicBee</DESCRNAME>
  <MULTSUBST>%</MULTSUBST>
  <SINGLESUBST>?</SINGLESUBST>
  <CHARSET>UTF8</CHARSET>
<TAG>
  <STRING>\r\n</STRING>
  <TYPE>ENDDEL</TYPE>
  <SEGINFO>SEGRESET</SEGINFO>
  <LENGTH>2</LENGTH>
</TAG>
<TAG>
  <STRING>!</STRING>
  <SEGINFO>SEGRESET</SEGINFO>
  <ASSTEXT>TSL</ASSTEXT>
  <LENGTH>1</LENGTH>
  <COLPOSITION>1</COLPOSITION>
</TAG>
<TAG>
  <STRING>#%</STRING>
  <ENDDELIM>#</ENDDELIM>
  <SEGINFO>SEGRESET</SEGINFO>
  <COLPOSITION>1</COLPOSITION>
</TAG>
<TAG>
  <STRING>{?</STRING>
  <ENDDELIM>}</ENDDELIM>
  <TYPE>STNEUTRAL</TYPE>
  <CLASSID>CLS_VAR</CLASSID>
</TAG>
</TAGTABLE>

urfausto

  • Full Member
  • ***
  • Posts: 167
i don't understand either app but omegat is in my language at least...
Last Edit: April 13, 2020, 10:03:31 AM by urfausto

archdron

  • Newbie
  • *
  • Posts: 18
Alright, here we go. It may seem convoluted a bit, so do ask any questions that you have. I will edit this post and screenshots in a day or two to make things a bit easier to follow. I also can post it as a guide in a separate thread should anyone need it.

I. What you need:
1. Okapi Applications: https://bintray.com/okapi/Distribution/Okapi_Applications
2. OmegaT (go for 5.2.0, despite the Beta indication its rock-solid): https://omegat.org/

II. Setting up the project:
0. Download translation *.txt files for MusicBee and put them wherever is convenient to you.
1. Unpack Okapi Apps somewhere convenient
2. Go into the Okapi Apps directory and launch rainbow.exe - we will use this thing to convert files back and forth.
3. Click ... near the Root 1 field and set root directory to wherever you put the localisation files.
4. Go to Languages and Encodings tab and indicate your source (en-us will do) and target (whichever one you're translating to) languages
5. In the input list 1 tab, Right Click -> Add Documents, choose the files.
6. Now click on Filter Configuration column opposite any of the files added. Here's where we set up filters to extract the text strings.
7. In the Input Document Properties window, choose Plain Text Filter from the drop-down menu, and then click the Create Button. Name the filter whatever you want.
8. In the Plain Text Filter Parameters window, choose Extract with a rule in the Extraction mode section.
9. Now you have to figure up a RegExp to extract just the text you need to translate to minimize the chances of botching anything. Here's what I come up with:

Code
(\#\t{1,}|\#\s{2,})(\s*?\"*?\s*?\'*?\{*?\(*?\%*?\/*?\[*?\{*?\<*?\&*?\.*?\w.*|\s\t\#\s*\[*?\w.*|\s*?\%\s\w.*|\t\/\s\w.*|\t\-*?\,*?\s*?\w.*|\#\s\t{1,}\@*?\,*?\|\s*?\w.*|\@|\*\s*?\w.*|\/\s*?\w.*|\-\s*?\w.*|\#\s*\[\w.*|\,*?\s*?\w.*|\#|\|\s*\w.*|\,\s\{\w.*|\+\s*?|\^\w.*|\'*?\W*\w.*)

Not the most elegant one out there, but it works for me. You are welcome to optimize it. Be sure to test it somewhere though 'cause you might miss some strings, and you won't know it, until the app throws an exception. Source group is set to 2 by default, leave it there.
10. Make sure you set the filter for all the files.
11. In the top menu, choose Utilities -> Translation Kit Creation.
12. In the Pre-Defined Pipeline windown, choose Rainbow Translation Kit Creation and select OmegaT Project in the Package Format tab on right pane (or whatever format is preferable for the tool of your choice, e.g. PO package if you like POEdit better).
13. In the Output location tab, indicate the project name in Name of the package field.
14. Press execute to create the project in the root directory you set earlier.
15. Make sure to save the project somewhere safe.

III. Working with the project
1. Install and launch OmegaT.
2. In the top menu, Project -> Open. Locate the project you set up with Rainbow and have a good time translating it!
3. Once finished, press Ctrl+D to create translated files.

IV. Converting back
Now return to Rainbow
1. Open the project you saved earlier.
2. Don't change anything, just remove the files.
3. Add the manifest.rkm file from your OmegaT project folder
4. Now from the top menu choose Utilities -> Translation Kit Post-Processing
5. In the window that opens, click the Execute button.
6. Now you can find the translations in *.txt format in the done/ folder inside your OmegaT project folder.

V. You know the rest
1. Merge the text files into one
2. Change the extension to .lng
3. Put into MusicBee Localisation folder and test your localisation out!

Make sure to backup your project tmx and glossary files so that the translation are not lost.
Last Edit: April 13, 2020, 10:22:43 PM by archdron
“The most essential gift for a good writer is a built-in, shockproof, shit detector.”
― Ernest Hemingway

Xyzzy

  • Sr. Member
  • ****
  • Posts: 396
And here goes the shortest doc to start working with OpenTM2. There is also a lot of documentation included with the installation.

1. Install OpenTM2 (http://www.opentm2.org/download/) and run it
2. Click Utilities > Display Markup table List
3. In the displayed Markup Table List window, click rmb and select Import...
4. Browse to tbx file with the markup definition I posted above and import it.
5. In Folder List window click rmb in the left pane (folder tree) and select New..
6. Fill in Name field with some name, like MusicBee
7. Fill in Translation Memory to be used field with some name for translation memory (fe. MusicBee as well).
8. In Markup dropdown select the markup you imported.
9. Click Create button
10. Click Create button in displayed New Translation Memory window.
11. A warning is displayed that no folder dictionary is selected. Click Yes (you can create/attach dictionary later).
12. Select your folder in the tree pane.
13. Click rmb in right pane and select Import.
14. Browse to the txt file with original strings, select it and click Import.
15. Click Change in displayed Document Properties window
16. Confirm informational message about file import.
17. Double click the file that is now displayed in the right pane and start translating.


Note: you can create translation memory with all your work so far with Initial Translation Memory tool which is installed with OpenTM2.
Then you can select the translation memory when creating folder with the above procedure. After importing file, click it with rmb and select Analyze..., select "Substitute exact matches..." checkbox and click Analyze. Existing translations will be transferred to the imported source file.




hiccup

  • Sr. Member
  • ****
  • Posts: 7759
@ Xyzzy and archdron

As a 'fellow' translator; thank you for your contributions and extended explanations!
Much appreciated.
(it seems to have been completely wasted on the OP asking the question though)

But I am curious myself:
What is the main benefit of using, installing and configuring these rather complicated tools when 'only' translating MusicBee?
('only' between apostrophes, because I know it is a hell of a job)

I can imagine these powerful tools can be useful for complicated and multi-paged technical manuals and so-forts, but what would be the main benefits in using it for translating MusicBee's single xml language file?