These are chat archives for translate/dev

3rd
May 2016
phlax
@phlax
May 03 2016 11:45
hi @julen ive opened a couple of PRs to add a generic config system, which is used in the PRs immediately following
we are under considerable time pressure atm, and i would also like to include these components in the 2.8beta
the PRs are here translate/pootle#4697 and translate/pootle#4698
i need to finish off the docs, but they give a pretty good example of usage
Leandro Regueiro
@unho
May 03 2016 12:20
@phlax Is translate/pootle#4698 still WIP?
phlax
@phlax
May 03 2016 12:21
only because there is not command docs yet
or incomplete
Leandro Regueiro
@unho
May 03 2016 12:21
k
phlax
@phlax
May 03 2016 12:21
@julen any thoughts on those PRs?
phlax
@phlax
May 03 2016 12:41
@ta2-1 im wondering which fields would most benefit from db_index in the Config model
and if any would benefit from index_together
Leandro Regueiro
@unho
May 03 2016 12:42
@phlax Perhaps key should have an index.
phlax
@phlax
May 03 2016 12:42
im thinking - index content_type, object_pk and key
yep
and perhaps index_together content_type and object_pk
Dwayne Bailey
@dwaynebailey
May 03 2016 13:37
@julen I wanted to get some other RTL eyes to look at the translate/pootle#3941 but I think it would need an editor that they can just look at and work. Does your staging allow that?
Julen Ruiz Aizpuru
@julen
May 03 2016 13:39
phlax: hi, sorry was busy fixing merge conflicts and other issue
*issues
dwaynebailey: yes, our staging is up-to-date
phlax
@phlax
May 03 2016 13:40
np
Dwayne Bailey
@dwaynebailey
May 03 2016 13:40
@julen but if I recall they can’t get the editor without an account?
Julen Ruiz Aizpuru
@julen
May 03 2016 13:40
AFAIK iafan tested this with a native arabic speaker already
Dwayne Bailey
@dwaynebailey
May 03 2016 13:40
Is there any way to just make the editor generally available
phlax
@phlax
May 03 2016 13:41
@dwaynebailey we could stage no?
Dwayne Bailey
@dwaynebailey
May 03 2016 13:41
@julen I think we really need more eyeballs. We have Farsi and Urdu contributors that really should give it a spin and see if there are issues.
@phlax we could yes, but if there is a staging up already it might make sense to use that.
Julen Ruiz Aizpuru
@julen
May 03 2016 13:42
dwaynebailey: you can access the editor as anonymous, can't perform actions though
that'd be great
Dwayne Bailey
@dwaynebailey
May 03 2016 13:45
@julen yip that works. Urud and Persian aren’t available languages. But I guess typing that in Arabic language should be fine.
Julen Ruiz Aizpuru
@julen
May 03 2016 13:47
also Hebrew will provide the same experience
phlax
@phlax
May 03 2016 14:59
@ta2-1 any thoughts on which keys should be indexed on Config?
phlax
@phlax
May 03 2016 17:09
@ta2-1 reading a bit further im thinking that we should use a charfield set with a high max_length - relevant docs are here https://docs.djangoproject.com/en/1.9/ref/contrib/contenttypes/#django.contrib.contenttypes.fields.GenericForeignKey.for_concrete_model
im not imagining that any given item would have a lot of config/data, but i think we need to make it performant enough to allow alot of items to be configured
so out of int, char, text going in opposite directions in performance/flexibility scales, i reckon char is a good compromise
the config app is written so that someone can swap out the model/fields according to their needs anyway
any thoughts?
Taras Semenenko
@ta2-1
May 03 2016 17:13
@phlax I've just followed your links...
I'd choose here the simplest way
phlax
@phlax
May 03 2016 17:14
simplest?
right now that would be char
Taras Semenenko
@ta2-1
May 03 2016 17:14
I don't know which will be the simplest)
phlax
@phlax
May 03 2016 17:15
i think char is the right way - like i said its pretty trivial to swap out the model - i could add a recipe in performance tips or something
hmmm
Taras Semenenko
@ta2-1
May 03 2016 17:15
I believe int would be enough for our and our users needs. But talking about system-wide performance: we have TextField for comments which haven't caused any performance questions when you used it.
phlax
@phlax
May 03 2016 17:16
hmm
i think thats because we forgot to add indexes 8/
i think we should swap to char
in the case of comments i am imagining that they will increase over time, far more than config hopefully 8/
so the case for addressing performance issues is even stronger
so, @ta2-1 should we do that - ie swap the comment field over to char?
i dont imagine its too painful a migration but cant rem offhand
and add indexes
Taras Semenenko
@ta2-1
May 03 2016 17:18
I couldn't overwrite existing field from abstract model
phlax
@phlax
May 03 2016 17:19
wierd
im sure i saw a doc about it
did we discuss at the time?
class Student(CommonInfo):
    # ...
    class Meta(CommonInfo.Meta):
        db_table = 'student_info
Taras Semenenko
@ta2-1
May 03 2016 17:20
hmm
no we haven't
phlax
@phlax
May 03 2016 17:21
apologies
on that note
if we want to make it easy for someone to swap out the config model
i should put that into abstract class/module
hmm thinking about it @ta2-1
nm
Taras Semenenko
@ta2-1
May 03 2016 17:25
what?
phlax
@phlax
May 03 2016 17:25
no i was thinking that we should make the comment model ~easy to swap out
which django_comments already does in its way
Taras Semenenko
@ta2-1
May 03 2016 17:26
abstract config model can be a good idea
phlax
@phlax
May 03 2016 17:26
but then we could use int pk
but for now
nm
yep, re abstract config
ill update PR
Taras Semenenko
@ta2-1
May 03 2016 17:27
but I didn't follow re comments
phlax
@phlax
May 03 2016 17:27
nm, it was more thinking about how we could use ints on comments
but for now i think lets leave it alone - or at least move to char
but we can deal with that after
Taras Semenenko
@ta2-1
May 03 2016 17:28
k
phlax
@phlax
May 03 2016 17:28
its probably something to work out before release tho
at least moving to char
cool, so for config
ill set object_pk to char with 255
its gonna be a pretty corner case using pks longer than that
and then we can add indexes
Taras Semenenko
@ta2-1
May 03 2016 17:41
I'm ok with any variant here.
phlax
@phlax
May 03 2016 17:45
cool so @ta2-1 set to char
do you have any blockers to the initial config pr landing?
im gonna address @unho 's nit now
and i might do a bit more refactoring of the managers class
phlax
@phlax
May 03 2016 17:50
the other thing ill do now is split up the last commit a bit
Taras Semenenko
@ta2-1
May 03 2016 18:30
@phlax I've finished code review translate/pootle#4697 I left some nits there.
phlax
@phlax
May 03 2016 19:22
@ta2-1 thanks
ill look now
Taras Semenenko
@ta2-1
May 03 2016 21:45
sorry I explained in the next comment