Author Topic: Patches  (Read 2171 times)

MirceaKitsune

  • Technician
  • ****
  • Posts: 147
    • View Profile
Patches
« on: 7 December 2009, 23:40:51 »
Seeing the Sourceforge page for GAE doesn't allow Bugs / Features / Patches any more (it says "the tracker has been disabled for this project") I thought about making a topic for posting patches here. I'm not good with coding in C++ but am currently maintaining the Romanian language file, so this is one thing I'll be updating when a change to the menu is made.

It's what my first patch is about, I added the new FogOfWar to the Romanian language file (Edit: Also added Category for the Scenario menu). Patch can be found over here. Just in case, I'm posting it as code here given the patch is small.

Code: [Select]
Index: gae/data/lang/ro.lng
===================================================================
--- gae/data/lang/ro.lng (revision 390)
+++ gae/data/lang/ro.lng (working copy)
@@ -47,6 +47,7 @@
 CanRepair=Poate repara
 Cancel=Anulare
 Canceled=Anulat
+Category=Categorie
 ChatAudienceAll=Audienta chat: Toti jucatorii
 ChatAudienceTeam=Audienta chat: Echipa
 ChatAudienceToggle=Schimbare audienta chat
@@ -91,6 +92,7 @@
 Fastest=foarte rapid
 Fields=Campuri
 Filter=Filtrare
+FogOfWar=Ceata Razboiului
 FreeCamera=Camera Libera
 FxVolume=Volum Sunete
 GameCamera=Camera joc

Btw - if this can become a common place for posting patches, maybe a mod should make it Sticky, seeing there's no tracker for patches any more.
« Last Edit: 7 December 2009, 23:51:38 by MirceaKitsune »

Yggdrasil

  • Local Moderator
  • Ornithopter
  • ********
  • Posts: 408
    • View Profile
Re: Patches
« Reply #1 on: 8 December 2009, 13:31:31 »
They probably closed all Trackers in favor of the ticket system in Trac.

http://sourceforge.net/apps/trac/glestae/

Just report your patch as a ticket there, maybe using type defect because you fixed a bug.

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Patches
« Reply #2 on: 9 December 2009, 00:47:54 »
They probably closed all Trackers in favor of the ticket system in Trac.

http://sourceforge.net/apps/trac/glestae/

Just report your patch as a ticket there, maybe using type defect because you fixed a bug.

Indeed, I like tickets.  I believe when you create a ticket (even anon users) you can set the 'target milestone', while I wouldn't really want people setting this on bugs or enhancements, I also don't mind, once they're posted only myself, Hailstone and Daniel can change those fields, and in the case of someone making a major feature request and setting the milestone, we probably will!  However, small patches you should feel free to set the milestone (to the next one available), that way we can't possibly miss it, we don't have to look at three different 'artifact' pages (bugs/features/patches) any more, everything is tickets.

I'll add some more ticket categories today, including 'patch' :)

It's what my first patch is about, I added the new FogOfWar to the Romanian language file (Edit: Also added Category for the Scenario menu). Patch can be found over here. Just in case, I'm posting it as code here given the patch is small.

Thanks again MirceaKitsune, our Romanian lang file will now be more up to date than the English one! I guess that makes Romanian our reference language for the moment ;)
Glest Advanced Engine - Code Monkey

Timeline | Downloads

MirceaKitsune

  • Technician
  • ****
  • Posts: 147
    • View Profile
Re: Patches
« Reply #3 on: 11 December 2009, 00:29:12 »
Hehe, glad I could help :) I didn't know about the ticket system when I made this topic, I'll use that from now one.

Omega

  • MegaGlest Team
  • Dragon
  • ********
  • Posts: 6,167
  • Professional bug writer
    • View Profile
    • Personal site
Re: Patches
« Reply #4 on: 13 December 2009, 03:32:37 »
Speaking of which, why is the english lang file so far behind? I can't use GAE at the time, but last I remember (0.2.12a) the english lang file was missing a lot and it TOTALLY EFFING screwed up my vanilla glest (and since that's all I can use for the time being, I'm a bit pissed there).

On the patches topic, have you guys fixed the  triple question mark thing where if a string cannot be found in the language file, it posts the name of the string with three question marks before and after. The question marks should be removed, which is VITAL for scenarios and very good for everything else since many language files are incomplete and the question marks are GOD UGLY! Removing it is simple enough that you won't need c++ experience to do so. Either have it return just s, without the ?'s (messy, but easiest), have it check for a debugging variable so that the ?'s appear when testing (via an if statement in that block), or completely remove the block and do not have it return the ?'s when it cannot find the string in the lang file.

I see no reason not to remove it and I'm sure others agree.
Edit the MegaGlest wiki: http://docs.megaglest.org/

My personal projects: http://github.com/KatrinaHoffert

daniel.santos

  • Guest
Re: Patches
« Reply #5 on: 13 December 2009, 12:56:01 »
We have no plans to remove them what so ever, they serve a very important purpose -- to let you know that you're missing a language string.  If you have an incomplete language file, populate it with the missing strings like this:
SomeMissingString=SomeMissingString
EatPie=EatPie

or copy the strings from the English language file.  I suppose I don't see a problem with *optionally* disabling them, but they exist to let you know that your language file is out of date and GAE is in an alpha state right now.  The best solution, of course, is to translate them and send us the patch! :)

hailstone

  • Local Moderator
  • Battle Machine
  • ********
  • Posts: 1,568
    • View Profile
Re: Patches
« Reply #6 on: 13 December 2009, 23:36:58 »
For scenarios you might require dynamic text (eg timestamp, player's name, etc) which might not have a translation string so I think there needs to be more thought on how scenarios could be internationalised. For static text I agree with Daniel.
Glest Advanced Engine - Admin/Programmer
https://sourceforge.net/projects/glestae/

silnarm

  • Local Moderator
  • Behemoth
  • ********
  • Posts: 1,373
    • View Profile
Re: Patches
« Reply #7 on: 14 December 2009, 09:44:16 »
Somewhat off topic, but that's seems to be our speciality ;)

I agree with Daniel, the question marks are there for a reason, if they bother you so much, then they are doing just what they were meant to do  :P

Hailstone does of course raise a very valid point, I think a two pronged attack is in order...

1. HUD displays, we add the ability to specify one or more 'HUD counters', with a text description pulled from the lang file, which can then have a number (dynamically set) displayed next to it.  This provides a mechanism to display some sort of 'score' or a countdown timer, or other things of that nature.
Code: [Select]
-- eg...
registerHUD("Score", "top-centre");
-- ...
setHUD("Score", 0);
--...
score = score + 10;
setHUD("Score", score)

2. For using the player's name we could add 'variables' in the lang strings... I'm not actually sure this is a good idea though... might get messy.  In essence, lang strings could have '$1' or some such in them, then in Lua this could be set (possibly in the showMessage() call).

Code: [Select]
-- in the lang file...
hello=Greetings $1, welcome to such-and-such a scenario.

-- in Lua
showMessage("hello", "header", playerName(0))

Of course different languages have different grammars, for a simple use like the above this would be fine, if someone tried to get to clever with this, they could easily render their scenario untranslatable (or make it very difficult).
Glest Advanced Engine - Code Monkey

Timeline | Downloads

 

anything