Log for #openttdcoop.devzone on 25th May 2015:
Times are UTC Toggle Colours
05:47:41  *** Alberth has joined #openttdcoop.devzone
09:54:08  *** tycoondemon2 has quit IRC
09:58:04  *** tycoondemon has joined #openttdcoop.devzone
10:01:36  *** tycoondemon has quit IRC
10:02:06  *** tycoondemon has joined #openttdcoop.devzone
10:15:14  *** tycoondemon has quit IRC
10:19:10  *** tycoondemon has joined #openttdcoop.devzone
10:44:49  *** frosch123 has joined #openttdcoop.devzone
10:46:00  <Alberth> hihi, /me has patch queue for eints
10:46:29  <Alberth> 010 and 020 are bottle upgrades, don't know if you want them. I am fine with dropping them
10:47:31  <Alberth> implements splitting saved data into 'project' file, and one for each language, and only saving modified files
10:47:48  <Alberth> still doing xml though
10:56:10  <frosch123> haha, i like how the bottle upgrade changes the copyright from 2012 to 2013 :p
11:00:55  <frosch123> +    @note: the C{languages} field is not used in case of L{STORAGE_ONE_FILE}. <- 030: does not seem to reference anything existing
11:03:41  <Alberth> It was intended to reference the ProjectStorage field
11:04:13  <Alberth> can change it to L{ProjectStorage.languages} perhaps
11:06:36  <frosch123> 050 misses docs/manual/setup.rst :)
11:06:47  <frosch123> "storage-format" applies to new projects, right?
11:06:56  <Alberth> yes
11:11:36  <Alberth> the release of the newest bottle was in 2013 :)
11:12:44  <Alberth> (stable, at least)
11:18:30  <Alberth> I considered conversion, but it gets complicated with all the files
11:19:09  <Alberth> and I found no nice solution to 'delete language'
11:19:30  <frosch123> automatic conversion is not needed :)
11:19:36  <Alberth> as it auto-detects languages from the available files, you'd have to delete the files of the language
11:19:40  <frosch123> i wonder whether small projects work better with a single file
11:20:02  <frosch123> so, later one might try to use one/multiple files depending on the size of the base language
11:20:10  <frosch123> but, later :)
11:20:50  <frosch123> i don't think the current eints setup supports deleting anyway :p
11:20:59  <frosch123> on push we upload all lang files
11:21:11  <Alberth> haha :)
11:21:14  <frosch123> at the end of the day we download all again
11:21:28  <frosch123> and add "new" ones
11:22:36  <frosch123> in the one single case when supercheese wanted to change the base language from gb to us, i changed it in the repo, and then deleted the whole eints project :)
11:22:57  <frosch123> as in, stop eints, delete on disk, restart eints :p
11:23:14  <Alberth> yeah, it happens too rarely to bother automating it
11:24:02  <frosch123> enjoy the time we have less than 1000 projects :p
11:25:09  <Alberth> :o xussr already has 9 languages
11:27:12  <Alberth> although one translation has 8 strings :)
11:28:00  <frosch123> if you are looking for the language with the most projects, it's kroatian (not counting english)
11:29:18  <Alberth> the openttd project type I added doesn't seem complete either, I get 40-something invalid strings
11:29:49  <Alberth> so I must be missing something there
11:30:41  <Alberth> I was considering which current projects could benefit for split language string files, only xussr came to mind
11:31:26  <frosch123> 150 hunk 3 likes to be moved to 120 (rename iso to lang_name)
11:32:26  <frosch123> Alberth: "##id" mostly
11:32:55  <frosch123> and "#######" comments
11:33:50  <Alberth> I changed those (s/^##/# #/), and then had those invalid strings
11:35:43  <Alberth> probably the {} elements we deleted with game scripts?
11:39:07  <frosch123> what would happen if i moved "xussr.xml" to "xussr/project_data.xml"?
11:39:53  <frosch123> would it result in a valid and/or empty project?
11:42:09  <Alberth> you'd loose all languages
11:43:03  <Alberth> <language> tags get ignored on read, and are not elsewhere available
11:43:28  <Alberth> splitting isn't that simple, as currently the file shares texts
11:43:34  <frosch123> so, i could use that to force single projects to use the new format. reupload the languages, and only loose the history
11:44:03  <frosch123> so, devzone could stay "single file" as default, and we switch some projects
11:44:06  <Alberth> although you may get away with copying all texts to every language, as the loader doesn't care whether text is shared or not
11:44:12  <frosch123> say, those with > 200 strings
11:47:48  <frosch123> queue looks nice :)
11:48:05  <frosch123> i didn't see code dealing with updating all languages when uploading a new base language
11:48:08  <Alberth> I wonder if it wouldn't be easier to toggle the format, and force a write from within eints
11:48:11  <frosch123> but i might have missed it
11:48:53  <frosch123> Alberth: you mean some console tool? which imports some eints files, loads a language and saves it again?
11:49:02  <frosch123> i don't see a point in a web interface there
11:49:29  <Alberth> oh, console tool could work too
11:52:52  <Alberth>   manual updates for 050
11:56:45  <Alberth> base language update is  in webtranslate/pages/ lines 158-173, touched by patch 160
12:05:25  <frosch123> looks fine
12:16:52  <Alberth> good catch 150 hunk 3 :)
12:25:18  <Alberth> updated 030, 050, 120, 150, and the 'all' patches
12:27:00  <Alberth> ideas what to do next?
12:42:34  <frosch123> push?
12:42:38  <frosch123> test it on a vm
12:42:43  <frosch123> test it on devzone
12:44:05  <Alberth> I ran some small tests in the dev envioronment, more tests would be great
12:45:56  <Alberth> pushed
12:46:09  <DevZone> Project eints build #25-push: SUCCESS in 20 sec:
12:46:32  <Alberth> hmm, so very much non-impressive :p
12:51:38  <frosch123>  /usr/local/lib/python3.2/dist-packages/pyasn1/type/ ResourceWarning: unclosed <socket.socket object, fd=5, family=10, type=1, proto=6> <- those are new
12:54:46  <Alberth> oh, also with 3.2?  I thought it was a new thing with 3.4
12:54:54  <Alberth> but perhaps it's part of bottle
12:57:03  <Alberth> I get a different error   sys:1: ResourceWarning: unclosed <socket.socket fd=4, family=AddressFamily.AF_INET, type=SocketType.SOCK_STREAM, proto=0, laddr=('', 8000)>
12:57:24  <Alberth> that looks like 'sys' package, if I compare that with your error
12:59:54  <frosch123> <- dynamically typed languages :)
13:02:56  <Alberth> where does that come from?
13:03:19  <frosch123> path is not defined at that point
13:03:27  <frosch123> but assigned shortly after
13:03:33  <frosch123> newproject fails
13:04:04  <Alberth> ieks
13:04:38  <Alberth> I thought I removed that :(
13:05:21  <Alberth> patch is good
13:06:02  <frosch123> found another similar silly typo in a variable name :)
13:06:32  <frosch123> didn't some moon rocket explode because of some fortran issue with misspelled variable names?
13:07:42  <frosch123> oh, it did not save the project
13:07:55  <frosch123> i only created it, but failed to upload a base language
13:08:06  <frosch123> after restart there is project_data.xml
13:08:21  <Alberth> A booster went off course during launch, resulting in the destruction of NASA Mariner 1. This was the result of the failure of a transcriber to notice an overbar in a written specification for the guidance program, resulting in the coding of an incorrect formula in its FORTRAN software. (July 22, 1962).[1] Note that the initial reporting of the cause of this bug was incorrect.[2]    ?
13:08:53  <Alberth> that's ok, as languages are in a different file
13:09:17  <frosch123> the directory exists, but without content
13:09:26  <frosch123> it then blocks the project from being recreated
13:10:09  <Alberth> yep quite paranoid in making duplicate project names
13:10:46  <Alberth> delete the directory or maybe moving project_data.xml in it ?
13:10:56  <Alberth> it should be a few lines only
13:11:09  <Alberth> as you don't have a skeleton
13:12:05  <frosch123> i removed the directory, but there was no project_data.xml
13:12:49  <frosch123> shouldn't it write the metadata upon project creation, so there is a project_data.xml even though there is no skeletion yet?
13:13:37  <Alberth> it should, there should be project_data.xml even without base language
13:13:46  <frosch123> there wasn't :)
13:13:53  <Alberth> hmm, maybe a missing "set_modified()"
13:15:43  <frosch123> there seem to be two main issues with the invalid strings
13:15:58  <frosch123> referencing sub-arguments of STRINGn: '{STRING2} day{P 0:2 "" s}'
13:15:59  <frosch123> positional parameters: '{1:STRING}'
13:24:59  <Alberth>  it helps if you mark the new project as 'modified' :)
13:26:07  <frosch123> <- upload_language was the other issue i encountered
13:26:40  <Alberth> hmm, silly typo indeed :)
13:27:26  <frosch123> 660 mb memory usage after uploading all languages
13:28:35  <frosch123> oh, it reads all languages on start? for stats i guess
13:29:30  <Alberth> it loads all languages
13:29:48  <Alberth> it doesn't have the concept of languages that exist but are not loaded
13:29:54  <frosch123> at 860 mb after restart :p
13:30:32  <frosch123> oh, it marked all translations as outdated
13:34:57  <frosch123> <- what does that mean?
13:38:24  <Alberth> it tries to read invalid utf-8, I'd say
13:42:05  <frosch123> somehow the "°" is encoded as latin 1 in the form
13:43:54  <Alberth> isn't that html standard?
13:44:50  <frosch123> would be troublesome :p we could never have chinese translators again :p
13:45:52  <Alberth> the paste suggests bottle does that
13:46:01  <Alberth> line 14/15
13:47:32  <frosch123> looks like we need to disable "recode_unicode"
13:47:38  <frosch123> no idea why that is there
13:48:24  <Alberth> it's at a different line here, or did you change bottle?
13:48:38  <Alberth> oh sorry, it's not
13:48:48  <Alberth> I am not awake today :(
13:50:48  <frosch123> maybe it's meant for "identifiers"
13:50:55  <frosch123> but we certainly need to disable it for translations
13:54:48  <Alberth> ebc93d15:     fix #297: Added FormsDict.decode() to better support WTForms.
13:55:50  <frosch123> <- fixes it
13:55:59  <frosch123> somehow that is the only place, where decode() is used
13:57:04  <Alberth> it's the only spot where you have non-ascii input
13:57:17  <Alberth> (as strings)
13:57:38  <Alberth> the other places are names ,and urls, which are ascii (so far)
13:58:26  <frosch123> i don't understand issue 279 :)
13:58:46  <Alberth> me neither, it looks as some tool-specific hack
14:01:45  <frosch123> remains the everything-is-outdated-after-restart issue :)
14:02:32  <Alberth> k, will have a look
14:04:05  <Alberth> can you check if something actually changed?
14:06:15  <frosch123> the edit form shows the same for "base lang string" and "previous base lang string"
14:06:27  <frosch123> can i check something more internal?
14:06:44  <Alberth> a diff between the files?
14:06:58  <Alberth> ie you should have .bup files :)
14:07:20  <frosch123> actually, i don't :p
14:08:14  <frosch123>
14:08:26  <frosch123> after confirming one string
14:12:05  <Alberth> that looks ok, you added a new change, with a new time stamp
14:12:25  <frosch123> on disk the base lang filename was still older than the translations
14:12:31  <frosch123> so, it did not write anything to disk
14:12:37  <frosch123> it just said everything is outdated
14:13:01  <DevZone> Project FIRS Industry Replacement Set build #667-push: SUCCESS in 3 min 33 sec:
14:13:50  <Alberth> On loading, it goes through the translations, to check if there are old changes, maybe there something goes wrong
14:18:36  <frosch123> aw, also added all the devzone projects
14:19:00  <frosch123> selecting the openttd projects now starts swapping :/
14:19:58  <Alberth> I wonder if it would be useful to write the data files just straight to disk
14:20:52  <Alberth> I don't use xml much
14:21:32  <Alberth> so writing an xml file from 'write' seems quite feasible to me
14:21:42  <Alberth> s/from/with/
14:24:38  <frosch123> it writes project_data.xml everytime when uploading a translation
14:24:44  <frosch123> though it never changes
14:35:31  <frosch123> <- if you want big test data. though a subset is likely more handy :p
14:36:31  <Alberth> quite likely, I made a copy, but I doubt I need it
14:37:02  <Alberth> upload is probably my fault
14:37:55  <Alberth> webtranslate/pages/ line 322  sets project as modified
14:38:25  <Alberth> as, was my idea, project contains the languages in the single file case
14:39:14  <Alberth> but that is bollocks as the save code also checks languages in case of single file
14:42:02  <Alberth> can you commit your changes?
14:49:51  <frosch123> pushed
14:50:16  <DevZone> Project eints build #26-push: SUCCESS in 25 sec:
14:50:37  <DevZone> Project FIRS Industry Replacement Set build #668-push: SUCCESS in 3 min 36 sec:
14:52:51  <DevZone> Project eints build #27-push: SUCCESS in 11 sec:
14:53:08  <Alberth> pushed  Fix: Do not mark project data as modified when uploading a new language.
15:04:12  <DevZone> Project eints build #28-push: SUCCESS in 12 sec:
15:14:47  <frosch123> i've added some of the missing strnig parameters
15:14:50  <DevZone> Project eints build #29-push: SUCCESS in 11 sec:
15:32:29  <DevZone> Project FIRS Industry Replacement Set build #669-push: SUCCESS in 3 min 18 sec:
15:52:29  <frosch123> oi, down to 2 invalid
15:52:36  <frosch123> that's almost to little to be plausible
15:58:14  <frosch123> <- allow empty positional parameters in the base language
15:59:07  <frosch123> oh, the comments is no longer valid
15:59:42  <frosch123>
16:12:30  <frosch123> hmm, maybe that code should not be in check_sanity
16:12:43  <frosch123> but in check_string, just before calling check_sanity
16:13:13  <Alberth> cooking dinner currently :)
16:13:53  <frosch123> liar :p
16:16:31  <DevZone> Project FIRS Industry Replacement Set build #670-push: SUCCESS in 3 min 17 sec:
16:39:34  <Alberth> why can't you add {SKIP}  to the recognized parameters, and add it to the set of recognized string commands for openttd?  webtranslate/  line 29   text_commands = GS_PARAMETERS,
16:40:05  <frosch123> i think it's no longer a valid string parameter
16:40:18  <frosch123> so, it should not appear in the lang files
16:41:04  <frosch123> yup, it's no valid string code anymore
16:41:16  <Alberth> k
16:42:20  <frosch123> eints will show error messages like "{NUM} is invalid, base language uses {SKIP} in this position", but well
16:42:29  <frosch123> i wouldn't know what it should say instead
16:42:54  <Alberth> base language should be changed
16:43:06  <frosch123> huh?
16:43:36  <Alberth> delete {SKIP}
16:43:47  <frosch123> it doesn't exist
16:43:59  <frosch123> it existed some years ago
16:44:19  <frosch123> but it was removed, because the position reference can do everything and easier
16:44:33  <Alberth> sounds reasonable
16:44:52  <Alberth> where is this {SKIP} then?
16:46:26  <frosch123> "*** {STRING} ist der Firma #{2:NUM} breigetreten" <- 0->STRING, 2->NUM, 1->nothing
16:46:44  <Alberth> ah, right
16:47:31  <Alberth> I can imagine eints isn't prepared for that :)
16:48:24  <Alberth> but it should properly handle 'nothing' rather than adding a non-existing string command
16:48:41  <frosch123> it does with about patch
16:48:51  <frosch123> i use "SKIP" only as a name for "nothing"
16:49:15  <frosch123> SKIP does not show up in the base lang, and is not accepted in translations or the base lang
16:49:38  <frosch123> it can only appear when using 1 in the translation
16:50:20  <Alberth> ok
16:51:04  <Alberth> it should say "{NUM} is invalid, position 1 has no string command in this string"   or so, imho
16:52:27  <DevZone> Project xussrset - Trains from Russia build #958-push: SUCCESS in 4 min 45 sec:
16:53:50  <frosch123> ok, then i need to add some more if cases for None :)
16:55:20  <Alberth> maybe add "error" parameters instead?
16:56:20  <DevZone> Project Finnish Trainset build #175-push: SUCCESS in 8 min 47 sec:
16:57:08  <DevZone> Project FIRS Industry Replacement Set build #671-push: SUCCESS in 3 min 19 sec:
19:27:50  <DevZone> Project World Airliner Set build #1033-push: SUCCESS in 3 min 25 sec:
19:52:58  <DevZone> Project World Airliner Set build #1034-push: SUCCESS in 3 min 12 sec:
19:54:21  *** Alberth has left #openttdcoop.devzone
20:02:38  <DevZone> Project World Airliner Set build #1035-push: SUCCESS in 3 min 14 sec:
20:05:54  <DevZone> Project World Airliner Set build #1036-push: SUCCESS in 3 min 15 sec:
20:09:03  <DevZone> Project World Airliner Set build #1037-push: SUCCESS in 3 min 9 sec:
20:14:08  *** frosch123 has quit IRC
22:31:21  <DevZone> Project xussrset - Trains from Russia build #959-push: SUCCESS in 4 min 21 sec:

Powered by YARRSTE version: svn-trunk