Hia, just started translating Quiz 4 RC9 to Norwegian, and it's immediately obvious that the display name setting in the quiz config poses quite a few problems:

  • There is *no* consistency here. "Quiz" is hardcoded a lot of places, and referenced to with "@quiz" a lot of other places. Many places there are strings that both have "quiz" and "@quiz" in them, and there is no system that is easy to see here either..
  • I'm not too familiar with the Drupal translation system and handling of plural forms etc., but I imagine problems here. "Quiz" in English will need to be translated to atleast both "quizzen" and "quiz" in Norwegian, based on the context, and as far as I see the @quiz reference has no handling of this..?
  • In addition this obviously adds some more complexity in the quiz code that I believe we would be better off without.

..I simply suggest removing this option, it does far more harm than good the way it is used now, and fixing it would probably be a lot more work than removing it. What do you say?

Also, FYI, I am translating "quiz" to "test" in Norwegian, even though we have adopted the "quiz" word in Norwegian too (and "test" means the same in both languages).

There are a few reasons I do this (and I would say they do apply for the English version too):

  • "Quiz" is not really used in Norwegian, and if it is it's used for games, "guessing competitions", quiz shows on TV, and not for what the quiz module in version 4 really is designed for.
  • It's a word we have adopted from English, while "test" feels much more native (even though that is adopted from English too...)
  • Coming back to my first point: to me it feels like the "quiz" wording is probably there because of the modules legacy, not because it describes the module and its use cases today. Not saying it should necessarily change, but..

(and granted: the correct and consistent use of @quiz (in both singular and plural form) could solve this, but it doesn't today..)

:)

CommentFileSizeAuthor
#8 add_plural_quiz_name-937430-8.patch1.34 KBwadmiraal

Comments

vegardjo’s picture

Related:

"@quiz title" would be "quiztittel" in Norwegian (as we concatenate words that belongs together like this). Similarly "@quiz results" would / could be either "quizresultat" or "quiz-resultat", but never "quiz resultat". I don't know how hyphens are dealt with but the concatenation does provide a problem..

vegardjo’s picture

Correcting myself, as we've had a discussion in the Norwegian localization group about this: http://localize.drupal.org/node/2074#comments (for you scandinavian speaking people).

Bottom line is that @quizresultater (en: "@quiz results"), @quizzen (en: the @quiz), @quizer (the quizzes) etc will work just fine, taking away a major issue in doing this right, as both hyphens and concatenation works.

One additional issue is capitalization of the term, as what word comes first in a sentence varies from language to language. So sometimes @quiz will come first in English but not first in other languages, and the other way around. I don't know how this is typically solved, but I can think of a few possible solutions:

  1. We run a php-function (ucfirst) to captitalize first word in a sentence.
  2. We have two variables, @Quiz and @quiz which translators can use at will in all strings.
  3. Better, the variable would be "capitalization agnostic", so @Quiz, @quiz, @QUIZ would all work, and provide the catitalization of the variable

I guess the two first here would both be a pain to implement, and the first would also have other issues, like when you use @quiz to refer to the Quiz Module. In Norwegian this would be a specific name which should be capitalized wherever it occurs..?

A different issue is with the gender of nouns, something you don't have in English, but in many other languages (like Norwegian). Say:

@quiz = test: "en test" = masculine, so in singular form @quizen would be correct if the noun is masculine, but @quizet would be correct if @quiz was a neutral noun.

(..can't really find a good Norwegian word you would use for @quiz that isn't a masculine noun, but you most probably would in other languages which also have genders for nouns, like Spanish or French..)

So to sum up: there might be issues with capitalization, there might be issues with the gender of nouns, and the main issue on how this variable is implemented in Quiz today still stands.

gábor hojtsy’s picture

All right, when you need to have suffixes on words in translations, replacement placeholders don't really work. And looks like Norwegians need that, I'm certain Hungarian would and guess German would too. For the short term a possible workaround is translating it as "The title of the @quiz" (in Norwegian respectively), at least this wording helps in Hungarian to avoid the suffix and the capitalization, but it will be too wordy, yeah. Without changing the module itself, there is not much way to have complete translatable strings.

vegardjo’s picture

Ok, thanks a lot for chipping in and clarifying that Gábor!

In the Quiz translation I started to rewrite like "The results from a @quiz" ("Resultat fra en @quiz" in Norwegian), but the language doesn't flow or feel right doing this, and also becomes very wordy, so I stopped that and started to ignore the @quiz-variable instead. As there are almost 700 strings for RC9 this seemed like the only thing I could do to get a translation we could use.

("@quizresultater" is what your typical Norwegian would say in the example above..)

falcon’s picture

Ok, I think we'll have to live with this in Quiz 4. In the next version I suggest we do this:

1. Remove the display name setting
2. Rename the node type quiz to test(machine readable name will still be quiz)
3. Add a new node type named survey(not sure about the maching readable name. It will be safest to have it start with quiz)

This will give us the oppurtunity to make quiz more suited for both use-cases instead of beeing somewhere in between.

What do you think?

(EDIT: And the translation challenge will obviously go away)

vegardjo’s picture

Interesting, hadn't thought about having a node type called "Survey", but it would have been very nice to be able to change this easily!

Alternatively, *if* the only difference between a test and a survey would be in display names, we could decide that these are the two cases of quiz that most people will use, and make that a switch on the quiz node? So if you set a quiz to be a "survey" you get output like "start survey" etc? Just a thought..

falcon’s picture

Status: Active » Closed (won't fix)

I think we'll leave this be for Quiz 4 and fix it in the D7 version of Quiz.

If we have two different node types we'll have some code in common for both and some customizations for each. I think it will be good. (We will customize more than just the interface texts...)

wadmiraal’s picture

Component: Code » Code - Import/Export
StatusFileSize
new1.34 KB

This is just a very simple patch that adds a plural form. It's just to have it on d.o., as we use it in Opigno LMS. It won't solve the problems mentioned above, as that would require much more work.