Change a segment, if the segment before has certain content

I have the following situation:

In Polish the name of the color will get a different ending, depending on the gender. So I have for example for "red" "czerwony, czerwona, czerwone".

This makes it impossible to translate red to one of those in a highly repetitive file, where I have partially >2000 such position. To make this translation fast, I translated all colors like this "red = kolor: czerwony" (which simply means adding the word "color" before each color name, what makes this repetitive again, as then the name of the color does not depend on gender). This was a good idea, until the customer has changed his file. Now in some places I have this structure:

Part name
color name

which translates perfectly to

Part name
color: name

But then he added

Part name
Color
color name

and I cannot now translate like above

Part name
Color
color: name

Using the advanced display filter I could display all segments, where I have in source either color or color name (for example (Color|red|blue<yellow<brown) in source and "^color: ..." in Polish. But the problem is, I need only to change this segments, where "Color" is followed by "color: ...".

But in my view sometimes the segments do not really follow each other.

Looks like this:

 

Does anyone have an idea, how to automate this?

_________________________________________________________

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.

Parents
  • Hi Jerzy,

    Is there an ending in Polish that indicates that more than one possible letter/s could follow?

    For example:
    czerwon...
    czerwon~
    czerwon_
    czerwon?
    czerwon-

    or could you abbreviate it, czerwon. - or czerwn. - or just czerwon with no ending??

    Alternatively, could you enter all 3 possibilities if there is no length limitation czerwony/czerwona/czerwone OR, shorter, czerwony/a/e might work?

    How does it work with, say, clothes labels where the colour could be applicable to any number of things. I guess then, kolor: czerwony would be used.

    In some languages such as French, the masculine colour adjective is the 'default' and used when it is not known which gender an item is...

    Interesting problem... I'll keep thinking 'can do'...

    Hace a lovely evening,
    Ali :)

Reply
  • Hi Jerzy,

    Is there an ending in Polish that indicates that more than one possible letter/s could follow?

    For example:
    czerwon...
    czerwon~
    czerwon_
    czerwon?
    czerwon-

    or could you abbreviate it, czerwon. - or czerwn. - or just czerwon with no ending??

    Alternatively, could you enter all 3 possibilities if there is no length limitation czerwony/czerwona/czerwone OR, shorter, czerwony/a/e might work?

    How does it work with, say, clothes labels where the colour could be applicable to any number of things. I guess then, kolor: czerwony would be used.

    In some languages such as French, the masculine colour adjective is the 'default' and used when it is not known which gender an item is...

    Interesting problem... I'll keep thinking 'can do'...

    Hace a lovely evening,
    Ali :)

Children
  • Dear Ali
    It works very simple - but you should ask a linguist for full details. An engineer can explain only this way:
    red dress = czerwona sukienka
    red car = czerwony samochód
    red fountain pen = czerwone pióro
    And so on. The best way is to put this in one line, then you have no problem. If the "dress" and "red" are separated by a paragraph brak, you cannot really use anything else than "czerwona" (abbreviations of this word are unusual). If you put "czerwony/czerwona/czerwone" people will think you're an idiot :) So I invented: "dress" "color: red". This way I could utilize "color: red" (kolor: czerwony) for ALL words appearing before this line. All words but the word "color" (kolor), as then I have "color" "color: red" - looks a bit crazy, even in English, doesn't it?
    Best regards, Jerzy

    _________________________________________________________

    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.

  • Hi Jerzy,

    We have a similar situation in Spanish, where adjectives not only take gender but also number and we also need to come up with creative solutions sometimes. Your initial solution is similar to what I've done in the past with a client's catalogs to prevent all the variations of color and size adjectives, and I understand how the addition of the new "Color" line by itself messes up what you had previously included in your translation, so I can definitely relate. I think your Notepad workaround is perfect and fast as it definitely sounds like this issue is beyond Studio's features.
  • Hi Jerzy
    You ARE a linguist and a brilliant one too!
    Dress Color color: red would indeed look really daft.
    Still thinking...
    Ali