joseph-mudloff / pixie-cms

Automatically exported from code.google.com/p/pixie-cms
Other
0 stars 0 forks source link

Pixie CMS is hard to localize #22

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
I tried to localize Pixie into Lithuanian a few days ago. I haven't finished 
yet, so no attachments. However, I discovered that Pixie itself is really 
difficult to localize properly because of certain bad practices it employs in 
this process:

1) separately localized strings are being concatenated,
2) they are being re-used in different contexts,
3) some of them are difficult to understand without seeing them live, and 
sometimes it's hard to guess where to find them (comments would help!).

Would anyone be willing to work on this problem? I suspect it may be quite an 
amount of work to do, but on the other hand, it would really make Pixie CMS 
much better in terms of localizability.

My suggestion is to use gettext for localization and to avoid concatenation 
wherever possible.

Since the bad practices I mentioned are quite common, I was even inspired 
(frustrated?) enough to write a blog post detailing do's and dont's in making 
software that is actually localizable. Feel free to check it out: 
http://rq.lt/2010/06/14/software-that-is-actually-localizable/

Original issue reported on code.google.com by r...@rq.lt on 16 Jun 2010 at 2:42

GoogleCodeExporter commented 8 years ago
Attaching a patch which deals with most of the concatenation in a proper way 
(using (s)printf placeholders where appropriate). It touches en-gb locale file 
only, all others should be updated separately.
There are still some strings in the code that should be moved to a locale file. 
I'm not sure why there were not, so left some of them untouched.

Original comment by rim...@gmail.com on 15 Jul 2010 at 10:53

Attachments:

GoogleCodeExporter commented 8 years ago
There were some unrelated changes in previous patch:
1) two lines were removed from admin/lib/lib_db.php in order to fix an error 
which appeared in all pages saying that tz was undefined
2) first two chunks in admin/index.php were not intended in the patch.

I removed them manually from the file I'm attaching now. I haven't tested if 
this revised patch applies correctly or not, but I suppose it should. :) In 
case it doesn't, just adjust the previously submitted patch.

Furthermore, you may actually want the lib_db.php change...

Original comment by rim...@gmail.com on 15 Jul 2010 at 11:05

Attachments: