DragonPrime - LoGD Resource Community
Welcome Guest
  • Good afternoon, Guest.
    Please log in, or register.
  • July 15, 2018, 04:22:58 PM
Home Forums News Downloads Login Register Advanced Search
* * *
DragonPrime Menu
Login
 
 
Resource Pages
Search

Pages: [1] 2 3 4   Go Down
  Print  
Author Topic: things for the DP Core  (Read 23313 times)
0 Members and 1 Guest are viewing this topic.
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« on: November 23, 2005, 02:53:23 AM »

well, I think most of us agree that developement to the core release should still take place after the end of the year.  So, here are a list of things that could be implemented (in no particular order), any one have more to add?

1.  Torne's Translation Taunt fix - Done with 1.1.0
2.  option to disable translation - Done with 1.1.0
3.  setting to disable/set commentary limit - Setting to disable in 1.1.1
4.  redo preferences page to look like module manager (listing on left)
5.  dragon point spending work that Kendaer did (may be in the 1.0.6 release)
6. game log viewer. - Done with 1.1.0
7.  more access restrictions/logging such as
8.  save last few IP addresses of players/better multiple tracking/prevention (topic)
9.  option for Nightborn's commentary direction here
10.  Hooks to modify online player list (list.php).
11.  Tal's enhanced player gifts here - Separate download, will be in 'recommended core modules'.
12.  DK point viewer/editor.
13.  fix navs also clears specialinc. - see Kalazaar's module - Done with 1.1.0
14.  option to disable MoTD commentary
15.  Clan member limit and clan admin approval options/settings
16.  Get rid of Redundancy in clan.php Done in v1.1.1
17. Sichae's about.php patch
18.  XchrisX's golinda
19.  Catcradler's Incompatible key
20. Nightborn's cached translation Done in v1.1.1
21. option to disable polygamy
22. Registration date field in accounts table. - Done with 1.1.0
« Last Edit: January 06, 2007, 12:28:42 AM by XChrisX » Logged

XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #1 on: November 23, 2005, 03:03:17 AM »

torne's translation fix for taunts breaks thing for multi-language servers... This is more or less a hack, not a fix Wink

EDIT: The best fix would be to return the news scheme to what it has been before the last change.
« Last Edit: November 23, 2005, 03:06:47 AM by XChrisX » Logged

Running for more than three years now:
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« Reply #2 on: November 23, 2005, 03:07:03 AM »

well, from what I just read in the thread, he found a way to not break it.
Logged

XChrisX
Global Moderator
Mod God
*****
Offline Offline

Posts: 4647

Be aware of the squirrel!


View Profile WWW
« Reply #3 on: November 23, 2005, 03:08:50 AM »

No, as far as I understood, he translates the taunts into the language of the person causing the news, not the one reading it - what will result in conflicts on multi-language servers...

(I'm not sure if there is a single multi-language server out there... But that's another topic Wink )

ANOTHER EDIT: I didn't read about the last diff till now... We will have to see, if that works... Smiley If that works it would be nice...
« Last Edit: November 23, 2005, 03:11:12 AM by XChrisX » Logged

Running for more than three years now:
Nightborn
Guest
« Reply #4 on: November 23, 2005, 03:17:41 AM »

Smiley it's translated into the language the person reading has as a pref, I guess.

I've tested it a bit. It works fine Smiley

This should be included. (thanks god less spam to all the other schemas)
Logged
Torne
SVN Users
Codemeister
*
Offline Offline

Posts: 259


Code ninja


View Profile
« Reply #5 on: November 23, 2005, 03:19:16 AM »

I have a number more changes related to translation that may improve performance and reduce translation effort on single-language servers (configurable, so if anyone really does have a multilanguage server it won't break them), but they're not all quite fully tested yet. Will post them somewhere here when they're done. Also, several tweaks for people only interested in using translation in certain areas (e.g. not in superuser pages, or only in a few modules, etc).

I'm also experimenting with offering an alternative to the DB-based translation system that uses gettext; this should make translation run much faster at the cost of not easily being able to edit the translations via the web. (Tools could be provided which will convert between gettext message catalogs and the DB, so you could translate in the DB for convenience then when you thought you were done, dump it as a catalog for gettext to use). This will be a pretty big undertaking though and will want testing by as many people as possible before being included in any kind of release.
Logged
Arune
Member
Mod God
*****
Offline Offline

Posts: 718


Arune Vai - khatfield


View Profile WWW
« Reply #6 on: November 23, 2005, 07:03:19 AM »

Id be very interested in seeing your ideas
Logged
Kendaer
Guest
« Reply #7 on: November 23, 2005, 08:37:46 PM »

I did put the DP spending changes into the core.. After thinking about it a bit I believed them to be a bugfix rather than a new feature.

They've been active on dragoncat and lotgd.net for a while (though without any extra dkspend modules).

As for gettext() translations.  Torne, initally the translation code was done (in the 0.9.7 era) via an included file, much like various portal systems, and fundamentally very similar to gettext.  It had sufficient flaws and memory footprint problems that we went to the database method.  I cannot say you won't do better, but be advised it's been tried Smiley  However, I'm the first to admit that I'm a neophyte when it comes to i18n, so.... Smiley
Logged
Torne
SVN Users
Codemeister
*
Offline Offline

Posts: 259


Code ninja


View Profile
« Reply #8 on: November 24, 2005, 03:49:34 AM »

gettext doesn't ever load whole files, so there shouldn't be a memory issue. It is fundamentally different from loading all translations into PHP from an included file, even though the input files look the same - it performs some caching itself but primarily depends on the OS's buffer cache and just rereads files whenever it feels like it. It would never usually store the entire contents of a message catalog in RAM. I've experimented with using it in PHP (outside LotGD, just in standalone code) and it is very fast indeed, even with very large message catalog files.

The PHP extension providing gettext is just a very thin wrapper around the libc gettext functionality, and doesn't do anything stupid Wink

One trick I discovered while looking into all this which I'd not come across before, and I don't know if the LotGD community are aware of - PHP since 4.0.6 supports numbered parameters in sprintf which allows translators to swap the order of multiple %s substitutions in a single string without modifying the source code. You can take the following code:
Code:
sprintf_translate("In my language we say %s before %s", "first", "second");
and then add a translation entry which replaces the format string with this:
Code:
"In my language we say %2\$s before %1\$s"
and it will output "In my language we say second before first". This requires absolutely no changes to the LotGD code, as output arrays are always ultimately passed through sprintf. If people already knew this, then sorry, but it's news to me Wink

Logged
Kendaer
Guest
« Reply #9 on: November 24, 2005, 12:53:15 PM »

The one additional issue with gettext might be it's support on non-unix platforms Smiley

I have no idea how prevalent libgettext is Smiley
Again, I'm just saying why we didn't go that route.  I'm *not* sayin you shouldn't or that the game shouldn't in the future.

As for the numbered args, yes, Eric and I knew about it, and assumed others would as well.
Logged
Torne
SVN Users
Codemeister
*
Offline Offline

Posts: 259


Code ninja


View Profile
« Reply #10 on: November 24, 2005, 01:27:58 PM »

The one additional issue with gettext might be it's support on non-unix platforms Smiley

I have no idea how prevalent libgettext is Smiley
There is that. Almost all unix PHPs should have the gettext extension as I believe it's compiled by default there (as gettext can usually be assumed to be present, it's often in libc). I've not used PHP on Windows so can't guess - if anyone has an easyphp/similar install and wants to tell me if it has the gettext extension, that'd be interesting.

Quote
As for the numbered args, yes, Eric and I knew about it, and assumed others would as well.
I've not seen it mentioned anywhere on here, was all - it's non-obvious unless you have actually had reason to read the php manual's description of sprintf, since printf's in other languages don't have that feature.
Logged
Kendaer
Guest
« Reply #11 on: November 24, 2005, 01:45:45 PM »

I've not seen it mentioned anywhere on here, was all - it's non-obvious unless you have actually had reason to read the php manual's description of sprintf, since printf's in other languages don't have that feature.

Well, remember that I'm a firm believer that *everyone* should RTFM Wink  Sometimes I forget that other people forget that there is an FM to R.
Logged
Torne
SVN Users
Codemeister
*
Offline Offline

Posts: 259


Code ninja


View Profile
« Reply #12 on: November 24, 2005, 01:55:24 PM »

True, but I've been coding in PHP for quite some time and had never read the documentation for sprintf before the other day. I used it like sprintf in every other language, it worked, I was happy. If something had broken I would've checked, but I had no reason to discover the new feature in advance Wink
Logged
sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« Reply #13 on: January 03, 2006, 03:14:28 AM »

just bumping this so it's easier for me to find later.
Logged

sixf00t4
Mod God
*****
Offline Offline

Posts: 1916



View Profile WWW
« Reply #14 on: April 18, 2006, 07:38:09 PM »

I don't run 1.1.0 yet, but I slashed out the ones that i know are resolved with it.  any other ones that can be scratched off the list?
Logged

Pages: [1] 2 3 4   Go Up
  Print  
 
Jump to:  


*
DragonPrime Notices
Please take the time to read the FAQ and browse the DragonPedia

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