Topic: PunBB Translation beta 1

I've was using PunTranslator, but I had some problems with input methods and whatnot, so I finally just decided to make my own tool for it.

I'm also not a fan of making a platform dependent tool for a platform independent forum smile ... plus, having to click around in the GUI for every change is just too slow, so here's a small PHP script for translating PunBB's language files:

Download beta 1 here

I'd appreciate your help with testing.

Note that this is NOT beautiful or well commented code, and it was not optimized to look pretty - it was written in a hurry, and for functionality ...

You should be able to translate very quickly with this tool, as you can simply tab through each field in the enormous form it outputs, and edit everything one step at a time. Also, it should work with any past/future version of PunBB without changes.

Please read inside the php source for more notes and instructions - you will need to set read/write permissions for php before running the script, and you need to configure the language folders in the beginning of the script.

Re: PunBB Translation beta 1

Nice :) I'll wait for a stable release before I post it to the download page though.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

3

Re: PunBB Translation beta 1

hmmmmm there is a competition, this is a  (DELPHI vs PHP) :-P

may be you named PunOnlineTranslator

what a magic word token_get_all, for that i like PHP.

1 - I prefer to edit one Variable with one page,in your home page make me select a Variable by link
2 - there is a many NOTICE you can add

    error_reporting(E_ERROR | E_WARNING | E_PARSE);

3 -  i lost some comments and other command like.

setlocale(LC_CTYPE, $locale);

4 - in the line  178 to accept righttoleft reading

<TEXTAREA ROWS=4 NAME="t'.$count.'" ..........

to

<TEXTAREA dir='.$localized['_common.php']['$lang_common']['lang_direction'].' ROWS=4 NAME="t'.$count.'" .......

it's good for me when i have to change my language online :-)

------for Rickard------

it's hard to modify source code having comments and statments, if you can put the language words in formated file like csv or xml,
may be it slow or somthing,but good us.

thanks

If your people come crazy, you will not need to your mind any more.

Re: PunBB Translation beta 1

zaher wrote:

it's hard to modify source code having comments and statments, if you can put the language words in formated file like csv or xml,
may be it slow or somthing,but good us.

thanks

Yes, it will most likely be too slow. The beauty of having it in PHP source code is that we don't have to parse it and dynamically create arrays.

"Programming is like sex: one mistake and you have to support it for the rest of your life."

5

Re: PunBB Translation beta 1

I like PunBB because it's very fast, so we not need to lose this feature.

If your people come crazy, you will not need to your mind any more.

Re: PunBB Translation beta 1

@zaher

1) why would you prefer to click every string first? that doesn't make any sense to me - it's incredibly slow ... having everything on screen at once, you never even have to touch the mouse, just stay on the keyboard and do what you came to do: translate smile

2) I didn't get any notices? I'll add that error reporting line anyways though.

3) Yes, comments and code is "lost in translation" - it's not possible to simply "fix" this, as my translator works differently ... for consistency, it bases it's output files on the ORIGINAL language files - thus every translated file will have same comments, same structure etc. as the original files, which IMO they should. But hey, anyways, for chinese (and those few other languages with special character sets), manually copying in those 5-10 lines of code in *_common.php shouldn't be too much work to overcome?

4) good, yes - thanks for pointing it out.

@Rickard: it is stable already - the v1.0.x templates for simplified chinese have already been updated v1.1.x with it smile ... it's not terribly user friendly though, I'll make a few more improvements and fixes before v1.0.

Beta 2 with the listed corrections is up now.

Re: PunBB Translation beta 1

alright, here's version 1.0 ... nothing much changed though, removed some junk from the code, and changed the name to "PunBB PHP Localizer" to avoid confusing it with Pun Translator (the Delphi app).

of course you're all welcome to change/improve this script, I know there's plenty that could be done to make it better - but it suits my needs just fine, I'm done with the translations I needed to make, so I'm not putting anymore time into it, sorry...

Rickard,

feel free to pop it in that "useful scripts" folder in the PunBB distrib, what's it called, you know the one I mean smile

Re: PunBB Translation beta 1

(...oh, now I'm a "senior member", am I? heck, I'm not even 30 yet, quit trying to make me feel old, damnit! wink )

Re: PunBB Translation beta 1

I'll upload it together with zavers tool.

BTW, moved the topic out of the announcement forum. That forum is meant for "official" PunBB announcements. I know it doesn't say anything about that, but now you know :)

"Programming is like sex: one mistake and you have to support it for the rest of your life."

10

Re: PunBB Translation beta 1

I like it because online changing language and HTML moer power than delphi with Code Pages and unicode.
i mean link to edit variables group (grouping it by array or file) becuase it slow when loading all together.

another ask :-) you are from "Denmark" and your language "Chinese".
where is "Denmark" ?

If your people come crazy, you will not need to your mind any more.

Re: PunBB Translation beta 1

Yes, it's slow when loading, but then you only need to load once - I don't see the point in breaking it up.

Denmark is in Denmark - it's a small country in the EU, just between Germany and Sweden.

I'm not translating to chinese myself, a chinese client did that - which is why I had to make this tool smile

12

Re: PunBB Translation beta 1

Oh, i must add to my signature
sorry for bad geographic :-P

If your people come crazy, you will not need to your mind any more.

Re: PunBB Translation beta 1

Well, downloading won't work: Object not found!

Nothing about it at www.mindplay.dk, or rather, hardly anything at all at www.mindplay.dk

Does anybody know if this translator is still supported?

mindplay wrote:

I've was using PunTranslator, but I had some problems with input methods and whatnot, so I finally just decided to make my own tool for it.
...
Download beta 1 here
...

Re: PunBB Translation beta 1

probably becuase that post is half a year old

Re: PunBB Translation beta 1

You can download it from the PunBB downloads page -

http://punbb.org/downloads.php

I haven't had time to test PunBB v1.2 yet, so I don't actually know if it works for that?

Re: PunBB Translation beta 1

The script has been updated for PunBB v1.2.x - see this thread...