First time here? Check out the FAQ!
0

dealing with %(question)s in translation
 

Using the replacement "%(question)s" is not good with italian translations. In fact italian words may have different genres which should translate differently. Also there are issue with singular/plural since sometimes the translation would use a plural name where the english original uses singular.

As an example:

  "write a question"  -> "scrivi una domanda" (feminine)   
  "write a message"  -> "scrivi un messaggio" (masculine)
  "latest question feed"  -> "feed ultimi messaggi" (pluralization)

Maybe substitution marks should never contain localized text. I would replace something like:

_("Individual %(question)s feed") % _(question)

with:

{'question': "Individual question feed",
 'answer': "Individual answer feed"}[question]

BTW What is the context of the message "individual %(question)s feed"? "individual" refers to question or to feed?

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
paolini's avatar
11
paolini
asked 10 years ago, updated 10 years ago

Comments

see more comments

1 Answer

0

This form is used in the following context:

_('Individual %(question)s feed') % {'question': askbot_settings.WORDS_QUESTION_SINGULAR}

And the purpose is to replace the word "question" with something else, such as "problem". If such replacement does not work in Italian, then we might need to add yet another parametrizable phrase to the askbot.conf.words module.

To enter a block of code:

  • enter empty line after your previous text
  • paste or type the code
  • select the code and press the button above
Preview: (hide)
Evgeny's avatar
13.2k
Evgeny
answered 10 years ago
link

Comments

In italian it is not possible to parametrize a phrase on a noun... Both "question" and "problem" have the same gender so I have a solution working for these two. But other nouns such as "message" or "comment" have different genre hence the phrase containing them would be different. In general the complete phrase should be parametrized.

paolini's avatar paolini (10 years ago)

However I think that the best solution would be to remove WORDS_QUESTION_SINGULAR from the configurable settings. Seems to me that it would be fine to modify the source code for such a customization. It is something very similar to the modification of a template... you cannot parametrize all possible HTML layouts in the configuration settings. Maybe one could think of some kind of "skin" package which can be plugged in to override templates and also translation strings?

paolini's avatar paolini (10 years ago)
see more comments