Log for #openttdcoop.devzone on 24th February 2013:
Times are UTC Toggle Colours
00:23:22  <Brot6> Progressive Train Set - Revision 12:5313a3a154a2: [Feature] Add E07 - Imagine Millennial XMinchinWebX @
00:43:41  <Brot6> DACH Trains - Support #5159 (New): DACH Narrow Gauge Tracking Table XSwissfan91X @
01:12:20  *** Supercheese has joined #openttdcoop.devzone
06:02:30  <Brot6> Progressive Train Set - Revision 13:1d78d1a1ba1e: [Feature] Add M01 - Imagine X601 XMinchinWebX @
08:00:06  *** andythenorth has joined #openttdcoop.devzone
08:12:05  <Brot6> Webtranslator - Revision 88:bee2ac5801a1: Change: tweaks to lang page XandythenorthX @
08:12:54  *** andythenorth has quit IRC
08:35:11  *** ODM has joined #openttdcoop.devzone
09:00:36  *** Alberth has joined #openttdcoop.devzone
09:22:49  *** Supercheese has quit IRC
10:23:52  <Brot6> DACH Trains - Revision 57:d458f7344d2c: reorganised spritesheets XYoshiX @
10:32:33  <Brot6> Webtranslator - Revision 89:d6f3b6e4cd47: Add: Dummy file to force creation of the 'projects' direct... XAlberthX @
10:47:21  <Brot6> Webtranslator - Revision 90:d65ef6e17a5b: Fix: Write cases after a ##case line, and switched to usin... XAlberthX @
10:55:59  *** frosch123 has joined #openttdcoop.devzone
10:56:06  <Alberth> quak
10:57:42  <frosch123> moin :)
10:58:12  <Rubidium> gcc 4.8 is going to be a bitch for NewGRF development, especially with NFOrenum
10:58:56  <Rubidium> the preprocessor adds all kinds of copyright garbage at the top of the preprocessed file
10:59:32  <Rubidium> in C comments, which NFOrenum can't handle, and effectively moving the 'header' from the first lines
11:05:06  <frosch123> sounds like yet another preprocessing step between cpp and nforenum :p
11:05:19  <frosch123> but doesn't it have some "traditional" option?
11:08:07  <Rubidium> -traditional doesn't seem to do the trick
11:26:38  <Brot6> Webtranslator - Feature #5162 (New): Unknown translation strings should not get dropped silently XAlberthX @
11:56:39  *** andythenorth has joined #openttdcoop.devzone
12:47:47  *** frosch123 has quit IRC
12:56:12  *** frosch123 has joined #openttdcoop.devzone
12:57:52  *** andythenorth has joined #openttdcoop.devzone
13:24:30  <Brot6> Webtranslator - Revision 91:075593dd502b: Add: Ignore generated documentation as well. XAlberthX @
13:24:30  <Brot6> Webtranslator - Revision 92:363f51b810ae: Feature: Generate a page with a random string to fix. XAlberthX @
13:28:20  <Alberth> hmm, next problem: "ok" is not so much information after you translated a string :)
13:33:58  <andythenorth> something I can help with?
13:34:06  <andythenorth> [in between making wooden train tracks]
13:37:05  <andythenorth> Alberth: ^
13:37:06  <andythenorth> also, in the lang page, is it obvious you can click project name in h1?
13:38:27  <Alberth> the above generator links from the project page directly to the string page
13:38:49  <Alberth> unless there are no strings left, then it dumps you onto the language overview page
13:39:22  <Alberth> so in that respect, it may be useful to make the language overview complete with all string texts
13:40:09  <Alberth> also, some back-links seem to be missing, ie from a string edit back to the project, or to "give me a different string" :p
13:46:38  <Alberth> imo, it makes sense to add an explicit list of links somewhere at every page
13:46:54  <Alberth> perhaps also add the 'download' link to the project page?
13:48:32  <andythenorth> probably
13:48:50  <andythenorth> there might be a common set of sub-navigation links for a project / lang
13:49:01  <andythenorth> I'll see when I use it a bit more
13:49:20  <andythenorth> certainly makes sense to add 'download' in the list of languages on project overview page
13:49:56  <Alberth> any ideas what to do after 'submit' of a string?
13:50:22  <andythenorth> either redisplay same, with a '?message=some text'
13:50:23  <Alberth> I now just find out what case you have, and add the change, but it should verify correctness
13:50:26  <andythenorth> or go to next string?
13:50:43  <Alberth> if wrong, display the errors and go back?
13:50:50  <andythenorth> yes
13:51:04  <andythenorth> for string, I'd always reload same page on save
13:51:11  <andythenorth> showing either success or failure
13:51:22  <andythenorth> I might add a message class param to query string
13:51:35  <andythenorth> so we can show red / green / blue / yellow according to type of message
13:51:48  <Alberth> but 'errors' can be a list
13:52:05  <andythenorth> best to show those inline on the form if possible
13:52:06  <Alberth> a list of strings
13:52:23  <andythenorth> I can probably figure that out
13:52:47  <andythenorth> might add a utility method for pushing system messages
13:53:16  <Alberth> shuffle the python code in string edit might also do the trick
13:53:54  <Alberth> ie make a template with "errors" as additional parameter
13:54:02  <andythenorth> yes
13:54:06  <andythenorth> that's a common pattern
13:54:21  <andythenorth> this is orthogonal to the system messaging upgrade I'm considering :)
13:54:23  <Alberth> k, let's try that
13:54:51  <Alberth> any preferences?
13:54:53  <andythenorth> typically append a css class to each form element that has errors
13:55:02  <andythenorth> bootstrap has built in error styles we can use
13:55:07  <andythenorth> make sense?
13:56:24  <andythenorth> have a look at 'Validation States' here
13:56:25  <Webster> Title: Base ยท Bootstrap (at
13:56:59  <andythenorth> oh
13:57:07  <andythenorth> I haven't bootstrapped string edit yet :)
13:57:13  <andythenorth> oops
13:57:48  <Alberth> ah, webtranslator.pages.string_edit.Translation class already has errors
13:59:18  <andythenorth> yes
13:59:24  <andythenorth> we just need to render them
13:59:33  <andythenorth> you stayed ahead of yourself there :)
13:59:37  *** LordAro has joined #openttdcoop.devzone
13:59:56  <Alberth> it's filled only for the first string
14:00:00  <Alberth> hi LordAro
14:00:20  <LordAro> heyo Alberth (you did it in this channel again :P )
14:01:00  <Alberth> perhaps this channel is more interesting than some other channel :)
14:03:51  <LordAro> maybe some other channel would be more interesting if someone did some updates :P
14:06:59  <andythenorth> Alberth: in string/project/blah - 'reset all strings' button - intended purpose of that?
14:07:51  <Alberth> revert all edits
14:08:12  <Alberth> in particular when you have several cases of a string
14:08:48  <Alberth> I'd be happy with reverting just one case, but that does not seem possible
14:09:25  <Alberth> at least, not in a simple way, I imagine
14:10:15  <andythenorth> I am not understanding the flow of this yet :)
14:10:18  <andythenorth> I'd better read the code
14:11:30  <andythenorth> so the string_form can render multiple instances of same string?
14:11:31  <Alberth> revert doesn't do anything in the code afaik
14:11:49  <andythenorth> there is the possibility that a lang file has duplicate entries?
14:12:15  <Alberth> yeah, if you have 5 cases in a language, you can have 5 strings, one for each case
14:12:44  <Alberth> you should not get duplicates, as the case is appended to the string name
14:12:59  <andythenorth> ah
14:13:01  <andythenorth> cases :P
14:13:03  <andythenorth> I se
14:13:05  <andythenorth> see *
14:16:15  <Alberth>
14:16:35  <Alberth> even you have cases :p
14:18:11  <andythenorth> :P
14:27:41  <andythenorth> Alberth: for string_edit, repeating the submit/reset button seems overkill?
14:27:46  <andythenorth> just one set at bottom of form?
14:27:56  <Brot6> Webtranslator - Revision 93:02323e652c42: Change: improve heading section of string_edit XandythenorthX @
14:28:35  <Alberth> somewhat, until you load russian:   russian.lng:##case m f n p nom gen dat acc abl pre     :)
14:28:46  <Alberth> often some strings are empty
14:29:50  <andythenorth> oh yes
14:29:56  <andythenorth> I have FIRS russion to test with :P
14:30:07  <Alberth> I also wonder whether the default case should have a Gender dropdown instead of a {G=...} prefix
14:30:35  <andythenorth> I don't really understand the issue, but it sounds possible ;)
14:32:55  <Alberth> with {G=m}...    you state the gender of the string
14:32:55  <Alberth> that may only be done with the default case
14:32:55  <Alberth> in the current WT, there is a dropdown for that
14:34:05  <andythenorth> sounds like a good idea
14:34:09  <andythenorth> how many genders are there?
14:34:12  <andythenorth> 3?
14:34:24  <Alberth> depends on the language :)
14:37:29  <Alberth> lng.gender has the list
14:37:40  <Alberth> possibly empty if there are no genders
14:40:49  <andythenorth> Alberth: string edit view - is it necessary to show the string name in header?  (it's also shown in form, almost immediately belwo)
14:44:17  <Alberth> edit to whatever you prefer, I didn't really think about most of it
14:44:37  <andythenorth> k
14:44:48  <andythenorth> just making sure I don't remove things that had thought put into them ;)
14:45:16  <Alberth> :)
16:15:02  <Alberth> andythenorth: can I add a message to a template?
16:17:01  <andythenorth> yes
16:17:04  <andythenorth> what's the context?
16:19:08  <Alberth> after you submitted a string, it may be found to be wrong, so you get thrown back to the same page, with updated strings, state, and errors
16:19:41  <Alberth> a message "you should fix more here" would be nice :)
16:19:51  <andythenorth> ?message=There were errors
16:19:58  <andythenorth> just stick that on the query string to test it
16:20:48  <andythenorth> incidentally bottle template language *seems* to protect against injection attacks there
16:20:54  <andythenorth> otherwise it's a wide-open vulnerability :)
16:20:55  <Alberth> yeah, but how here?
16:20:55  <Alberth>     return template('string_form', proj_name = proj_name, pdata = pdata,
16:20:55  <Alberth>                     lname = lname, sname = sname, tcs = transl_cases)
16:21:08  <andythenorth> hmm
16:21:09  <andythenorth> interesting
16:21:30  <andythenorth> I am now definitely thinking make message utility methods
16:21:35  <andythenorth> pack and unpack messages
16:21:45  <andythenorth> pass as query, or as params to the template
16:22:02  <Alberth> I have no problems with adding message = message there
16:22:19  <andythenorth> in Zope, you can acutally do response.query and pack them on there
16:22:28  <andythenorth> as part of the response object
16:22:35  <andythenorth> but I always found it weird and dirty
16:22:57  <Alberth> at first sight I tend to agree with that :)
16:23:28  <Alberth> well, I'll first test the changes without such a message, so I can commit it
16:23:41  <Alberth> but I need to do other things first
16:25:42  * Alberth afk
16:25:49  <andythenorth> I can probably figure messages out later
16:40:14  <Brot6> Webtranslator - Revision 94:7d1cf771d8aa: Codechange: move message unpacking to a utility method XandythenorthX @
17:01:43  <Brot6> Webtranslator - Revision 95:d187e5d66a81: Change: refactor message handling and add capability to se... XandythenorthX @
17:02:38  <andythenorth> Alberth: it's not quite done yet, but you could patch get_messages in
17:02:44  <andythenorth> to pull messages from the template
17:02:49  <andythenorth> don't know how they're passed yet
17:04:23  <Alberth> ok, I need some food first :)
17:06:18  <Brot6> Webtranslator - Revision 96:ad1e39a76473: Change: main_template will now render an arbitrary number ... XandythenorthX @
17:11:44  <Brot6> Webtranslator - Revision 97:00ffaf073d90: Codechange: comment get_messages a bit XandythenorthX @
17:18:24  <Brot6> progressivetrains: update from r11 to r13 done (24 warnings) -
17:20:16  <Brot6> fish: update from r1001 to r1003 done (3 warnings) -
17:27:43  <andythenorth> Alberth: this is dirty but
17:27:44  <andythenorth> %from webtranslate.bottle import url, request
17:27:44  <andythenorth> %request.query['message'] = 'foo'
17:27:48  <andythenorth> works in a template
17:27:55  <andythenorth> and will likely work in a class too, amended suitably
17:28:07  <andythenorth> I have been trying to pass tmpl_message = 'foo'
17:28:26  <andythenorth> but that fails
17:28:38  <andythenorth> can't figure out how to handle the case that tmpl_message doesn't exist in the template scope
17:29:07  <andythenorth> which causes python to blow up with a NameError
17:29:17  <andythenorth> having to always pass tmpl_message seems lame
17:50:06  <andythenorth> hmm
17:50:25  <andythenorth> redirect might well clear the request, interesting
17:53:19  <andythenorth> however if simply returning a template, the following works fine: request.query['message'] = 'blah'
17:55:36  <andythenorth> I suggest creating utils.set_message(message, class='')
17:55:56  <andythenorth> as an abstraction, then push onto request.query in that method
17:56:03  <andythenorth> and if it turns out to be wrong, we can fix it later in one place
17:56:14  <andythenorth> biab, bathtime
18:41:53  <Alberth> I see
18:45:26  <Alberth> On second thought, I'd make a new template function instead of 'set_message'
18:54:14  <andythenorth> Alberth: that makes sense too
18:54:27  <andythenorth> I haven't really got my head around bottle's layout yet, so I'm guessing things
18:54:54  <andythenorth> "There should be one-- and preferably only one --obvious way to do it."
18:55:06  <andythenorth> ^ doesn't always apply in python web frameworks :P
18:55:13  <andythenorth> hmm
18:55:18  <andythenorth> next line though is "Although that way may not be obvious at first unless you're Dutch."
18:55:29  <andythenorth> know any Dutch people? :O
18:56:26  <Alberth> seems dangerous to answer that question :)
18:56:57  <andythenorth> so I might leave the message stuff to you for now
18:57:10  <andythenorth> I couldn't figure out how to arbitrate the case when there's a query string message and a template message
18:57:19  <andythenorth> so I made it capable of rendering n messages :P
18:57:42  <Alberth> :)
18:58:44  <Alberth> ok, I'll have a go at it when I reach that point
18:58:55  <Alberth> we can always hack bottle instead :p
18:59:13  <andythenorth> does that create a maintenance headache? o_O
18:59:41  <Alberth> yeah, that's a disadvantage indeed
18:59:50  <Alberth> unless you inject it upstream :p
19:00:04  <Alberth> but that's more work :)
19:01:10  <andythenorth> shouldn't be necessary to hack it :D
19:01:24  <andythenorth> I think putting on the request is probably safe enough :P
19:03:32  <Brot6> Webtranslator - Revision 98:fd20d84280f5: Change: make the Upload button large in upload_language, n... XandythenorthX @
19:03:40  <andythenorth> hmm
19:03:48  <andythenorth> there are some variances in case in project name handling
19:04:26  <andythenorth> by any chance are there props for both title (mixed case) and an identifier (lower case)
19:04:28  <andythenorth> ?
19:05:36  <andythenorth> ah
19:05:54  <andythenorth> in context of upload_language, project name is taken from the route, not looked up?
19:06:51  <andythenorth> hmm
19:06:54  <andythenorth> print is now print()
19:11:40  <Brot6> Webtranslator - Revision 99:01987f3cf3d4: Change: upload_language uses in template in... XandythenorthX @
19:13:27  <Alberth> yes there are two versions of project name
19:36:47  <Brot6> Webtranslator - Revision 100:8ef87af14534: Change: adjust use of icons, improve header of upload_lan... XandythenorthX @
19:38:04  <Alberth> andythenorth: do you understand the issue raised by Hyronymus? : Instad of "Nieuwe Metaalwerkplaats [...]" it reads Nieuwe "Old roofs Front [...]". Running 0.9.3 and nightly r25039.
19:38:10  <andythenorth> nope
19:38:13  <andythenorth> makes no sense
19:38:19  <andythenorth> those strings don't show up in FIRS
19:38:29  <andythenorth> nor do I remember them in TTD
19:40:26  <Alberth> Oh, it's a news message
19:40:27  <Brot6> Webtranslator - Revision 101:c54c76f34bcf: Change: make icon use for lang a little more consistent XandythenorthX @
19:41:40  <Alberth> which would imply the industry-type name is wrong
19:44:53  <andythenorth> plausible
19:54:20  <andythenorth> how long should a string field be?
19:54:26  <andythenorth> textarea, or single line input?
19:54:29  <andythenorth> probably textarea
19:58:41  <Alberth> definitely textarea
20:00:22  <andythenorth> yup
20:00:50  <Alberth> should I add that report from Hyronymus somewhere?
20:03:23  <andythenorth> oh please :)
20:03:24  <andythenorth> thankyou
20:03:48  <Brot6> Webtranslator - Revision 102:33ca2eed3325: Change: slightly improve string edit page XandythenorthX @
20:03:53  <andythenorth> Alberth: have a quick look at string edit now
20:04:03  <andythenorth> preferably in FIRS russian :P
20:07:25  <Alberth> the language page is very pretty :)
20:09:01  <Alberth> string edit is slow as hell, but perhaps it's because I am running a compile in another window :)
20:09:27  <Alberth> no, it's just slow :(
20:09:31  <andythenorth> really?
20:09:32  <andythenorth> interesting
20:10:41  <Alberth> in konqueror, at least
20:11:22  <Alberth> shouldn't the various pieces of text be more separated?
20:11:40  <andythenorth> yes
20:11:42  <andythenorth> it's a hack right now
20:11:51  <andythenorth> what does it look like for you (screenie?)
20:13:40  <Alberth>
20:14:00  <Alberth> it looks like it redraws everything on every move
20:17:17  <andythenorth> interesting
20:17:23  <andythenorth> there's no javascript running there
20:17:28  <andythenorth> only standard css stuff
20:23:32  *** Supercheese has joined #openttdcoop.devzone
20:47:59  *** ODM has quit IRC
21:58:25  <Brot6> Webtranslator - Revision 103:350485da4214: Change: remove unneeded <p> around form submit buttons fo... XandythenorthX @
21:59:20  <Alberth> perhaps my machine tries being smart in rendering them :(
21:59:27  <Alberth> good night andy
22:00:03  *** frosch123 has quit IRC
22:01:17  <andythenorth> bye Alberth
22:01:27  *** andythenorth has left #openttdcoop.devzone
22:01:30  *** Alberth has left #openttdcoop.devzone
22:27:20  *** Webster has joined #openttdcoop.devzone
22:43:05  <Brot6> Webtranslator - Revision 104:31daf166cf37: Change: improve string edit form styling quite a lot, inc... XandythenorthX @
23:06:11  *** LordAro has quit IRC

Powered by YARRSTE version: svn-trunk