replacing straight quotes

Hello Everyone,

I am sorry to raise an issue that has already been debated / dealth with ... but I am afraid that Studio doesn't have an option for the "automatic" correction of all those hateful "straight" quotes into curly quotes. When using such functions as "copy source to target" (when I need to copy the formatting) or an automatic translation, Studio inevitably produces a target wording with straight quotes, no matter if I follow you instructions of changing this in the "Editor" option. It is very - very - very frustrating that a translation software doesn't know "curly quotes" or doesn't have an option saying "change all straight quotes into curly (or smart) quotes" in ALL target segments (or the other way round, depending on translator's needs). It shouldn't be so difficult. Changing this manually is very time consuming and sucks energies which, instead, should be devoted to translation.

Parents
  • Well, in fact Studio HAS a very simple method of replacing all kind of quotes with any other kind of quotes you wish. First, you get typographic quotes when typing them. And for the remaining ones use a simple search and replace operation with regex. For Polish quotes I run two:

    (?:“|”|")(\w)
    „$1

    (\w\b)(?:"|“)
    $1”

    You can adapt the regexes to your needs. It also will be possible to put all this in one run.

    _________________________________________________________

    When asking for help here, please be as accurate as possible. Please always remember to give the exact version of product used and all possible error messages received. The better you describe your problem, the better help you will get.

    Want to learn more about Trados Studio? Visit the Community Hub. Have a good idea to make Trados Studio better? Publish it here.

  • Hello Jerzy,

    Thank you for your insights.

    Well, the problem is that I don't know anything about Regexes, which means that I don't understand your regexes. As far as I understand, that would allow me to do exactly what I want, namely, to make Studio automatically change all straight quotes in a target text (when the original has curly quotes, I must produce curly quotes in the target text as well). While I know that I can do this by typing quotes, this is impossible to do when the target is automatically generated (because I tell Studio to copy source to target or because I generate some translations automatically. Inevitably, Studio always generates target text with straight quotes, and when there are many to be replaced, doing that manually is an endless work. Someone in the forum suggested, years ago, to use the search and replace tool and search for this: (s)"(.+?)" and replace it with: $1“$2” - this did not work, because Studio told me that no matches were found (untrue - there were) and to be honest, I don't understand all these marks/signs ... what is the meaning of $1????!!! or the dot, or the ? I assume this is a language, but I don't know it.

Reply
  • Hello Jerzy,

    Thank you for your insights.

    Well, the problem is that I don't know anything about Regexes, which means that I don't understand your regexes. As far as I understand, that would allow me to do exactly what I want, namely, to make Studio automatically change all straight quotes in a target text (when the original has curly quotes, I must produce curly quotes in the target text as well). While I know that I can do this by typing quotes, this is impossible to do when the target is automatically generated (because I tell Studio to copy source to target or because I generate some translations automatically. Inevitably, Studio always generates target text with straight quotes, and when there are many to be replaced, doing that manually is an endless work. Someone in the forum suggested, years ago, to use the search and replace tool and search for this: (s)"(.+?)" and replace it with: $1“$2” - this did not work, because Studio told me that no matches were found (untrue - there were) and to be honest, I don't understand all these marks/signs ... what is the meaning of $1????!!! or the dot, or the ? I assume this is a language, but I don't know it.

Children
  • It is a regular expressions language. In a nutshell, each character in regex matches itself. So if you search for "a", it will find "a". If you search for "AbbA", it will find what you entered. So far, so logical. To make it really interesting, some characters have special functions. So you can combine literal search for characters with some meta-characters. It is similar to what you would do with wildcards in Word. Such special characters are the dot . which replaces any character. Brackets () are used for grouping and capturing search results. $ signs refer to the group in the search expression—$1 means insert what you have found in the first bracket (first capturing group) in your search expression.

    Your expression cannot work, as it looks literally for a letter s followed by a quote. And it just looks for straight quotes, while you need to correct wrong quotes too.

    Try this: (\s)(?:„|”|")(.+?)(?:"|“) and replace with $1“$2” 

    Make sure regular expressions search is activated.

    _________________________________________________________

    When asking for help here, please be as accurate as possible. Please always remember to give the exact version of product used and all possible error messages received. The better you describe your problem, the better help you will get.

    Want to learn more about Trados Studio? Visit the Community Hub. Have a good idea to make Trados Studio better? Publish it here.