Translation issues

unostar

Joined: 2009-05-27
Posts: 4
Posted: Fri, 2009-06-05 07:00

First, I'd like to say thank you for this very promising & exciting project. Hope it will develop further, though it's already an excellent decision for site gallery. Good job!

Now to the point: I'm having problems submitting my own translations:

 So here's the error:
@todo TRANSLATIONS_SUBMISSION_FAILED HTTP/1.0 400 Bad Request

File: modules/gallery/helpers/l10n_client.php, line: 188
And here's how we got there:

    * modules/gallery/controllers/admin_languages.php [55]:

      l10n_client_Core::submit_translations(  )

    *

      Admin_Languages_Controller->share(  )

    * modules/gallery/controllers/admin.php [50]:

      call_user_func_array( Array
      (
          [0] => Admin_Languages_Controller Object
              (
                  [theme:private] => 
                  [uri] => URI Object
                      (
                      )

                  [input] => Input Object
                      (
                          [use_xss_clean:protected] => 1
                          [magic_quotes_gpc:protected] => 
                          [ip_address] => 
                      )

              )

          [1] => share
      )
       )

    *

      Admin_Controller->__call( languages, Array
      (
          [0] => share
      )
       )

    * system/core/Kohana.php [291]:

      ReflectionMethod->invokeArgs( Admin_Controller Object
      (
          [theme:private] => 
          [uri] => URI Object
              (
              )

          [input] => Input Object
              (
                  [use_xss_clean:protected] => 1
                  [magic_quotes_gpc:protected] => 
                  [ip_address] => 
              )

      )
      , Array
      (
          [0] => languages
          [1] => Array
              (
                  [0] => share
              )

      )
       )

    *

      Kohana::instance(  )

    * system/core/Event.php [209]:

      call_user_func_array( Array
      (
          [0] => Kohana
          [1] => instance
      )
      , Array
      (
          [0] => 
      )
       )

    * system/core/Bootstrap.php [55]:

      Event::run( system.execute )

    * index.php [72]:

      require( system/core/Bootstrap.php )

I noticed that everything goes fine till I change "No comments yet. Be the first to <a %attrs>comment</a>!". I tried several times already (deleting DB entry->submission ok; adding this string translation "Еще нет. Будьте <a %attrs>первым</a>!" ->error).
Is there any way to overcome the problem?

Also, I noticed that many strings are hardcoded (like "Add a comment" in ui.init.js, overlay menus, strings like "Advanced" in main menu etc). Is it possible to also make them available for translation?

And last, but not least, I’m pretty much interested in translating to mother tongue. Is it possible to add more languages to the list (mine is "Belarusian", just in case ;)?

Thanks!

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2009-06-05 07:59

I believe this is a known issue. We ran out of time to fix it in beta 1, but we'll fix it in beta 2.

I'm working on fixing the hardcoded strings. The ones you pointed out will miss beta 1, but I've fixed them in my fork (http://github.com/bharat/gallery3/). Keep pointing out any issues that find and I'll fix them asap. Once beta 1 goes out, I'll merge my fork back into the trunk. In the meantime, I've also added Belarusian: http://github.com/bharat/gallery3/commit/05d1bec594775115d3cd597e01e2326eee2fa1ab

---
Gallery 3 problems? Check gallery3/var/logs before you post!
Gallery 3 latest code: http://github.com/gallery/gallery3/zipball/master
Gallery 3 from git: http://codex.gallery2.org/Gallery:Using_Git

 
unostar

Joined: 2009-05-27
Posts: 4
Posted: Fri, 2009-06-05 13:44

Dear bharat, thank you very much for your kind response.
Just a quick note re Belarusian locale: it is actually be_BY.UTF-8. Correct setting below:

$l["be_BY"] = "&#1041;&#1077;&#1083;&#1072;&#1088;&#1091;&#1089;&#1082;&#1110;"; // Belarusian

Quote:
Keep pointing out any issues that find and I'll fix them asap.

tried github, hope did it right :)

Thank you!

 
bharat
bharat's picture

Joined: 2002-05-21
Posts: 7994
Posted: Fri, 2009-06-05 17:27

Looks great! I pulled your changes into my fork, then into the main branch so this will go into the beta 1 release. Congratulations, I think you're the first person outside of the core dev team to submit a change into Gallery 3 by using git's forking strategy, and I have to say -- it works really well!

---
Gallery 3 problems? Check gallery3/var/logs before you post!
Gallery 3 latest code: http://github.com/gallery/gallery3/zipball/master
Gallery 3 from git: http://codex.gallery2.org/Gallery:Using_Git

 
valiant

Joined: 2003-01-04
Posts: 32509
Posted: Fri, 2009-06-05 21:58

@unostar:

the issue with localizable strings with "<a %attrs>" is now resolved. it's a server-side (gallery.menalto.com) fix, so you should just try to resubmit your translation and it should work now.

--------------
Documentation: Support / Troubleshooting | Installation, Upgrade, Configuration and Usage

 
unostar

Joined: 2009-05-27
Posts: 4
Posted: Fri, 2009-06-05 23:52

@bharat:
Thank you very much. Wow, i suppose i should be proud :)
Also would like to admit that github is indeed a nice decision for community contributions, as it's pretty easy to commit changes. Hope I could submit some valuable changes.
@valiant:
Thank you, it's working just fine now.