Not logged in. · Lost password · Register
Forum: Customising UNB Translations RSS
Russian translation for 20080305-dev
completed
Page:  1  2  next 
Avatar
Night Nord #1
Member since Feb 2008 · 15 posts · Location: Russia, Saint-Petersburg
Group memberships: Members
Show profile · Link to this post
Subject: Russian translation for 20080305-dev
Translated:
        full lang/ru/
        plugins:
                adsense
                custompage
                forumvis
                inactiveusers
                massmove
                spamfilter
                wordfilter
                acleditor
                customaction
                dbcheck
                groupseditor
                logviewer
                navlinks
                threadattributes

Not translated:
        Plugins list - names and descriptions. Impossible without plugins code change.
        Copyright and "Powered by" notice - for some reason hardcoded into template
        plugins:
                abbctags - we just don't know what it is at all.

Missing features:
        Some descriptions (e.g. "thread.split~" in common.php) uses numbers, but not supports .num<digit> feature, because of "tr{" in template. There is suggestion, to add check inside UteTranslate - if only argument is numeric - use UteTranslateNum instead.

Authors:
        evadim <evadim@evadim.ru>
        Night Nord <NightNord@gmail.com>

This package also accesible from subversion https://89.163.78.124/unb_lang (including "modern" design copyright translation)
The author has attached one file to this post:
unb-lang_ru-20080305-dev.tar.bz2 29.9 kBytes
You have no permission to open this file.
Avatar
Night Nord #2
Member since Feb 2008 · 15 posts · Location: Russia, Saint-Petersburg
Group memberships: Members
Show profile · Link to this post
Subject: Bugfix
Fix: flag.png file was corrupted, for some reason. Now it is normal. You can also download it from https://89.163.78.124/unb_lang/lang/ru/flag.png

And another thing - name.txt couldn't be translated, or it will appear broken (so called "кракозябры"  =) ) in language list, so it remains as "Russian".

New archive attached.
The author has attached one file to this post:
unb-lang_ru-20080305-dev.tar.bz2 29.9 kBytes
You have no permission to open this file.
Avatar
Yves (Administrator) #3
User title: UNB developer & webmaster
Member since Jan 2004 · 3855 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
You can use UTF-8 encoding (this time with byte-order mark, this is up to my code to evaluate it) to write the language name in native language. I've corrected this (using "Русский" from Wikipedia, hope it's correct).

I'm not sure if I understood the problem with numbers in template translations. If this problem still existing? You've added some code to the translation files that does something with the texts and numbers...

I have replaced the flag image by one of my collection (using scaled down images from Wikipedia) to keep it consistent with other flags. (All in a similar size (with correct aspect ratio) and no 3D effects...)

The abbctags plug-in can be used to add custom BBCode tags. This is more of a plug-in template, so translation is not really required.

All in all, it looks very nice (although I don't really understand what it says... :D). Thank you for your work on it! I'm now going to publish the file on the downloads page.
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Avatar
Night Nord #4
Member since Feb 2008 · 15 posts · Location: Russia, Saint-Petersburg
Group memberships: Members
Show profile · Link to this post
You can use UTF-8 encoding (this time with byte-order mark, this is up to my code to evaluate it) to write the language name in native language. I've corrected this (using "Русский" from Wikipedia, hope it's correct).
Yes, it's correct, thanks. I'm not clearly understand this things around with/without BOM, so we just convert it to UTF-8, but without any success...

I'm not sure if I understood the problem with numbers in template translations. If this problem still existing? You've added some code to the translation files that does something with the texts and numbers...
Yes. Problem is in that Russian has a few forms for plural:
1,21,31,...,101... - uses one form
2-4,22-24,32-34... - uses second form
5-20,25-30,35-30,...,100,105-120 - uses third form

0 - commonly use own, not-number form (like "never downloaded"), otherwise - third form.

As you see - numbers 10-20 brokes common sequence and this makes simple use of 'num<num>%<base>' syntax impossible. So script was written, to map user-defined numbers to all possible variants (1%10 -> 1, [2-4]%10 -> 2, [5-10]%10 -> 5, [10-19]%100 -> 5, and 0 -> 5, if none defined), also with some features like replacing numbers by text for basis numbers (1, 2, 5) and using common base-text.

Now about templates:
As example take 'thread.split~':
  1. $UNB_T['thread.split~'] = 'This view of the thread contains all posts on a single page. Each post is limited to {n} characters in display only. Every selected post will be moved over to the new thread. You must enter a subject for the new thread. You’ll find the submit button at the end of this page.';
As you see - it uses '{n} characters' plural form string, so it will be better to map it as others plural forms, but grepping give as this:
designs/modern/tpl/cache/threadview.html.php:<?php echo UteTranslate("thread.split~", "n", UteVariable('threadSplitDisplayLimitLength')) ?>
designs/modern/tpl/threadview.html:{tr "thread.split~" "n" $threadSplitDisplayLimitLength}
- it uses {tr ...}, which compiles in "UteTranslate" function, so if we will map this description to nums, it will disappear at all.
Suggestion was in adding some check to UteTranslate function, like this:
  1. --- ute-runtime.lib.php.bak     2008-03-11 18:06:15.000000000 +0300
  2. +++ ute-runtime.lib.php 2008-03-11 18:19:26.000000000 +0300
  3. @@ -197,14 +197,18 @@
  4.  // see UteTranslateNum
  5.  //
  6.  function UteTranslate($key)
  7.  {
  8.         global $UNB_T;
  9.  
  10.         $args = func_get_args();
  11. +
  12. +       if ( count($args) == 3 && is_numeric( $args[2] ) )
  13. +               return UteTranslateNum($key, $args[2], $args[1], $args[2]);
  14. +
  15.         $s = $UNB_T[$key];
  16.         for ($pos = 1; $pos + 1 < sizeof($args); $pos += 2)
  17.         {
  18.                 $s = str_replace('{' . $args[$pos] . '}', $args[$pos + 1], $s);
  19.         }
  20.         return $s;
  21.  }
This has some perfomance overhead, but makes translations independed from skins misdesigns. But really this is not critical at all - in most cases such descriptions used in some administrative or moderating functions, and commonly matches with default values.

I have replaced the flag image by one of my collection (using scaled down images from Wikipedia) to keep it consistent with other flags. (All in a similar size (with correct aspect ratio) and no 3D effects...)
Thats ok, we just use first not ugly flag we have =)

Only question remain - we are working on Gentoo Linux ebuild for UNB, but i'm not sure in which forum it must be placed (hopelessly, it isn't likely to be added shortly to official gentoo portage and not everyone knows about overlays, so it will be better to place it somewhere here)
Avatar
Yves (Administrator) #5
User title: UNB developer & webmaster
Member since Jan 2004 · 3855 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by Night Nord:
Yes, it's correct, thanks. I'm not clearly understand this things around with/without BOM, so we just convert it to UTF-8, but without any success...

Long problem short: The PHP processor does not care about the BOM (first 2/3 bytes of a properly marked Unicode file) and treats them as output. This output will go straight to the browser, but 1) it's considered "garbage" by the browser and 2) output before HTTP headers doesn't work. In any file other than *.php, it is my code that reads the file, and I made my code BOM-aware so it will convert to UTF-8 only if no BOM is found. The board.conf.php file is also one of these because it's (obviously) not parsed through PHP. So if you want a Russian board title, be sure to have the BOM there. (Should be factory default.)

Update: Wikipedia: BOM explains it very well now, including the PHP issue, right in the first section.

As you see - numbers 10-20 brokes common sequence and this makes simple use of 'num<num>%<base>' syntax impossible.

Russian is more complex than Polish? (Which is the language this number thing has originally been added/extended for.) Okay...

So script was written

I see.

This has some perfomance overhead, but makes translations independed from skins misdesigns. But really this is not critical at all - in most cases such descriptions used in some administrative or moderating functions, and commonly matches with default values.

I'd suggest we'll leave the code here for anybody to integrate it themselves as they wish to. At least until Russian masses of UNB admins/users come screaming to have a solution built-in. :) I'm not sure what side effects this may have.

Only question remain - we are working on Gentoo Linux ebuild for UNB, but i'm not sure in which forum it must be placed

Umm, no idea. Maybe the Plug-in gallery?

What is that, a gentoo ebuild? Will it install UNB into a pre-defined directory in a pre-defined web server document path? What does it do? What can it do better (or different) than UNB's own installer?
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
This post was edited on 2008-03-11, 19:32 by Yves.
Avatar
Night Nord #6
Member since Feb 2008 · 15 posts · Location: Russia, Saint-Petersburg
Group memberships: Members
Show profile · Link to this post
Quote by Yves:
Russian is more complex than Polish? (Which is the language this number thing has originally been added/extended for.) Okay...
Er... I don't know Polish, so I can't say anything. Anyway, feature like this really rare for board-engines and actually everyone already takes such mistakes as normal (and technically uncorrectable).

Quote by Yves:
Umm, no idea. Maybe the Plug-in gallery?

What is that, a gentoo ebuild? Will it install UNB into a pre-defined directory in a pre-defined web server document path? What does it do? What can it do better (or different) than UNB's own installer?

Partially yes. Gentoo ebuild is a basic unit of gentoo packaging system called Portage. It contains information about where sources located (URL), how it must be compilled, which options user can define (and define them according to "USE-flags"), how it must be installed, resources to use, etc... Also, it helps with dependencies. Actually, it is adapted for normal programs that needs to be compiled, and, in view of web-app, all its functionallity restricted only to install.

But, if compiled programs installs in ebuild-defined locations and user can't override this for single package, way of web-apps quite different. They are installed in /usr/share/webapps/<package_name>/<version>. Then user can use special utilite called 'webapp-config' to install or upgrate existing webapp according to his settings. While installing new webapp system automatically sets nessesary permissions, creates right directory structuture, creating databases/users (if this is needed) etc...
While updating, it setups new files and removes old, except configs. New configs must be merged, replaced or discarded by user manually, or with some helper utilite.

Webapp-config not replaces internal installer, but provides usefull features it misses (e.g. there is no need of auto db-creation if package can do it, but if package can't - this will be quite helpfull for administrator). Also it can be used to setup one or different versions of webapp in different vhosts or pathes inside single vhost, without multiply copies of some "static" files, e.g. images.

Maybe, it will be better, if you check http://dev.gentoo.org/~rl03/webapp-config.html for better explanation =).

Generally it's a not a good idea to install something without system package-manager, even if package files can be tracked easily. So often gentoo users just checks in portage for availible software, maybe, also in some unofficial overlays, and choose from software, that portage provides. Also it will help users, who already use UNB on gentoo, to keep their boards up to date.

You can look on current unb ebuild (without langs support): https://89.163.78.124/portage/www-apps/unb/unb-20080229.eb…
Avatar
Night Nord #7
Member since Feb 2008 · 15 posts · Location: Russia, Saint-Petersburg
Group memberships: Members
Show profile · Link to this post
P.S.
And there is some small issue:

Quote by newsboard.unclassified.de/download/lang/ru/1.6.4:
Invalid file specified. Please check out the downloads page.

Is this normal? =)

P.S.S. Grrh... Sorry, I haven't noticed that still can edit previous post... =)
This post was edited on 2008-03-11, 20:47 by Night Nord.
Avatar
Yves (Administrator) #8
User title: UNB developer & webmaster
Member since Jan 2004 · 3855 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by Night Nord:
Quote by newsboard.unclassified.de/download/lang/ru/1.6.4:
Invalid file specified. Please check out the downloads page.

Is this normal? =)

No, only if I upload the file with the wrong name and then also forget to register it in my downloads dispatcher... Now it works. :)
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Avatar
Night Nord #9
Member since Feb 2008 · 15 posts · Location: Russia, Saint-Petersburg
Group memberships: Members
Show profile · Link to this post
Small fix in:
./controlpanel_admin.php:$UNB_T['cp.disallowed usernames~'] =

Compatible with version 20080305
The author has attached one file to this post:
lang_ru.2008.03.05.tar.bz2 57.2 kBytes
You have no permission to open this file.
This post was edited on 2008-05-21, 19:05 by Night Nord.
Edit reason: Grrh... Preview cleans file attach field...
Avatar
Yves (Administrator) #10
User title: UNB developer & webmaster
Member since Jan 2004 · 3855 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Updated published on the downloads page.
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Avatar
Night Nord #11
Member since Feb 2008 · 15 posts · Location: Russia, Saint-Petersburg
Group memberships: Members
Show profile · Link to this post
Subject: New version
There is new version of translation for latest devel version ("2008-08-04").

Only one string added. Old string, with obsolete identifier was saved to provide back-compartible translation.
The author has attached one file to this post:
unb_lang_ru_20080804.tar.bz2 28.9 kBytes
You have no permission to open this file.
Avatar
Yves (Administrator) #12
User title: UNB developer & webmaster
Member since Jan 2004 · 3855 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
I have updated the file on the download page with this version.
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
Avatar
Night Nord #13
Member since Feb 2008 · 15 posts · Location: Russia, Saint-Petersburg
Group memberships: Members
Show profile · Link to this post
Subject: Translation update
Update to match with latest devel version ("2008-11-22")
The author has attached one file to this post:
unb_lang_ru_20081122.tar.bz2 29 kBytes
You have no permission to open this file.
Avatar
Yves (Administrator) #14
User title: UNB developer & webmaster
Member since Jan 2004 · 3855 posts · Location: Erlangen, Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Download page updated.
♪ ...nanananah, all in all we’re just brilliant thieves, nanananah... ♪♬
supmener #15
Member since May 2010 · 2 posts
Group memberships: Members
Show profile · Link to this post
Что то на Денвер не устанавливается, вот что пишет. И куда заливать русский язык? В какую-то папку или потом через админку?
Deprecated: Function set_magic_quotes_runtime() is deprecated in Z:\home\forums\unb\unb_lib\common.lib.php on line 77
Error: HTTP headers have already been sent! Caused by output from file ~/unb_lib/common.lib.php at line 77. The error was detected after initialisation.
Description: HTTP headers are used to give the web browser information on the content type or how to handle it. These headers are immediately sent to the browser as soon as text content is generated by the PHP script. At this place, the application expected the headers not to be sent yet and needs to add more headers but cannot do so because somewhere else output was generated. This likely happens when custom page elements have been inserted before this code or empty lines or UTF BOMs are present before the opening <?php tag. Please check the above code line and remove the output from there to resolve the error.
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Page:  1  2  next 
Go to forum
This board is powered by the Unclassified NewsBoard software, 20120620-dev, © 2003-2011 by Yves Goergen
Page created in 273.4 ms (195.1 ms) · 136 database queries in 105.4 ms
Current time: 2013-05-21, 14:19:28 (UTC +02:00)