Converting numbers in brackets to negative numbers

Hi!

I'm translating an annual report where all negative numbers in tables are set in brackets (instead of using minus signs). In the Swedish translation, all these numbers must be written with minus signs.
Example: (5,000.00) in the English original should be written as -5 000,00 in the Swedish translation.

Is there a standard setting for this or some other clever way of doing it? I can obviously change all the numbers in the target file manually, but then I can't use number verification - and I will have to redo the process each time the client sends me a new version of the files. It is not unusual to go through several drafts when working on annual reports, so this would be a major pain.

Kind regards,

Johanna

emoji
Parents
  • ,

    This would be the SDLXLIFF Toolkit way mentioned by Lydia:

    • First, make a backup of the project, just in case there is something goes wrong…
    • Install the plugin SDLXLIFF Toolkit from https://appstore.rws.com/Plugin/77
    • In Trados, open the Files or the Projects view and then the Toolkit tab (with the Swiss knife icon). You will see something like this.

    Screenshot of Trados Studio's SDLXLIFF Toolkit plugin with options to select folder, sdlxliff files, or project file, and a clear selected files button.

    • Now open Windows Explorer and go to the project folder and then go to the target folder. For example, translating into Swedish it may be the folder sv-se.
      If there is only one file, drag and drop the target XLIFF (alternatively you can select the button Select sdlxliff files…). If there are several files included in the project, clicking the button Select project file will be quicker.
    • Open the Replace tab.
    • Tick the Use regular expressions check box.
    • Insert the following regexes in the fields:
      Source search:
      \(([0-9.,]+?)\)
      Replace with:
      -$1
      Note: this is a hyphen (-) as I see on your post, not a minus sign (−) as you mentioned.
      Screenshot showing a selected test.sdlxliff file in Trados Studio's SDLXLIFF Toolkit with source search and replace fields filled with regex patterns.
    • Optional: Click on the Find All button to check that the app finds instances.
    • Optional: Click on the Preview button to confirm that the shown replacements are what you need:
      Screenshot of Trados Studio's SDLXLIFF Toolkit showing the Replace tab with a preview of text segments and the number of matches found for the source search regex.
    • Click on the Replace All button.
    • Open the XLIFF in Editor as usual and all your (1.234,4) strings should have been replaced with -1.234,4.
    • Done!

    Again: there is no Undo button, so you'd better create a backup of the full project before running this app.

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 11:28 AM (GMT 0) on 29 Feb 2024]
Reply
  • ,

    This would be the SDLXLIFF Toolkit way mentioned by Lydia:

    • First, make a backup of the project, just in case there is something goes wrong…
    • Install the plugin SDLXLIFF Toolkit from https://appstore.rws.com/Plugin/77
    • In Trados, open the Files or the Projects view and then the Toolkit tab (with the Swiss knife icon). You will see something like this.

    Screenshot of Trados Studio's SDLXLIFF Toolkit plugin with options to select folder, sdlxliff files, or project file, and a clear selected files button.

    • Now open Windows Explorer and go to the project folder and then go to the target folder. For example, translating into Swedish it may be the folder sv-se.
      If there is only one file, drag and drop the target XLIFF (alternatively you can select the button Select sdlxliff files…). If there are several files included in the project, clicking the button Select project file will be quicker.
    • Open the Replace tab.
    • Tick the Use regular expressions check box.
    • Insert the following regexes in the fields:
      Source search:
      \(([0-9.,]+?)\)
      Replace with:
      -$1
      Note: this is a hyphen (-) as I see on your post, not a minus sign (−) as you mentioned.
      Screenshot showing a selected test.sdlxliff file in Trados Studio's SDLXLIFF Toolkit with source search and replace fields filled with regex patterns.
    • Optional: Click on the Find All button to check that the app finds instances.
    • Optional: Click on the Preview button to confirm that the shown replacements are what you need:
      Screenshot of Trados Studio's SDLXLIFF Toolkit showing the Replace tab with a preview of text segments and the number of matches found for the source search regex.
    • Click on the Replace All button.
    • Open the XLIFF in Editor as usual and all your (1.234,4) strings should have been replaced with -1.234,4.
    • Done!

    Again: there is no Undo button, so you'd better create a backup of the full project before running this app.

    emoji


    Generated Image Alt-Text
    [edited by: Trados AI at 11:28 AM (GMT 0) on 29 Feb 2024]
Children