This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Russian (Русский) translations
#1

Thanx for commentics Smile

My english is bad, and I'll write in Russian in this thread.


Перевод НЕ машинный, но переводила девочка совершенно не знающая что переводит - возможны смысловые неточности. Сам я буду исправлять совсем в другой плоскости(на сленг) , поэтому вам не подойдет. Прошу если вы внесли исправления, улучшения - отправьте исправленный вариант мне в личку и я проверив его обновлю тут. Спасибо за участие!


Attached Files
.zip comments_ru.zip Size: 20.83 KB  Downloads: 73
Reply
#2

Hi,

Thank you for the Russian translation. There are just a few untranslated parts. Can you translate the following:

/comments/includes/emails/russian/admin/*

/comments/includes/language/russian/form.php

/comments/includes/language/russian/rss.php

Have you completed the interview?
Reply
#3

Hello! I translated these parts. But there are still some untranslated parts, such as user agreement and Privacy Policy. These files are now empty.


Attached Files
.zip comments_ru.zip Size: 22.96 KB  Downloads: 102
Reply
#4

Hi!
I am new to this. Just loaded the module and trying to play around with it. Looks great! Need to figure out now if I can easily make a good use of it on my site.
My site is 4-lingual, including Russian. I am native Russian too.
I was wondering if someone is still taking care of the Russian translation? Does it have to be started from scratch?
Well, at any rate, please let me know what are the outstanding pieces and how can I contribute.
Slowly, but surely I am confident that we can add the Russian to your list of languages before long.
Best regards,
Mike
Reply
#5

Hi Mike,

Thanks for wanting to contribute the Russian language to Commentics!

With the previous translation being so old I think you would need to start from scratch.

There's an FAQ in the 'Languages' section of this page: https://www.commentics.org/faq

When you're finished if you attach it to this forum thread I'll make it available for everyone.

Let me know if you have any further questions or issues at all.

Have you completed the interview?
Reply
#6

Thanks, Steven!
I will do exactly that - start translating while trying to integrate your module on my site.
Will let you know if I hit a roadblock or something...
Mike
Reply
#7

Here is one thing, Steven. Not overly important, but still.
In order for translation to look good and not like machine translated, the words following the cardinal numbers have different forms in Russian. In English it's just "one day" or "many dayS".
In Russian it differs for "one", "two", "five" etc. In this example there are 3 different word forms used.
I was wondering is it too much work to make the translation module just slightly more flexible when it comes to number/noun combinations?
Regards,
Mike
Reply
#8

Hi Mike,

I'm very happy to make any changes to improve the translations.

Just to clarify, are you talking about the comment date (17 hours ago, 2 days ago etc)?

If so it already seems quite flexible to me. If you want to remove the word 'ago' at the end, you could just change that to an empty value ''. Then with all of the values below it e.g. '%d days' you can move the '%d' bit if you need to. For example 'days %d'.

Maybe if you show me some examples it might help.

Have you completed the interview?
Reply
#9

Hi, Steven!
Yes, this is what I mean, you got it right.
There are no issues with "ago".
But in Russian there are three different declension forms for words like "day", "year", "hour", "minute" etc.
They go with the number ranges like this:
1) 1, 21, nnn1
2) 2, 3, 4, 22, 23, 24, nnn2, nnn3, nnn4
3) 5, 6, 7, 8, 9, 10, 11, 12 ... 20, 25...30, 35...40, nnn5...nnn0
Not sure about other languages, but this is how it is in Russian.
The order of "%d days" is good, and yes, I understand that I can change it if needed.
I wouldn't mind writing the logic for this case myself, but I don't know where and if it's possible at all. If it is you can jut give me a pointer.
Thanks!
Reply
#10

I see what you mean.

Commentics uses a jQuery plugin called Timeago to handle the dates. I had a look at their documentation about locales and they appear to have a good solution for the Russian language.

If you open /frontend/view/default/javascript/common.js and search for 'timeago' you should see this section:

Code:
$.timeago.settings.strings = {
suffixAgo : cmtx_js_settings_comments.timeago_suffixAgo,
inPast    : cmtx_js_settings_comments.timeago_inPast,
seconds   : cmtx_js_settings_comments.timeago_seconds,
minute    : cmtx_js_settings_comments.timeago_minute,
minutes   : cmtx_js_settings_comments.timeago_minutes,
hour      : cmtx_js_settings_comments.timeago_hour,
hours     : cmtx_js_settings_comments.timeago_hours,
day       : cmtx_js_settings_comments.timeago_day,
days      : cmtx_js_settings_comments.timeago_days,
month     : cmtx_js_settings_comments.timeago_month,
months    : cmtx_js_settings_comments.timeago_months,
year      : cmtx_js_settings_comments.timeago_year,
years     : cmtx_js_settings_comments.timeago_years
};

Try replacing it with this:

Code:
 function numpf(n, f, s, t) {
   // f - 1, 21, 31, ...
   // s - 2-4, 22-24, 32-34 ...
   // t - 5-20, 25-30, ...
   var n10 = n % 10;
   if ( (n10 == 1) && ( (n == 1) || (n > 20) ) ) {
     return f;
   } else if ( (n10 > 1) && (n10 < 5) && ( (n > 20) || (n < 10) ) ) {
     return s;
   } else {
     return t;
   }
 }

 jQuery.timeago.settings.strings = {
   prefixAgo: null,
   prefixFromNow: "через",
   suffixAgo: "назад",
   suffixFromNow: null,
   seconds: "меньше минуты",
   minute: "минуту",
   minutes: function(value) { return numpf(value, "%d минута", "%d минуты", "%d минут"); },
   hour: "час",
   hours: function(value) { return numpf(value, "%d час", "%d часа", "%d часов"); },
   day: "день",
   days: function(value) { return numpf(value, "%d день", "%d дня", "%d дней"); },
   month: "месяц",
   months: function(value) { return numpf(value, "%d месяц", "%d месяца", "%d месяцев"); },
   year: "год",
   years: function(value) { return numpf(value, "%d год", "%d года", "%d лет"); }
 };

Reference:
https://github.com/rmm5t/jquery-timeago/...eago.ru.js

It will need a bit of work to keep it dynamic so the user can still switch languages but it's a good starting point. I'll be able to revisit it in a few days if you have any issues.

Have you completed the interview?
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)