DragonPrime - LoGD Resource Community
Welcome Guest
  • Good morning, Guest.
    Please log in, or register.
  • November 19, 2018, 03:25:04 AM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1] 2 3 ... 33   Go Down
  Print  
Author Topic: Translation Wizard  (Read 99950 times)
0 Members and 1 Guest are viewing this topic.
Nightborn
Guest
« on: August 30, 2005, 09:18:34 AM »

Just a simple one:

copied&pasted untranslate.php

it has exactly the same functions as a module, but you can (what was important for me) select a module and then it's entries via checkbox...these entries will be move to the translations-table with intext=outtext.
Basically, it's for modules in your own language that pop up in your untranslated-table when you collect untranslated stuff... i.e. if you run your server in English and use some foreign language modules and want to collect stuff. If they make entries in mail or news, you have many english entries that you want to ignore. So you can now add them easily in your translated table. (sure you also may turn off the collect feature and translate manually).



Criticism & Bugreportings welcome!

I plan to do a more-than-one-translation-at-a-time feature. i.e. you select some entries (or all) and have a large window with all the texts (well, timeout might then be a problem...if you need to long to type).

Well... Sichae and XChrisX helped me a lot with this, so I have to mention that properly Wink thanks guys!

http://dragonprime.net/users/Nightborn/translationwizard.zip
« Last Edit: August 30, 2005, 09:19:55 AM by Nightborn » Logged
Antic
Guest
« Reply #1 on: August 30, 2005, 09:49:38 AM »

If you hit on the navigator without enable SU_IS_TRANSLATOR you will die  Roll Eyes
Logged
Nightborn
Guest
« Reply #2 on: August 30, 2005, 09:54:02 AM »

Code:
   check_su_access(SU_IS_TRANSLATOR);

you mean I have to include this to the hooks?

done so. Smiley
Logged
Antic
Guest
« Reply #3 on: August 30, 2005, 10:42:39 AM »

Code:
check_su_access(SU_IS_TRANSLATOR);

you mean I have to include this to the hooks?

done so. Smiley

Better you display the navigator only for SU_IS_TRANSLATOR enabled users or remove the check. Anyone will hit this navigator, thats sure!
Logged
Nightborn
Guest
« Reply #4 on: August 30, 2005, 10:45:36 AM »

I added an if to the hooks, only if SU_IS_TRANSLATOR is true the nav will be displayed...
Logged
Nightborn
Guest
« Reply #5 on: August 30, 2005, 12:40:26 PM »

Ooookay. Version 1.03

I did quite something.

1. the intext windows are now readonly... so nobody is able to change the text in there accidentally

2. multi-boxed mass translations are in place... if you leave a space empty, this entry will not be removed in the untranslated, like it should be. you can just check all the translations you want to do, then click a button and get a long (depends on how many you want to do) list. beware of the server timeout!

3. setting to block the current untranslated.php since this module fully includes all functions

okay....

please report bugs immediately if you encounter them Smiley

V1.03


http://dragonprime.net/users/Nightborn/translationwizard.zip
« Last Edit: August 30, 2005, 01:24:01 PM by Nightborn » Logged
Nightborn
Guest
« Reply #6 on: August 31, 2005, 01:27:47 AM »

V 1.04 minor bug squashed where some buttons weren't displayed after a manual edit/save of a single entry
v 1.05 squashed two mayor ones, I forgot two httppost Shocked


http://dragonprime.net/users/Nightborn/translationwizard.zip

please download again!
« Last Edit: August 31, 2005, 02:00:55 AM by Nightborn » Logged
Nightborn
Guest
« Reply #7 on: August 31, 2005, 06:02:43 AM »

I changed the structure a bit (it reminded me of 0.97 code) and added some comments to explain what's happening.

V1.06 now

http://dragonprime.net/users/Nightborn/translationwizard.zip
Logged
Nightborn
Guest
« Reply #8 on: August 31, 2005, 08:24:38 AM »

V 1.07 now

you may now choose what tlschema ist uses for its own buttons and texts (due to most text is the same as in untranslated.php.

same url

ideas and criticism as well as bug reports welcome.
Logged
Nightborn
Guest
« Reply #9 on: September 03, 2005, 03:24:48 AM »

Well...

I added the function "truncate untranslated table" just to clear the entire table... and the wizard automatically clears already translated items from the untranslated as it starts (translation tool does that already, but I as I still found some double entries in my tables I added this one).

Now here is a problem. I wanted to remove in my translations table duplicate entries... well... 10.000 records are a bit of work... and the sql statement needed too much time. I think I won't implement this function, because it nearly shot my sql database right now.
I originally planned to list all the duplicate entries, you can check which one you like and so on.
BUT
I discovered in my database 480. That would take SOME time to fix them all.

I think the possible way would be to make it step by step...just because of the large amount of time...and I hope it won't happen that often that you have duplicate entries that much in your database. (I inserted some at a time, I guess many are because in this insert - the german translations for 1.0.3 - there were some duplicates) I would ponder about the following:

Create for, let's say, 5 (or so) pulldown option fields. the program should let you take a look at intext-outtext to decide which one you will keep. the rest is deleted.

That's what I thought. My main problem is the server time and the complexity of the sql querys...they might hunt your database down.

if you want to get a small glimpse, execute the following query:

Code:
SELECT count( * ) AS counter, min( tid ) AS tid, intext, uri, language
FROM `translations`
GROUP BY intext, uri, language
HAVING counter >1;

and take a look if there are duplicates
« Last Edit: September 03, 2005, 03:28:22 AM by Nightborn » Logged
Nightborn
Guest
« Reply #10 on: September 03, 2005, 07:00:28 AM »

v1.08 added "truncate untranslated table"
v1.09 added an option to delete all entries in untranslated that occurr with namespace,language,intext exactly in untranslated (just to make sure...) (if this would be done automatically, it would just cost valuable server time)
v1.10 mayor increase in code: added "delete duplicate entries" which selects entries who occurr more than once in your translations table (due to an error or a wrong insert) the sql query take a second or so... but may take very long if you have a few thousand rows to fix... I hope the code is okay, it was quite a bit of work.


Well, just to make sure for you admins who might use this tool:

Be cautious!!!

This one uses a lot of sql queries. I tried to check for possible bugs, but that is no guarantee at all. BACKUP your translation table before using the new features, if the mod hits your table and it's gone, don't say I haven't warned you!

Though there should be no problems (I doublechecked the delete statements) nothing is for sure.

Criticism, bugreports and corrections  (especially for the sql-statements and the speed of the code) are very welcome
Logged
Nightborn
Guest
« Reply #11 on: September 04, 2005, 07:43:51 AM »

Now V1.11

added the options to delete checked rows as well as to delete a  single row via one click.

moved the truncate option to a nav (now with verification)

minor corrections to send over the namespaces.

Link above
Logged
Nightborn
Guest
« Reply #12 on: September 04, 2005, 08:12:58 AM »

there is some bug with the tool and the edit multiple function...I am checking that.

should be fixed now... but be careful too (still testing it)
« Last Edit: September 04, 2005, 09:10:49 AM by Nightborn » Logged
Nightborn
Guest
« Reply #13 on: September 04, 2005, 09:16:05 AM »

Just for everyone:

Please download the module again if you want to test it.

I think it will now correctly delete and insert everything.
Logged
theKlaus
Member
Militia
**
Offline Offline

Posts: 35



View Profile WWW
« Reply #14 on: September 04, 2005, 10:39:18 AM »

674 duplicate rows out of 13900 deleted Smiley

Looks pretty good but if i find some bugs i will tell it to you.

Thanks for the mod.
Logged
Pages: [1] 2 3 ... 33   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Version 1.1.2 is the current supported version and is available for download.

Support Us
No funds raised yet this year
Your help is greatly appreciated!
Recent Topics
DragonPrime LoGD
Who's Online
44 Guests, 0 Users
Home Forums News Downloads Login Register Advanced Search