Advertisement:

Author Topic: Can I reuse already translated sentence?  (Read 36960 times)

Offline Chief

  • Semi-Newbie
  • *
  • Posts: 56
  • Gender: Male
  • Just follow me...
Can I reuse already translated sentence?
« on: June 24, 2004, 11:09:35 PM »
For example:

In file ManagePermissions.english.php:
Code: [Select]
...
$txt['permissionname_pm_read'] = 'Read personal messages';
...

In file Errors.english.php:

Code: [Select]
...
include_once('./ManagePermissions.english.php');
$foo = 'You are not allowed to ';
...
$txt['cannot_pm_read'] = $foo . $txt['permissionname_pm_read'];
...

Maybe, dear developers can to propose a better solution.
This allow translate only once and to be sure that translation is same in all places.

Is it acceptable for other languages?
Oops...

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Can I reuse already translated sentence?
« Reply #1 on: June 25, 2004, 03:37:36 AM »
It's a bad idea, and not done in SMF for a few reasons:

1. Context.  Maybe it's handled that way in English, but in other languages that might make translation difficult.
2. Efficiency.  You should never load a language file you don't need - and ./ won't work in 99% of all cases either.
3. Phraseology.  It is less than optimal to have every error message phrased the same way - it gets old.  Using slightly different phrasings for each message (when they are never displayed in a group/together...) makes them "feel" a lot better.
4. Dependencies/Upgrading.  What if, later, a string you are using in one language file gets removed... or renamed... or changed?  What if a mod or theme uses it differently?

-[Unknown]

Offline Chief

  • Semi-Newbie
  • *
  • Posts: 56
  • Gender: Male
  • Just follow me...
Re: Can I reuse already translated sentence?
« Reply #2 on: June 25, 2004, 07:43:56 AM »
Yes, [unknown]. It's obvious generally, but:

Quote
1. Context.  Maybe it's handled that way in English, but in other languages that might make translation difficult.
I ask this question in the last line of my post. Perhaps, the other translators will advance they opinion?

Quote
3. Phraseology.  It is less than optimal to have every error message phrased the same way - it gets old.  Using slightly different phrasings for each message (when they are never displayed in a group/together...) makes them "feel" a lot better.
$txt['cannot_pm_read'] = $foo . $txt['permissionname_pm_read'] . ', chicken  8)';

That's "slightly different phrasings"? (This joke isn't about you, do not answer, please)

Anywhere, I always can construct very lively variant with $txt['permissionname_pm_read'].
Translation is very unambiguously thing. Some words haven't even some roughly equivalents.
I catch myself at using quite different sentences where it's undesirable.

If I get the message "You are not allowed to XXX" and report moderator, he will look for XXX not for YYY, that corresponds to XXX in Managing Permissions, isn't it?

Take into account that I'm alone translater. What the group to do?

Quote
4. Dependencies/Upgrading.  What if, later, a string you are using in one language file gets removed... or renamed... or changed?  What if a mod or theme uses it differently?
As to permissions, if it deleted or changed - the error message MUST be corrected. This such in many other cases to.

At last - your second item:
Quote
2. Efficiency.  You should never load a language file you don't need - and ./ won't work in 99% of all cases either.
./ is just an example, don't nagging at me, please.
But, other is a greatest reason of all. And it may be resolved by using table for some messages. What are you think about this?
« Last Edit: June 25, 2004, 07:47:15 AM by Chief »
Oops...

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Can I reuse already translated sentence?
« Reply #3 on: June 25, 2004, 06:39:14 PM »
My point, and opinion, is that if EVERY error message begins with the words, "You are not allowed to".... it can become very very DRY.  SMF doesn't think it's too good for you :P.  It's not the snobish butler that secretly plans your death at night.

Using two different phrasings, as in "You cannot just XXX even if this is your post." makes it seem like the forum is really talking to you.  It makes it feel like, even though it's an "you are not allowed" message, it's not a cold one.... it's a friendly one, like "oops".  People are more comfortable around friendly entities than snobish butlers :P.

However, yes it should be clear that the error message corresponds to the right permission.  With the English error messages (most of which I of course hand typed...) I tried to balance the need for "friendliness" with clarity.  Except, I didn't write the strings in ManagePermissions, Compuart did. (but I looked them over and they seemed fine.)

I meant many of my points in a general sense.  Maybe you can depend on the error messages and permissions tying together - and maybe you can't.  What if there is a mod that changes the permission interface, but these changes require reformatting the language strings... ie. "delete posts" -> "Are you sure you want to allow this person to delete posts?"... then you get "I'm sorry, but you are not allowed to Are you sure you want to allow this person to delete posts?" - the error message wouldn't have needed to have been changed.... except specifically for that one language - this makes it confusing.

My primary meaning in efficiency was that PHP takes time to parse any file.  While it doesn't take *that much*, it is safe to say that parsing is at least 30% of SMF's average load time. (likely more.)  The more files it has to parse, and the longer those files are, the slower it's going to get.  Maybe this doesn't exactly matter for permissions, but once you're doing it with permissions why not do it lots of other places too?

You'll have to excuse me if I try to answer questions as if they affect the long run, as if people will come in four months and read them and make their own assumptions.... but I have seen exactly that happen too often.  Maybe it might work in this one case, and you'd never have to worry about it... and it'd never cause a single person a bit of strife....... but there would be OTHER cases, and those would.

As for context; I know that, for example, Japanese uses very non-English grammar.  It has been referred to as, basically, "yoda speak".  In Japanese, you might say just the word "hungry" to mean that you are hungry.  You might say "hungry, he is" or "allowed to do this, you are not".  I won't pretend I know Japanese, but from my understanding, forcing word order is very very bad in the long run for internationalization - whether it be Japanese, Hebrew, Thai, or German.

And, yes, there are places where word order is forced... but I consider these places to be problems that need working out.  By no means would I want to introduce MORE troubles where a phrase like "person is allowed to delete posts" might have to fit into a sentence that uses you.  Even Spanish may have problems with such usage. (tengo, tiene, tienes, etc. - although in that case Usted could be used and that would mostly work, except that it almost should be Ellos not singular.)

-[Unknown]

Offline Chief

  • Semi-Newbie
  • *
  • Posts: 56
  • Gender: Male
  • Just follow me...
Re: Can I reuse already translated sentence?
« Reply #4 on: June 25, 2004, 07:57:30 PM »
Ok. It's cleverly  :P and so big letter...
Excuse me for your wasted time.

But I have one question yet.
That is congruence of words and numbers.

In English it looks like:
1,21,31...101...121... day
0,2-20,22-30,32-40...92-100,102-120... days.

In Russian:
1,21,31...101...121... den
2-4,22-24,32-34...102-104,122-124... dnya
0,5-20,25-30,35-40...105-120,125-130... dney
(To avoid character table problems, I using not Russian, but Ruglish)

Other languiges have its own rules, I think.
Have you a solution?

May be it merit to be discussed in separate topic?
« Last Edit: June 26, 2004, 03:03:26 PM by Chief »
Oops...

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Can I reuse already translated sentence?
« Reply #5 on: June 26, 2004, 06:52:25 PM »
Perhaps, and yes... this is something that needs looking at.  What is the difference between dney and dnya?  The 0?

-[Unknown]

Offline Chief

  • Semi-Newbie
  • *
  • Posts: 56
  • Gender: Male
  • Just follow me...
Re: Can I reuse already translated sentence?
« Reply #6 on: June 27, 2004, 12:31:26 AM »
What is the difference between dney and dnya? It's shown in the table. Yes, in Russian exists the singular and the plural, like in English. But, 3 forms of word used with corresponding numbers. Don't ask me why... :)

It's important, that :
the word's form depends on context
different words do not  obey the same rules
there is Nobody think, that Russian is easy  :P

As I know context (and word), I can select the word's form only if I know the number.
(And I can write small script...)

"0" is "there is no days", "zero"   ::)

Oops...

Offline David

  • Destroyer Dave
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,928
  • Gender: Male
    • David Recordon
Re: Can I reuse already translated sentence?
« Reply #7 on: June 28, 2004, 03:54:44 AM »
Yeah, plural support is something that is fun to do right.
This space for rent.

Offline Chief

  • Semi-Newbie
  • *
  • Posts: 56
  • Gender: Male
  • Just follow me...
Re: Can I reuse already translated sentence?
« Reply #8 on: June 28, 2004, 04:19:16 AM »
Yeah, plural support is something that is fun to do right.
Sorry, if it's mistake. English is not my native language...
Correct me, please.
Oops...

Offline David

  • Destroyer Dave
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 3,928
  • Gender: Male
    • David Recordon
Re: Can I reuse already translated sentence?
« Reply #9 on: June 28, 2004, 08:55:14 PM »
No, not your mistake.  It is just hard to correctly support plurals in a translation system.
This space for rent.

Offline Chief

  • Semi-Newbie
  • *
  • Posts: 56
  • Gender: Male
  • Just follow me...
Re: Can I reuse already translated sentence?
« Reply #10 on: June 28, 2004, 11:51:19 PM »
It's not so hard.

There are many sentences like "Bla-bla X word bla-bla", where 'X' is number and 'word' must congruence to X, but 'Bla-bla' never changed.

And even like "Bla-bla word1 X word2 bla-bla", where both 'wordN' depends of 'X'.

In summary: "Bla-bla bla-bla(X) bla-bla".
And I can write function bla-bla(X) if developers will call it.

Example:
$txt['viewmembers_online'] = 'Last Online'; - is bla-bla
$txt['viewmembers_today'] = 'Today';                 
$txt['viewmembers_day_ago'] = 'day ago';          > cases
$txt['viewmembers_days_ago'] = 'days ago';      /

will be replaced with

$txt['viewmembers_online'] = 'Last Online: ' . my_func(X);
function my_func(X) ......;

I'm not pro coder - it's your task.
Oops...

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Can I reuse already translated sentence?
« Reply #11 on: June 30, 2004, 02:18:48 AM »
Again, this doesn't work for all languages.  Russian is a great example of a different language, but it is not as different as it can get.

-[Unknown]

Offline Chief

  • Semi-Newbie
  • *
  • Posts: 56
  • Gender: Male
  • Just follow me...
Re: Can I reuse already translated sentence?
« Reply #12 on: July 08, 2004, 05:51:12 PM »
Again, this doesn't work for all languages.  Russian is a great example of a different language, but it is not as different as it can get.

-[Unknown]

No, [Unknown], it will.
All the sentence will be in my hands.

I'm finished first pass of Russian localization and I'm crying on this problem. It looks with gross numeral mistakes.

I need help. Do you ready to view this closely?
Oops...

Offline [Unknown]

  • SMF Friend
  • SMF Master
  • *
  • Posts: 36,102
  • Gender: Male
Re: Can I reuse already translated sentence?
« Reply #13 on: July 08, 2004, 11:28:48 PM »
No, [Unknown], it will.
All the sentence will be in my hands.

So... I guess what you're saying is that Russian users, for some strange and very culture-specific reason, do not see the point in using modifications? (which may as I said in almost every post above, not be in your hands...)

-[Unknown]

Offline Chief

  • Semi-Newbie
  • *
  • Posts: 56
  • Gender: Male
  • Just follow me...
Re: Can I reuse already translated sentence?
« Reply #14 on: July 09, 2004, 12:14:48 AM »
I can't use any mod until it will be translated. Translated mod will be concerted. It's not a problem.

And I request to split this topic to "Words and numbers". ("Plurals" will be better for the English users, but "Words and numbers" will be clear to all others)

I hope to hear other translators from different languages. I suppose that it's not just Russian translation's problem.

All Russian translations of all forums I know accepted the inevitable of this. SMF can be a pinear and I desire to help.
« Last Edit: July 09, 2004, 10:28:09 AM by Chief »
Oops...

Offline Cerberus

  • Jr. Member
  • **
  • Posts: 278
  • Gender: Male
    • My main site: Pocket PC Russia
Re: Can I reuse already translated sentence?
« Reply #15 on: July 12, 2004, 08:49:08 AM »
Yes, in Russian exists the singular and the plural, like in English. But, 3 forms of word used with corresponding numbers. Don't ask me why... :)
Russian is like German and Latin. We have cases :)

for example:
She has a dog
She loves her dog

and now let's translate:
U nee est' sobaka[/color]
Ona liubit svoiu sobaku[/color]

The ending is different :)
Best Regards, Cerberus
YaBB Gold -> YaBB 1.1 -> YaBB SE (YaPP -> PfaBB) -> SMF
Pocket PC Russia