1 2009-12-20T00:04:35  *** eSyr has quit IRC
   2 2009-12-20T00:08:00  *** franklin_ has quit IRC
   3 2009-12-20T01:55:27  * ThomasWaldmann plays with FireGPG
   4 2009-12-20T11:52:09  *** evgSyr has joined #moin-dev
   5 2009-12-20T11:52:44  <ThomasWaldmann> evgSyr: see below vv
   6 2009-12-20T11:52:55  *** evgSyr is now known as eSyr
   7 2009-12-20T11:53:12  <ThomasWaldmann> <      eSyr> ThomasWaldmann, if you haven't patched CheckTranslation already, i've made a new patch, where  master-date parsing is done more properly: http://paste.pocoo.org/show/158220/
   8 2009-12-20T11:53:27  <ThomasWaldmann> eSyr: nice functionality
   9 2009-12-20T11:53:35  <ThomasWaldmann> but I'ld suggest being less flexible with master-date parsing (we want ONE specific format there, not many)
  10 2009-12-20T11:53:50  <ThomasWaldmann> when I used it, I usually just copy&pasted the string from the master page's action=info history column
  11 2009-12-20T11:54:07  <ThomasWaldmann> and "deprecated" -> "outdated" / "not up-to-date"
  12 2009-12-20T11:54:18  <ThomasWaldmann> master-page is something we have due to history (< 1.9), but as moin 1.9 knows the mapping via i18n (and could also find out the reverse mapping), it is not needed any more
  13 2009-12-20T11:54:38  <ThomasWaldmann> and as we make automated use of those previously "only for human information" strings, we also need some conversion for moin2's fs19 backend, that transfers that stuff to be real metadata
  14 2009-12-20T11:54:50  <eSyr> oh, ok.
  15 2009-12-20T11:55:41  <ThomasWaldmann> btw, the .strip() you do could be done with the matching regex
  16 2009-12-20T11:55:53  <eSyr> hm, yes.
  17 2009-12-20T11:57:05  <ThomasWaldmann> the reverse mapping translatedpage -> origpage could be built once when the i18n is loaded
  18 2009-12-20T11:57:34  <eSyr> hm, i propose that master-page stuff will remain until someone will write tools for getting this information. Because now sometimes i can quickly determine, what is original page name for translated page which i'm reading is.
  19 2009-12-20T11:59:25  <ThomasWaldmann> sure
  20 2009-12-20T12:01:07  <ThomasWaldmann> s/thing/meta/
  21 2009-12-20T12:01:52  <ThomasWaldmann> btw, seen FireGPG stuff? :)
  22 2009-12-20T12:02:04  <eSyr> hm. no.
  23 2009-12-20T12:06:03  <eSyr> (about date regexes — you can left only several of those, i've written tham based on what i've seen in russian and pt-br translations)
  24 2009-12-20T12:06:14  <eSyr> *them
  25 2009-12-20T12:16:11  <eSyr> ThomasWaldmann, http://paste.pocoo.org/show/158228/
  26 2009-12-20T12:16:46  <ThomasWaldmann> no :)
  27 2009-12-20T12:17:29  <eSyr> http://paste.pocoo.org/show/158230/
  28 2009-12-20T12:17:53  <ThomasWaldmann> (please try to make a clean diff. I mean: only change stuff you intended to change, that is related to your changeset topic)
  29 2009-12-20T12:18:21  <eSyr> hm.
  30 2009-12-20T12:18:24  <eSyr> oh, i see.
  31 2009-12-20T12:19:01  <eSyr> http://paste.pocoo.org/show/158231/
  32 2009-12-20T12:19:29  <ThomasWaldmann> 42 vs 47?
  33 2009-12-20T12:19:52  <eSyr> you can remove them if you want.
  34 2009-12-20T12:20:09  <eSyr> or just say, what i should left.
  35 2009-12-20T12:20:45  <eSyr> (i think, datetime macro format and format from info page)
  36 2009-12-20T12:21:01  <eSyr> *i propose
  37 2009-12-20T12:21:15  <ThomasWaldmann> only Y M D H M S iso stuff is acceptable. european or US formats just cause confusion.
  38 2009-12-20T12:21:28  <eSyr> ok.
  39 2009-12-20T12:22:39  <ThomasWaldmann> 	152 	except:
  40 2009-12-20T12:22:40  <eSyr> http://paste.pocoo.org/show/158232/
  41 2009-12-20T12:22:41  <ThomasWaldmann> 	153 	pass
  42 2009-12-20T12:22:52  <ThomasWaldmann> avoid such stuff, if possible
  43 2009-12-20T12:22:59  <eSyr> hm...
  44 2009-12-20T12:23:29  <eSyr> (i can't remember, why i used it there...)
  45 2009-12-20T12:23:58  <eSyr> oh, for int, i think.
  46 2009-12-20T12:24:00  <eSyr> int()
  47 2009-12-20T12:24:29  <ThomasWaldmann> ValueError?
  48 2009-12-20T12:25:06  <eSyr> http://paste.pocoo.org/show/158233/
  49 2009-12-20T12:25:20  <ThomasWaldmann> problem is that except: catches all stuff, even the stuff you didn't want to catch. can hide coding errors or other problems.
  50 2009-12-20T12:25:27  <eSyr> (i think, one more year of moin patches and i'll be able to write clean code)
  51 2009-12-20T12:25:34  <eSyr> yes, i know.
  52 2009-12-20T12:25:58  <eSyr> but i used to write rather quick and dirty code.
  53 2009-12-20T12:26:16  <ThomasWaldmann> len(search_results) > 0    ->   search_results   # empty list is falsy, non-empty list is truely
  54 2009-12-20T12:26:31  <eSyr> hm...
  55 2009-12-20T12:27:06  <eSyr> (i'm trying to remember, why i used explicit form...)
  56 2009-12-20T12:27:39  <ThomasWaldmann> in that case, what i suggested is completely safe replacement
  57 2009-12-20T12:27:48  <eSyr> yes, i understand.
  58 2009-12-20T12:28:33  <eSyr> http://paste.pocoo.org/show/158234/
  59 2009-12-20T12:28:36  <ThomasWaldmann> in other cases, it might sometimes matter whether it is None or 0 or [], which are all falsy
  60 2009-12-20T12:29:04  <eSyr> yes.
  61 2009-12-20T12:29:45  <ThomasWaldmann> btw, I'll keep the iso encoding for moin 1.x in all files that do not require utf-8 (because they are ascii anyway)
  62 2009-12-20T12:30:19  <eSyr> well, i used en-dash in one of messages.
  63 2009-12-20T12:30:44  <eSyr> (sort of typographic nazi)
  64 2009-12-20T12:32:37  <eSyr> i can remove it and revert to iso-8859-1, if you wan.
  65 2009-12-20T12:32:38  <ThomasWaldmann> uh
  66 2009-12-20T12:32:40  <eSyr> *want
  67 2009-12-20T12:32:45  <ThomasWaldmann> yes, please
  68 2009-12-20T12:32:57  <ThomasWaldmann> such stuff sometimes makes more trouble than it's worth
  69 2009-12-20T12:33:26  <ThomasWaldmann> (like missing chars in some fonts, sw having problems with utf-8 multibyte...)
  70 2009-12-20T12:33:45  <ThomasWaldmann> btw, master-rev is new?
  71 2009-12-20T12:35:13  <ThomasWaldmann> 172/173 are commented?
  72 2009-12-20T12:36:07  <ThomasWaldmann> getattr(i18n.strings, "all_pages") -> i18n.strings.all_pages ?
  73 2009-12-20T12:36:19  <eSyr> ThomasWaldmann, master-rev is requested by RenatoSilva.
  74 2009-12-20T12:36:42  <ThomasWaldmann> 186 -> only search_results, not > 0
  75 2009-12-20T12:37:37  <ThomasWaldmann> not sure that makes sense. we don't do it yet, but what if we purge some revs and renumber?
  76 2009-12-20T12:38:01  <eSyr> it make problems then :)
  77 2009-12-20T12:38:17  <eSyr> (i'm not sure that renumbering is good idea <_<)
  78 2009-12-20T12:38:44  <ThomasWaldmann> yeah, maybe not. but why not just support the timestamp based thing?
  79 2009-12-20T12:39:20  <eSyr> well, i just implement what Renato wants, i'm good with timesamps only :)
  80 2009-12-20T12:39:47  <ThomasWaldmann> btw, you subscribed .* on moinmo.in? :)
  81 2009-12-20T12:39:52  <eSyr> yes.
  82 2009-12-20T12:41:22  <eSyr> http://paste.pocoo.org/show/158236/
  83 2009-12-20T12:47:26  <ThomasWaldmann> 121..124: maybe first assign m = ..., if m: ... - and use 'foo' in master_metas below.
  84 2009-12-20T12:49:21  <eSyr> premature optimization? >:3
  85 2009-12-20T12:49:34  <ThomasWaldmann> no :)
  86 2009-12-20T12:50:03  <ThomasWaldmann> it is just about not putting something into a dict that you need to patch immediately afterwards
  87 2009-12-20T12:50:20  <eSyr> hm.
  88 2009-12-20T12:50:36  <eSyr> i put it into a dict because it can be MatchObject or None.
  89 2009-12-20T12:50:56  <eSyr> and if it is Match object then i patch it.
  90 2009-12-20T12:51:05  <ThomasWaldmann> but you can first check whether the regex op was successful, and then put the real result into the dict
  91 2009-12-20T12:51:22  <eSyr> i want None's in dict :)
  92 2009-12-20T12:51:35  <ThomasWaldmann> you don't need them
  93 2009-12-20T12:51:40  <eSyr> because then i can avoid KeyEroor.
  94 2009-12-20T12:51:48  <eSyr> *KeyError
  95 2009-12-20T12:51:51  <ThomasWaldmann> (and even if, you could put them there also in that way)
  96 2009-12-20T12:52:40  <ThomasWaldmann> "'key' in dictname" reads rather well :)
  97 2009-12-20T12:52:57  <eSyr> hm.
  98 2009-12-20T12:55:43  <ThomasWaldmann> translation_warnings -> do not use .get('...', False)
  99 2009-12-20T12:56:38  <ThomasWaldmann> i think you can make sure easily that this dict has all you want from it, thus you can just use translation_warnings[index]
 100 2009-12-20T12:57:07  <eSyr> ok.
 101 2009-12-20T12:57:15  <ThomasWaldmann> if you want to make it even better, you could use UPPERCASE_CONSTANTS for index, not string literals
 102 2009-12-20T12:58:08  <ThomasWaldmann> but that's maybe not needed for stuff just used there locally
 103 2009-12-20T12:59:08  <eSyr> http://paste.pocoo.org/show/158237/
 104 2009-12-20T13:00:07  <ThomasWaldmann> for API-like stuff, such constants are better, because you'll get an AttributeError in case you have a typo in them. for strings it'll be either an IndexError or no error at all for .get()
 105 2009-12-20T13:00:50  <eSyr> oh, i see.
 106 2009-12-20T13:01:02  <ThomasWaldmann> can you check how many pages need 41 and 43?
 107 2009-12-20T13:02:06  <eSyr> hm, i use 41 for my translations.
 108 2009-12-20T13:04:49  <ThomasWaldmann> you don't do copy&paste?
 109 2009-12-20T13:05:19  <eSyr> no, i just use <<Date(2009-12-20T23:30:03Z)>> :)
 110 2009-12-20T13:05:39  <eSyr> {'<<Date(Time)?\\((?P<timestamp>[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}Z)\\)>>': 84, '(?P<timestamp>[0-9]{4}-[0-9]{2}-[0-9]{2})': 10, '(?P<timestamp>[0-9]{4}-[0-9]{2}-[0-9]{2} [0-9]{2}:[0-9]{2}:[0-9]{2})': 9} — for russian translation
 111 2009-12-20T13:06:07  <ThomasWaldmann> how can you use <<Date(2009-12-20T23:30:03Z)>>? you need to put the timestamp of the revision you translated there
 112 2009-12-20T13:07:51  <eSyr> when i use date, i put some timesamp.
 113 2009-12-20T13:08:02  <ThomasWaldmann> yes, but it is the current time :)
 114 2009-12-20T13:08:06  <eSyr> it is greater than last rev, but less than next rev timestamp.
 115 2009-12-20T13:08:46  <ThomasWaldmann> well, that is not quite how it was inteded :) but it can work, with the right code.
 116 2009-12-20T13:09:04  <ThomasWaldmann> about that master-rev stuff and related code:
 117 2009-12-20T13:09:14  <eSyr> yes, code is written with this assumption.
 118 2009-12-20T13:09:26  <ThomasWaldmann> either we drop that for now or that code needs more fine-grained exception handling
 119 2009-12-20T13:09:52  <eSyr> (it's just < instead of = :) )
 120 2009-12-20T13:10:19  <ThomasWaldmann> i.e. split line 140 and wrap one try/except around the 2 expressions needing it
 121 2009-12-20T13:10:28  <ThomasWaldmann> around each, I mean
 122 2009-12-20T13:11:54  <eSyr> mmm, for which exceptions?
 123 2009-12-20T13:12:38  <ThomasWaldmann> int(master_metas['rev']) can give ValueError
 124 2009-12-20T13:13:53  <ThomasWaldmann> hmm, it is only that one. but the try/except should be directly around it and not wrap lots of other code there or in called functions
 125 2009-12-20T13:14:04  <eSyr> ok.
 126 2009-12-20T13:14:21  <ThomasWaldmann> just imagine .get_rev() throws ValueError
 127 2009-12-20T13:14:55  <ThomasWaldmann> or _()
 128 2009-12-20T13:16:25  <ThomasWaldmann> missed_master_page missed_master_date_or_rev check ambiguity and grammar
 129 2009-12-20T13:17:13  <eSyr> how should it be?
 130 2009-12-20T13:18:06  <ThomasWaldmann> maybe missing_..._meta? (you don't mean that the master PAGE is missing, but the info about it)
 131 2009-12-20T13:18:30  <eSyr> ok.
 132 2009-12-20T13:18:56  <ThomasWaldmann> the case that the master PAGE is missing could also happen, btw :)
 133 2009-12-20T13:19:31  <eSyr> oh -_-
 134 2009-12-20T13:23:57  <eSyr> (well, missing master pages handled somehow, thanks to Page object)
 135 2009-12-20T13:24:51  <eSyr> Translated page is outdated: it is based on revision 3, but original page has revision 99999999.
 136 2009-12-20T13:25:03  <eSyr> hehe.
 137 2009-12-20T13:27:14  <eSyr> is warning statistics needed?
 138 2009-12-20T13:29:53  <ThomasWaldmann> better don't do statistics :D
 139 2009-12-20T13:30:05  <eSyr> ok.
 140 2009-12-20T13:30:47  <eSyr> http://paste.pocoo.org/show/158242/
 141 2009-12-20T13:33:10  <ThomasWaldmann> did you checked the "missed"?
 142 2009-12-20T13:34:04  <eSyr> mmm, what do you mean?
 143 2009-12-20T13:34:36  <ThomasWaldmann> "it is outdated" but "it is missing" (like "it is not there"), not "it is missed" (does that mean "I miss it"?)
 144 2009-12-20T13:35:37  <eSyr> oh, sorry.
 145 2009-12-20T13:36:35  <ThomasWaldmann> 145 will crash if the above exception handler triggers
 146 2009-12-20T13:39:07  <ThomasWaldmann> about the date format guessing: did you try just feeding strptime with the formats and the strings, without using regex before?
 147 2009-12-20T13:39:41  <eSyr> hm, no.
 148 2009-12-20T13:39:42  <ThomasWaldmann> maybe strptime just tells if it can't parse the string with the format and then you just try the next one
 149 2009-12-20T13:39:54  <eSyr> yes, it tells ValueError :)
 150 2009-12-20T13:39:55  <ThomasWaldmann> order is important :)
 151 2009-12-20T13:40:15  <eSyr> ok, i need to go, bbl.
 152 2009-12-20T13:40:22  <ThomasWaldmann> cu :)
 153 2009-12-20T13:40:28  *** eSyr has quit IRC
 154 2009-12-20T16:20:58  <dreimark> ThomasWaldmann: happy birthday!
 155 2009-12-20T16:25:57  <dreimark> johill: happy birthday!
 156 2009-12-20T16:35:26  <johill> dreimark: thanks!
 157 2009-12-20T17:38:55  <ThomasWaldmann> dreimark: thanks :)
 158 2009-12-20T17:39:04  <ThomasWaldmann> johill: happy birthday :D
 159 2009-12-20T17:40:36  <johill> happy birthday! :)
 160 2009-12-20T17:44:19  * ThomasWaldmann bbl
 161 2009-12-20T17:46:27  * johill goes to put new ssd into laptop
 162 2009-12-20T19:17:29  *** eSyr has joined #moin-dev
 163 2009-12-20T20:26:48  *** y84 has joined #moin-dev
 164 2009-12-20T21:56:14  *** y84 has quit IRC
 165 2009-12-20T22:15:16  <ThomasWaldmann> johill: type?
 166 2009-12-20T22:50:04  <CIA-8> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 5388:cd96baeeec9b 1.9/MoinMoin/action/AttachFile.py: AttachFile.move_file: send events (so e.g. xapian index update happens)
 167 2009-12-20T23:05:34  <CIA-8> Thomas Waldmann <tw AT waldmann-edv DOT de> default * 5389:8a9f7b812cce 1.9/docs/CHANGES: updated docs/CHANGES
 168 2009-12-20T23:30:55  <eSyr> ThomasWaldmann, http://paste.pocoo.org/show/158397/

MoinMoin: MoinMoinChat/Logs/moin-dev/2009-12-20 (last edited 2009-12-19 23:15:02 by IrcLogImporter)