From: Peter L. <pet...@te...> - 2011-03-21 11:15:32
Attachments:
EditFilterSV2.jpeg
|
Hi, I have found a strange effect in the filter editor in Swedish translation. The heading "Allmämma filter" pops up twice. See attached screen dump. Under the first there is only one row connected to the filter: MatchesSourceConfidence Under the second "Allmänna filter" heading, all the other filters are listed. It looks OK when I run with English locale. If I try to start with French locale I get a database error. /Peter |
From: jerome <rom...@ya...> - 2011-03-21 16:31:34
|
> I have found a strange effect in the filter editor in > Swedish translation. The heading > "Allmämma filter" pops up twice. See attached screen > dump. > Under the first there is only one row connected to the > filter: > MatchesSourceConfidence > > Under the second "Allmänna filter" heading, all the > other filters are listed. > > It looks OK when I run with English locale. +1 in french I do not know why! I used the same string - category = _('General filters') - and the code is close to filter tag (see /gui/filtereditor.py). http://www.gramps-project.org/bugs/view.php?id=4491 > If I try to start with French locale I get a database > error. on database or crash on spell module ? Jérôme --- En date de : Lun 21.3.11, Peter Landgren <pet...@te...> a écrit : > De: Peter Landgren <pet...@te...> > Objet: [Gramps-devel] Filter editor in Gramps 3.3.0 > À: "Gramps Development List" <gra...@li...> > Date: Lundi 21 mars 2011, 12h19 > Hi, > > I have found a strange effect in the filter editor in > Swedish translation. The heading > "Allmämma filter" pops up twice. See attached screen > dump. > Under the first there is only one row connected to the > filter: > MatchesSourceConfidence > > Under the second "Allmänna filter" heading, all the > other filters are listed. > > It looks OK when I run with English locale. > > If I try to start with French locale I get a database > error. > > /Peter > > -----La pièce jointe associée suit----- > > ------------------------------------------------------------------------------ > Colocation vs. Managed Hosting > A question and answer guide to determining the best fit > for your organization - today and in the future. > http://p.sf.net/sfu/internap-sfd2d > -----La pièce jointe associée suit----- > > _______________________________________________ > Gramps-devel mailing list > Gra...@li... > https://lists.sourceforge.net/lists/listinfo/gramps-devel > |
From: jerome <rom...@ya...> - 2011-03-21 16:41:46
|
Oh, this was also present during testing ! http://www.gramps-project.org/bugs/view.php?id=4491#c16831 But I suppose it was fixed on last tests. Regression or not fixed, I am still stuck for finding the cause. :( --- En date de : Lun 21.3.11, jerome <rom...@ya...> a écrit : > De: jerome <rom...@ya...> > Objet: [Gramps-devel] Re : Filter editor in Gramps 3.3.0 > À: "Gramps Development List" <gra...@li...>, "Peter Landgren" <pet...@te...> > Date: Lundi 21 mars 2011, 17h31 > > I have found a strange effect in > the filter editor in > > Swedish translation. The heading > > "Allmämma filter" pops up twice. See attached screen > > dump. > > Under the first there is only one row connected to > the > > filter: > > MatchesSourceConfidence > > > > Under the second "Allmänna filter" heading, all > the > > other filters are listed. > > > > It looks OK when I run with English locale. > > +1 in french > > I do not know why! > > I used the same string > - category = _('General filters') - > > and the code is close to filter tag > (see /gui/filtereditor.py). > > http://www.gramps-project.org/bugs/view.php?id=4491 > > > > If I try to start with French locale I get a database > > error. > > on database or crash on spell module ? > > > Jérôme > > > > --- En date de : Lun 21.3.11, Peter Landgren <pet...@te...> > a écrit : > > > De: Peter Landgren <pet...@te...> > > Objet: [Gramps-devel] Filter editor in Gramps 3.3.0 > > À: "Gramps Development List" <gra...@li...> > > Date: Lundi 21 mars 2011, 12h19 > > Hi, > > > > I have found a strange effect in the filter editor in > > Swedish translation. The heading > > "Allmämma filter" pops up twice. See attached screen > > dump. > > Under the first there is only one row connected to > the > > filter: > > MatchesSourceConfidence > > > > Under the second "Allmänna filter" heading, all > the > > other filters are listed. > > > > It looks OK when I run with English locale. > > > > If I try to start with French locale I get a database > > error. > > > > /Peter > > > > -----La pièce jointe associée suit----- > > > > > ------------------------------------------------------------------------------ > > Colocation vs. Managed Hosting > > A question and answer guide to determining the best > fit > > for your organization - today and in the future. > > http://p.sf.net/sfu/internap-sfd2d > > -----La pièce jointe associée suit----- > > > > _______________________________________________ > > Gramps-devel mailing list > > Gra...@li... > > https://lists.sourceforge.net/lists/listinfo/gramps-devel > > > > > > > ------------------------------------------------------------------------------ > Colocation vs. Managed Hosting > A question and answer guide to determining the best fit > for your organization - today and in the future. > http://p.sf.net/sfu/internap-sfd2d > _______________________________________________ > Gramps-devel mailing list > Gra...@li... > https://lists.sourceforge.net/lists/listinfo/gramps-devel > |
From: Peter L. <pet...@te...> - 2011-03-21 17:26:34
|
Den Monday 21 March 2011 17.41.38 skrev jerome: > Oh, this was also present during testing ! > http://www.gramps-project.org/bugs/view.php?id=4491#c16831 > > But I suppose it was fixed on last tests. > Regression or not fixed, I am still stuck for finding the cause. :( Yes, but why does it work with English locale but not with non-English? Tested only French and Swedish so far. /Peter > --- En date de : Lun 21.3.11, jerome <rom...@ya...> a écrit : > > De: jerome <rom...@ya...> > > Objet: [Gramps-devel] Re : Filter editor in Gramps 3.3.0 > > À: "Gramps Development List" <gra...@li...>, "Peter > > Landgren" <pet...@te...> Date: Lundi 21 mars 2011, 17h31 > > > > > I have found a strange effect in > > > > the filter editor in > > > > > Swedish translation. The heading > > > "Allmämma filter" pops up twice. See attached screen > > > dump. > > > Under the first there is only one row connected to > > > > the > > > > > filter: > > > MatchesSourceConfidence > > > > > > Under the second "Allmänna filter" heading, all > > > > the > > > > > other filters are listed. > > > > > > It looks OK when I run with English locale. > > > > +1 in french > > > > I do not know why! > > > > I used the same string > > - category = _('General filters') - > > > > and the code is close to filter tag > > (see /gui/filtereditor.py). > > > > http://www.gramps-project.org/bugs/view.php?id=4491 > > > > > If I try to start with French locale I get a database > > > error. > > > > on database or crash on spell module ? > > > > > > Jérôme > > > > > > > > --- En date de : Lun 21.3.11, Peter Landgren <pet...@te...> > > > > a écrit : > > > De: Peter Landgren <pet...@te...> > > > Objet: [Gramps-devel] Filter editor in Gramps 3.3.0 > > > À: "Gramps Development List" <gra...@li...> > > > Date: Lundi 21 mars 2011, 12h19 > > > Hi, > > > > > > I have found a strange effect in the filter editor in > > > Swedish translation. The heading > > > "Allmämma filter" pops up twice. See attached screen > > > dump. > > > Under the first there is only one row connected to > > > > the > > > > > filter: > > > MatchesSourceConfidence > > > > > > Under the second "Allmänna filter" heading, all > > > > the > > > > > other filters are listed. > > > > > > It looks OK when I run with English locale. > > > > > > If I try to start with French locale I get a database > > > error. > > > > > > /Peter > > > > > > -----La pièce jointe associée suit----- > > > > ------------------------------------------------------------------------- > > ----- > > > > > Colocation vs. Managed Hosting > > > A question and answer guide to determining the best > > > > fit > > > > > for your organization - today and in the future. > > > http://p.sf.net/sfu/internap-sfd2d > > > -----La pièce jointe associée suit----- > > > > > > _______________________________________________ > > > Gramps-devel mailing list > > > Gra...@li... > > > https://lists.sourceforge.net/lists/listinfo/gramps-devel > > > > > > > > ------------------------------------------------------------------------- > > ----- Colocation vs. Managed Hosting > > A question and answer guide to determining the best fit > > for your organization - today and in the future. > > http://p.sf.net/sfu/internap-sfd2d > > _______________________________________________ > > Gramps-devel mailing list > > Gra...@li... > > https://lists.sourceforge.net/lists/listinfo/gramps-devel -- Peter Landgren Talken Hagen 671 94 BRUNSKOG 0570-530 21 070-345 0964 pet...@te... Skype: pgl4820.2 |
From: jerome <rom...@ya...> - 2011-03-21 17:41:37
|
A mystery! It is like we are listing one category/label as translated and the other in english, but translated via gettext, so displayed into our locale! --- En date de : Lun 21.3.11, Peter Landgren <pet...@te...> a écrit : > De: Peter Landgren <pet...@te...> > Objet: Re: [Gramps-devel] Re : Filter editor in Gramps 3.3.0 > À: "jerome" <rom...@ya...> > Cc: "Gramps Development List" <gra...@li...> > Date: Lundi 21 mars 2011, 18h30 > Den Monday 21 March 2011 17.41.38 > skrev jerome: > > Oh, this was also present during testing ! > > http://www.gramps-project.org/bugs/view.php?id=4491#c16831 > > > > But I suppose it was fixed on last tests. > > Regression or not fixed, I am still stuck for finding > the cause. :( > > Yes, but why does it work with English locale but not with > non-English? > Tested only French and Swedish so far. > > /Peter > > > > --- En date de : Lun 21.3.11, jerome <rom...@ya...> > a écrit : > > > De: jerome <rom...@ya...> > > > Objet: [Gramps-devel] Re : Filter editor in > Gramps 3.3.0 > > > À: "Gramps Development List" <gra...@li...>, > "Peter > > > Landgren" <pet...@te...> > Date: Lundi 21 mars 2011, 17h31 > > > > > > > I have found a strange effect in > > > > > > the filter editor in > > > > > > > Swedish translation. The heading > > > > "Allmämma filter" pops up twice. See > attached screen > > > > dump. > > > > Under the first there is only one row > connected to > > > > > > the > > > > > > > filter: > > > > MatchesSourceConfidence > > > > > > > > Under the second "Allmänna filter" > heading, all > > > > > > the > > > > > > > other filters are listed. > > > > > > > > It looks OK when I run with English locale. > > > > > > +1 in french > > > > > > I do not know why! > > > > > > I used the same string > > > - category = _('General > filters') - > > > > > > and the code is close to filter tag > > > (see /gui/filtereditor.py). > > > > > > http://www.gramps-project.org/bugs/view.php?id=4491 > > > > > > > If I try to start with French locale I get a > database > > > > error. > > > > > > on database or crash on spell module ? > > > > > > > > > Jérôme > > > > > > > > > > > > --- En date de : Lun 21.3.11, Peter Landgren > <pet...@te...> > > > > > > a écrit : > > > > De: Peter Landgren <pet...@te...> > > > > Objet: [Gramps-devel] Filter editor in > Gramps 3.3.0 > > > > À: "Gramps Development List" <gra...@li...> > > > > Date: Lundi 21 mars 2011, 12h19 > > > > Hi, > > > > > > > > I have found a strange effect in the filter > editor in > > > > Swedish translation. The heading > > > > "Allmämma filter" pops up twice. See > attached screen > > > > dump. > > > > Under the first there is only one row > connected to > > > > > > the > > > > > > > filter: > > > > MatchesSourceConfidence > > > > > > > > Under the second "Allmänna filter" > heading, all > > > > > > the > > > > > > > other filters are listed. > > > > > > > > It looks OK when I run with English locale. > > > > > > > > If I try to start with French locale I get a > database > > > > error. > > > > > > > > /Peter > > > > > > > > -----La pièce jointe associée suit----- > > > > > > > ------------------------------------------------------------------------- > > > ----- > > > > > > > Colocation vs. Managed Hosting > > > > A question and answer guide to determining > the best > > > > > > fit > > > > > > > for your organization - today and in the > future. > > > > http://p.sf.net/sfu/internap-sfd2d > > > > -----La pièce jointe associée suit----- > > > > > > > > > _______________________________________________ > > > > Gramps-devel mailing list > > > > Gra...@li... > > > > https://lists.sourceforge.net/lists/listinfo/gramps-devel > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > ----- Colocation vs. Managed Hosting > > > A question and answer guide to determining the > best fit > > > for your organization - today and in the future. > > > http://p.sf.net/sfu/internap-sfd2d > > > _______________________________________________ > > > Gramps-devel mailing list > > > Gra...@li... > > > https://lists.sourceforge.net/lists/listinfo/gramps-devel > > -- > Peter Landgren > Talken Hagen > 671 94 BRUNSKOG > 0570-530 21 > 070-345 0964 > pet...@te... > Skype: pgl4820.2 > |
From: Peter L. <pet...@te...> - 2011-03-21 20:14:19
|
Jerome, I think it's a code problem somewhere. If I change my translation from "Allmänna filter" to "Allmanna filter" the filter editor looks ok. I. e. make the translated string pure latin. /Peter Den Monday 21 March 2011 18.41.30 skrev jerome: > A mystery! > > It is like we are listing one category/label as translated and the other in > english, but translated via gettext, so displayed into our locale! > > --- En date de : Lun 21.3.11, Peter Landgren <pet...@te...> a écrit : > > De: Peter Landgren <pet...@te...> > > Objet: Re: [Gramps-devel] Re : Filter editor in Gramps 3.3.0 > > À: "jerome" <rom...@ya...> > > Cc: "Gramps Development List" <gra...@li...> > > Date: Lundi 21 mars 2011, 18h30 > > Den Monday 21 March 2011 17.41.38 > > > > skrev jerome: > > > Oh, this was also present during testing ! > > > http://www.gramps-project.org/bugs/view.php?id=4491#c16831 > > > > > > But I suppose it was fixed on last tests. > > > Regression or not fixed, I am still stuck for finding > > > > the cause. :( > > > > Yes, but why does it work with English locale but not with > > non-English? > > Tested only French and Swedish so far. > > > > /Peter > > > > > --- En date de : Lun 21.3.11, jerome <rom...@ya...> > > > > a écrit : > > > > De: jerome <rom...@ya...> > > > > Objet: [Gramps-devel] Re : Filter editor in > > > > Gramps 3.3.0 > > > > > > À: "Gramps Development List" <gra...@li...>, > > > > "Peter > > > > > > Landgren" <pet...@te...> > > > > Date: Lundi 21 mars 2011, 17h31 > > > > > > > I have found a strange effect in > > > > > > > > the filter editor in > > > > > > > > > Swedish translation. The heading > > > > > "Allmämma filter" pops up twice. See > > > > attached screen > > > > > > > dump. > > > > > Under the first there is only one row > > > > connected to > > > > > > the > > > > > > > > > filter: > > > > > MatchesSourceConfidence > > > > > > > > > > Under the second "Allmänna filter" > > > > heading, all > > > > > > the > > > > > > > > > other filters are listed. > > > > > > > > > > It looks OK when I run with English locale. > > > > > > > > +1 in french > > > > > > > > I do not know why! > > > > > > > > I used the same string > > > > > > > > - category = _('General > > > > filters') - > > > > > > and the code is close to filter tag > > > > (see /gui/filtereditor.py). > > > > > > > > http://www.gramps-project.org/bugs/view.php?id=4491 > > > > > > > > > If I try to start with French locale I get a > > > > database > > > > > > > error. > > > > > > > > on database or crash on spell module ? > > > > > > > > > > > > Jérôme > > > > > > > > > > > > > > > > --- En date de : Lun 21.3.11, Peter Landgren > > > > <pet...@te...> > > > > > > a écrit : > > > > > De: Peter Landgren <pet...@te...> > > > > > Objet: [Gramps-devel] Filter editor in > > > > Gramps 3.3.0 > > > > > > > À: "Gramps Development List" <gra...@li...> > > > > > Date: Lundi 21 mars 2011, 12h19 > > > > > Hi, > > > > > > > > > > I have found a strange effect in the filter > > > > editor in > > > > > > > Swedish translation. The heading > > > > > "Allmämma filter" pops up twice. See > > > > attached screen > > > > > > > dump. > > > > > Under the first there is only one row > > > > connected to > > > > > > the > > > > > > > > > filter: > > > > > MatchesSourceConfidence > > > > > > > > > > Under the second "Allmänna filter" > > > > heading, all > > > > > > the > > > > > > > > > other filters are listed. > > > > > > > > > > It looks OK when I run with English locale. > > > > > > > > > > If I try to start with French locale I get a > > > > database > > > > > > > error. > > > > > > > > > > /Peter > > > > > > > > > > -----La pièce jointe associée suit----- > > > > ------------------------------------------------------------------------- > > > > > > ----- > > > > > > > > > Colocation vs. Managed Hosting > > > > > A question and answer guide to determining > > > > the best > > > > > > fit > > > > > > > > > for your organization - today and in the > > > > future. > > > > > > > http://p.sf.net/sfu/internap-sfd2d > > > > > -----La pièce jointe associée suit----- > > > > _______________________________________________ > > > > > > > Gramps-devel mailing list > > > > > Gra...@li... > > > > > https://lists.sourceforge.net/lists/listinfo/gramps-devel > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > > > ----- Colocation vs. Managed Hosting > > > > A question and answer guide to determining the > > > > best fit > > > > > > for your organization - today and in the future. > > > > http://p.sf.net/sfu/internap-sfd2d > > > > _______________________________________________ > > > > Gramps-devel mailing list > > > > Gra...@li... > > > > https://lists.sourceforge.net/lists/listinfo/gramps-devel |
From: jerome <rom...@ya...> - 2011-03-21 21:04:35
|
Oh, french translation also uses non-ASCII characters on this string ! I see one reference to unicode on Filters/Rules/_Rule.py: def match_substring(self, param_index, str_var): # make str_var unicode so that search for ü works # see issue 3188 str_var = unicode(str_var) if self.list[param_index] and \ (str_var.upper().find(self.list[param_index].upper()) == -1): return False else: return True but this is not related, right ? http://www.gramps-project.org/bugs/view.php?id=3188 Else, I do not see any specific string use with category on gui/filtereditor.py. keys = sorted(the_map, by_rule_name, reverse=True) catlist = sorted(set(class_obj.category for class_obj in keys)) for category in catlist: top_node[category] = self.store.insert_after(None, last_top) top_level[category] = [] last_top = top_node[category] self.store.set(last_top, 0, category, 1, None) for class_obj in keys: category = class_obj.category top_level[category].append(class_obj.name) node = self.store.insert_after(top_node[category], prev) self.store.set(node, 0, class_obj.name, 1, class_obj) # if this is an edit rule, save the node if class_obj == self.sel_class: sel_node = (top_node[category], node) if sel_node: self.select_iter(sel_node) page = self.class2page[self.active_rule.__class__] self.notebook.set_current_page(page) self.display_values(self.active_rule.__class__) (class_obj, vallist, tlist) = self.page[page] r = self.active_rule.values() for i in range(0, min(len(tlist), len(r))): tlist[i].set_text(r[i]) Maybe on this 2 last lines ? Jérôme --- En date de : Lun 21.3.11, Peter Landgren <pet...@te...> a écrit : > De: Peter Landgren <pet...@te...> > Objet: Re: [Gramps-devel] Re : Filter editor in Gramps 3.3.0 > À: "jerome" <rom...@ya...> > Cc: "Gramps Development List" <gra...@li...> > Date: Lundi 21 mars 2011, 21h18 > Jerome, > > I think it's a code problem somewhere. > If I change my translation from "Allmänna filter" to > "Allmanna filter" the filter editor looks ok. > I. e. make the translated string pure latin. > > /Peter > > Den Monday 21 March 2011 18.41.30 skrev jerome: > > A mystery! > > > > It is like we are listing one category/label as > translated and the other in > > english, but translated via gettext, so displayed into > our locale! > > > > --- En date de : Lun 21.3.11, Peter Landgren <pet...@te...> > a écrit : > > > De: Peter Landgren <pet...@te...> > > > Objet: Re: [Gramps-devel] Re : Filter > editor in Gramps 3.3.0 > > > À: "jerome" <rom...@ya...> > > > Cc: "Gramps Development List" <gra...@li...> > > > Date: Lundi 21 mars 2011, 18h30 > > > Den Monday 21 March 2011 17.41.38 > > > > > > skrev jerome: > > > > Oh, this was also present during testing ! > > > > http://www.gramps-project.org/bugs/view.php?id=4491#c16831 > > > > > > > > But I suppose it was fixed on last tests. > > > > Regression or not fixed, I am still stuck > for finding > > > > > > the cause. :( > > > > > > Yes, but why does it work with English locale but > not with > > > non-English? > > > Tested only French and Swedish so far. > > > > > > /Peter > > > > > > > --- En date de : Lun 21.3.11, jerome <rom...@ya...> > > > > > > a écrit : > > > > > De: jerome <rom...@ya...> > > > > > Objet: [Gramps-devel] Re : Filter > editor in > > > > > > Gramps 3.3.0 > > > > > > > > À: "Gramps Development List" <gra...@li...>, > > > > > > "Peter > > > > > > > > Landgren" <pet...@te...> > > > > > > Date: Lundi 21 mars 2011, 17h31 > > > > > > > > > I have found a strange effect in > > > > > > > > > > the filter editor in > > > > > > > > > > > Swedish translation. The heading > > > > > > "Allmämma filter" pops up twice. > See > > > > > > attached screen > > > > > > > > > dump. > > > > > > Under the first there is only one > row > > > > > > connected to > > > > > > > > the > > > > > > > > > > > filter: > > > > > > MatchesSourceConfidence > > > > > > > > > > > > Under the second "Allmänna > filter" > > > > > > heading, all > > > > > > > > the > > > > > > > > > > > other filters are listed. > > > > > > > > > > > > It looks OK when I run with > English locale. > > > > > > > > > > +1 in french > > > > > > > > > > I do not know why! > > > > > > > > > > I used the same string > > > > > > > > > > - category = > _('General > > > > > > filters') - > > > > > > > > and the code is close to filter tag > > > > > (see /gui/filtereditor.py). > > > > > > > > > > http://www.gramps-project.org/bugs/view.php?id=4491 > > > > > > > > > > > If I try to start with French > locale I get a > > > > > > database > > > > > > > > > error. > > > > > > > > > > on database or crash on spell module ? > > > > > > > > > > > > > > > Jérôme > > > > > > > > > > > > > > > > > > > > --- En date de : Lun 21.3.11, Peter > Landgren > > > > > > <pet...@te...> > > > > > > > > a écrit : > > > > > > De: Peter Landgren <pet...@te...> > > > > > > Objet: [Gramps-devel] Filter > editor in > > > > > > Gramps 3.3.0 > > > > > > > > > À: "Gramps Development List" > <gra...@li...> > > > > > > Date: Lundi 21 mars 2011, 12h19 > > > > > > Hi, > > > > > > > > > > > > I have found a strange effect in > the filter > > > > > > editor in > > > > > > > > > Swedish translation. The heading > > > > > > "Allmämma filter" pops up twice. > See > > > > > > attached screen > > > > > > > > > dump. > > > > > > Under the first there is only one > row > > > > > > connected to > > > > > > > > the > > > > > > > > > > > filter: > > > > > > MatchesSourceConfidence > > > > > > > > > > > > Under the second "Allmänna > filter" > > > > > > heading, all > > > > > > > > the > > > > > > > > > > > other filters are listed. > > > > > > > > > > > > It looks OK when I run with > English locale. > > > > > > > > > > > > If I try to start with French > locale I get a > > > > > > database > > > > > > > > > error. > > > > > > > > > > > > /Peter > > > > > > > > > > > > -----La pièce jointe associée > suit----- > > > > > > > ------------------------------------------------------------------------- > > > > > > > > ----- > > > > > > > > > > > Colocation vs. Managed Hosting > > > > > > A question and answer guide to > determining > > > > > > the best > > > > > > > > fit > > > > > > > > > > > for your organization - today and > in the > > > > > > future. > > > > > > > > > http://p.sf.net/sfu/internap-sfd2d > > > > > > -----La pièce jointe associée > suit----- > > > > > > _______________________________________________ > > > > > > > > > Gramps-devel mailing list > > > > > > Gra...@li... > > > > > > https://lists.sourceforge.net/lists/listinfo/gramps-devel > > > > > > > > > > > > > > > > > ------------------------------------------------------------------------- > > > > > > > > ----- Colocation vs. Managed Hosting > > > > > A question and answer guide to > determining the > > > > > > best fit > > > > > > > > for your organization - today and in > the future. > > > > > http://p.sf.net/sfu/internap-sfd2d > > > > > > _______________________________________________ > > > > > Gramps-devel mailing list > > > > > Gra...@li... > > > > > https://lists.sourceforge.net/lists/listinfo/gramps-devel > |
From: Gary B. <bur...@ya...> - 2011-03-22 00:12:22
|
Hello Jerome/Peter I don't have a solution but some observations. I looked in fr.po but did not see any translation of the category for MatchesSourceConfidenceBase which the MatchesSourceConfidence filter inherits. Why is that? I also looked at this line in filtereditor.py: catlist = sorted(set(class_obj.category for class_obj in keys)) I see that all the categories in the list are of type unicode except that for MatchesSourceConfidence which is of type str. This explains why you see two translations of 'General filters' - one is unicode, the other is not. But I don't see where the str value is coming from yet. Bye Gary |
From: Jérôme <rom...@ya...> - 2011-03-22 10:19:03
|
Hi Gary, > I looked in fr.po but did not see any translation of the category for > which the MatchesSourceConfidence filter inherits. > Why is that? MatchesSourceConfidenceBase reference is on POTFILES.skip because all 'base' filter rules are not visible for the user. So, do not need to translate something not visible. We use a generic sentence 'Matches Object' but this will not be displayed under Filter Editor and do not need to add unused strings on translations ! We also skip debug plugins and some modules with pure python code or already translated (DB, API, some widgets, localized handlers like Relationships and Date, etc ...) For the user, we have: #: ../src/Filters/Rules/Person/_MatchesSourceConfidence.py:41 #: ../src/Filters/Rules/Family/_MatchesSourceConfidence.py:41 #: ../src/Filters/Rules/Event/_MatchesSourceConfidence.py:42 msgid "Confidence level:" msgstr "Niveau de confiance :" # trunk #: ../src/Filters/Rules/Person/_MatchesSourceConfidence.py:42 msgid "Persons with at least one direct source >= <confidence level>" msgstr "Individus avec au moins une source directe >= à <niveau de confiance>" # trunk #: ../src/Filters/Rules/Person/_MatchesSourceConfidence.py:43 msgid "Matches persons with at least one direct source with confidence level(s)" msgstr "Correspond aux individus ayant au moins une source directe avec des niveaux de confiance " # utilise correspondre pour to match, plus facile que être compatible ou concorder dans ce contexte #: ../src/Filters/Rules/Event/_MatchesSourceConfidence.py:44 msgid "Matches events with at least one direct source with confidence level(s)" msgstr "Correspond aux événements ayant au moins une source directe avec des niveaux de confiance " And our category: "General filters"! Note, you are right, "General filters" string is ignored !!! But also translated because string is already listed. #: ../src/plugins/quickview/SameSurnames.py:41 #: ../src/plugins/quickview/SameSurnames.py:53 #: ../src/plugins/quickview/SameSurnames.py:66 #: ../src/plugins/quickview/SameSurnames.py:83 #: ../src/Filters/Rules/_Everything.py:46 #: ../src/Filters/Rules/_HasGrampsId.py:49 #: ../src/Filters/Rules/_HasTextMatchingSubstringOf.py:49 #: ../src/Filters/Rules/_IsPrivate.py:45 #: ../src/Filters/Rules/Person/_Disconnected.py:46 #: ../src/Filters/Rules/Person/_Everyone.py:46 #: ../src/Filters/Rules/Person/_HasAddress.py:49 #: ../src/Filters/Rules/Person/_HasAlternateName.py:45 #: ../src/Filters/Rules/Person/_HasAssociation.py:49 #: ../src/Filters/Rules/Person/_HasFamilyAttribute.py:49 #: ../src/Filters/Rules/Person/_HasNameOf.py:62 #: ../src/Filters/Rules/Person/_HasNameOriginType.py:47 #: ../src/Filters/Rules/Person/_HasNameType.py:47 #: ../src/Filters/Rules/Person/_HasNickname.py:45 #: ../src/Filters/Rules/Person/_HasSourceOf.py:47 #: ../src/Filters/Rules/Person/_HasTextMatchingSubstringOf.py:50 #: ../src/Filters/Rules/Person/_HasUnknownGender.py:47 #: ../src/Filters/Rules/Person/_IncompleteNames.py:47 #: ../src/Filters/Rules/Person/_IsBookmarked.py:47 #: ../src/Filters/Rules/Person/_IsDefaultPerson.py:46 #: ../src/Filters/Rules/Person/_IsFemale.py:47 #: ../src/Filters/Rules/Person/_IsMale.py:47 #: ../src/Filters/Rules/Person/_MatchesEventFilter.py:56 #: ../src/Filters/Rules/Person/_MatchIdOf.py:48 #: ../src/Filters/Rules/Person/_NoBirthdate.py:45 #: ../src/Filters/Rules/Person/_NoDeathdate.py:45 #: ../src/Filters/Rules/Person/_PeoplePrivate.py:45 #: ../src/Filters/Rules/Person/_ProbablyAlive.py:48 #: ../src/Filters/Rules/Person/_RegExpName.py:50 #: ../src/Filters/Rules/Person/_SearchName.py:49 #: ../src/Filters/Rules/Family/_HasRelType.py:50 #: ../src/Filters/Rules/Family/_IsBookmarked.py:46 #: ../src/Filters/Rules/Event/_HasData.py:51 #: ../src/Filters/Rules/Event/_HasType.py:49 #: ../src/Filters/Rules/Event/_MatchesPersonFilter.py:55 #: ../src/Filters/Rules/Event/_MatchesSourceFilter.py:52 #: ../src/Filters/Rules/Place/_HasPlace.py:60 #: ../src/Filters/Rules/Place/_MatchesEventFilter.py:54 #: ../src/Filters/Rules/Source/_HasRepository.py:47 #: ../src/Filters/Rules/Source/_HasSource.py:51 #: ../src/Filters/Rules/MediaObject/_HasMedia.py:54 #: ../src/Filters/Rules/Repository/_HasRepo.py:54 #: ../src/Filters/Rules/Note/_MatchesSubstringOf.py:48 #: ../src/Filters/Rules/Note/_MatchesRegexpOf.py:48 #: ../src/Filters/Rules/Note/_HasNote.py:52 msgid "General filters" msgstr "Filtres généraux" These rules use the same 'filter' class as _HasTag rules (_HasTagBase), which does not return this duplicated category ! Yes, the problem is on 'MatchesSourceConfidence' code. > I see that all the categories in the list are of type unicode except that for > MatchesSourceConfidence which is of type str. type string ! On mapping, right ? elif v == _('Confidence level:'): t = MyList(map(str, range(5)), [Utils.confidence[i] for i in range(5)]) > But I don't see where the str value is coming from yet. We experimented some ways for returning keys on the related feature request[1] and there is some 'shortcuts' on the code but the idea was: for i in range(5): if conf == i and self.list[0] == str(i) I suppose that's why unicode was not forced... I guess: MyList(map(str, range(5)) should be MyList(map(unicode(str), range(5)) will fix this problem ? Note, I suppose these rules is a possible way for handling our source references. This does not match all requests from user mailing list and I remember Helge request about cross searchs with source title and repositories[2], but this may be useful. [1] http://www.gramps-project.org/bugs/view.php?id=4491 [2] http://www.gramps-project.org/bugs/view.php?id=4698 Thanks! Jérôme Gary Burton a écrit : > Hello Jerome/Peter > > I don't have a solution but some observations. > > I looked in fr.po but did not see any translation of the category for > MatchesSourceConfidenceBase which the MatchesSourceConfidence filter inherits. > Why is that? > > I also looked at this line in filtereditor.py: > > catlist = sorted(set(class_obj.category for class_obj in keys)) > > I see that all the categories in the list are of type unicode except that for > MatchesSourceConfidence which is of type str. This explains why you see two > translations of 'General filters' - one is unicode, the other is not. But I > don't see where the str value is coming from yet. > > Bye > > Gary > > > > |
From: Peter L. <pet...@te...> - 2011-03-22 14:14:34
|
Jerome, Gary, If I in _MatchesSourceConfidenceBase.py, line 47 replace category = _('General filters') with category = unicode(_('General filters')) No problem any more, but don't why it's necessary for just this place??? /Peter > Hi Gary, > > > I looked in fr.po but did not see any translation of the category for > > > > which the MatchesSourceConfidence filter inherits. > > > > Why is that? > > MatchesSourceConfidenceBase reference is on POTFILES.skip because all > 'base' filter rules are not visible for the user. So, do not need to > translate something not visible. We use a generic sentence 'Matches > Object' but this will not be displayed under Filter Editor and do not > need to add unused strings on translations ! > > We also skip debug plugins and some modules with pure python code or > already translated (DB, API, some widgets, localized handlers like > Relationships and Date, etc ...) > > > For the user, we have: > > #: ../src/Filters/Rules/Person/_MatchesSourceConfidence.py:41 > #: ../src/Filters/Rules/Family/_MatchesSourceConfidence.py:41 > #: ../src/Filters/Rules/Event/_MatchesSourceConfidence.py:42 > msgid "Confidence level:" > msgstr "Niveau de confiance :" > > # trunk > #: ../src/Filters/Rules/Person/_MatchesSourceConfidence.py:42 > msgid "Persons with at least one direct source >= <confidence level>" > msgstr "Individus avec au moins une source directe >= à <niveau de > confiance>" > > # trunk > #: ../src/Filters/Rules/Person/_MatchesSourceConfidence.py:43 > msgid "Matches persons with at least one direct source with confidence > level(s)" > msgstr "Correspond aux individus ayant au moins une source directe avec > des niveaux de confiance " > > # utilise correspondre pour to match, plus facile que être compatible ou > concorder dans ce contexte > #: ../src/Filters/Rules/Event/_MatchesSourceConfidence.py:44 > msgid "Matches events with at least one direct source with confidence > level(s)" > msgstr "Correspond aux événements ayant au moins une source directe avec > des niveaux de confiance " > > And our category: "General filters"! > > Note, you are right, "General filters" string is ignored !!! > But also translated because string is already listed. > > #: ../src/plugins/quickview/SameSurnames.py:41 > #: ../src/plugins/quickview/SameSurnames.py:53 > #: ../src/plugins/quickview/SameSurnames.py:66 > #: ../src/plugins/quickview/SameSurnames.py:83 > #: ../src/Filters/Rules/_Everything.py:46 > #: ../src/Filters/Rules/_HasGrampsId.py:49 > #: ../src/Filters/Rules/_HasTextMatchingSubstringOf.py:49 > #: ../src/Filters/Rules/_IsPrivate.py:45 > #: ../src/Filters/Rules/Person/_Disconnected.py:46 > #: ../src/Filters/Rules/Person/_Everyone.py:46 > #: ../src/Filters/Rules/Person/_HasAddress.py:49 > #: ../src/Filters/Rules/Person/_HasAlternateName.py:45 > #: ../src/Filters/Rules/Person/_HasAssociation.py:49 > #: ../src/Filters/Rules/Person/_HasFamilyAttribute.py:49 > #: ../src/Filters/Rules/Person/_HasNameOf.py:62 > #: ../src/Filters/Rules/Person/_HasNameOriginType.py:47 > #: ../src/Filters/Rules/Person/_HasNameType.py:47 > #: ../src/Filters/Rules/Person/_HasNickname.py:45 > #: ../src/Filters/Rules/Person/_HasSourceOf.py:47 > #: ../src/Filters/Rules/Person/_HasTextMatchingSubstringOf.py:50 > #: ../src/Filters/Rules/Person/_HasUnknownGender.py:47 > #: ../src/Filters/Rules/Person/_IncompleteNames.py:47 > #: ../src/Filters/Rules/Person/_IsBookmarked.py:47 > #: ../src/Filters/Rules/Person/_IsDefaultPerson.py:46 > #: ../src/Filters/Rules/Person/_IsFemale.py:47 > #: ../src/Filters/Rules/Person/_IsMale.py:47 > #: ../src/Filters/Rules/Person/_MatchesEventFilter.py:56 > #: ../src/Filters/Rules/Person/_MatchIdOf.py:48 > #: ../src/Filters/Rules/Person/_NoBirthdate.py:45 > #: ../src/Filters/Rules/Person/_NoDeathdate.py:45 > #: ../src/Filters/Rules/Person/_PeoplePrivate.py:45 > #: ../src/Filters/Rules/Person/_ProbablyAlive.py:48 > #: ../src/Filters/Rules/Person/_RegExpName.py:50 > #: ../src/Filters/Rules/Person/_SearchName.py:49 > #: ../src/Filters/Rules/Family/_HasRelType.py:50 > #: ../src/Filters/Rules/Family/_IsBookmarked.py:46 > #: ../src/Filters/Rules/Event/_HasData.py:51 > #: ../src/Filters/Rules/Event/_HasType.py:49 > #: ../src/Filters/Rules/Event/_MatchesPersonFilter.py:55 > #: ../src/Filters/Rules/Event/_MatchesSourceFilter.py:52 > #: ../src/Filters/Rules/Place/_HasPlace.py:60 > #: ../src/Filters/Rules/Place/_MatchesEventFilter.py:54 > #: ../src/Filters/Rules/Source/_HasRepository.py:47 > #: ../src/Filters/Rules/Source/_HasSource.py:51 > #: ../src/Filters/Rules/MediaObject/_HasMedia.py:54 > #: ../src/Filters/Rules/Repository/_HasRepo.py:54 > #: ../src/Filters/Rules/Note/_MatchesSubstringOf.py:48 > #: ../src/Filters/Rules/Note/_MatchesRegexpOf.py:48 > #: ../src/Filters/Rules/Note/_HasNote.py:52 > msgid "General filters" > msgstr "Filtres généraux" > > > These rules use the same 'filter' class as _HasTag rules (_HasTagBase), > which does not return this duplicated category ! Yes, the problem is on > 'MatchesSourceConfidence' code. > > > I see that all the categories in the list are of type unicode except that > > for MatchesSourceConfidence which is of type str. > > type string ! > On mapping, right ? > > elif v == _('Confidence level:'): > t = MyList(map(str, range(5)), > [Utils.confidence[i] for i in range(5)]) > > > But I don't see where the str value is coming from yet. > > We experimented some ways for returning keys on the related feature > request[1] and there is some 'shortcuts' on the code but the idea was: > for i in range(5): > if conf == i and self.list[0] == str(i) > > I suppose that's why unicode was not forced... > > I guess: > > MyList(map(str, range(5)) > should be > MyList(map(unicode(str), range(5)) > > will fix this problem ? > > > > Note, I suppose these rules is a possible way for handling our source > references. This does not match all requests from user mailing list and > I remember Helge request about cross searchs with source title and > repositories[2], but this may be useful. > > > [1] http://www.gramps-project.org/bugs/view.php?id=4491 > [2] http://www.gramps-project.org/bugs/view.php?id=4698 > > > Thanks! > Jérôme > > Gary Burton a écrit : > > Hello Jerome/Peter > > > > I don't have a solution but some observations. > > > > I looked in fr.po but did not see any translation of the category for > > MatchesSourceConfidenceBase which the MatchesSourceConfidence filter > > inherits. Why is that? > > > > I also looked at this line in filtereditor.py: > > > > catlist = sorted(set(class_obj.category for class_obj in keys)) > > > > I see that all the categories in the list are of type unicode except that > > for MatchesSourceConfidence which is of type str. This explains why you > > see two translations of 'General filters' - one is unicode, the other is > > not. But I don't see where the str value is coming from yet. > > > > Bye > > > > Gary |
From: jerome <rom...@ya...> - 2011-03-22 14:31:59
|
Gary pointed out the string use on filtereditor: MyList(map(str, range(5)) I suppose it is because the 'base' class is called by the rules (person, family, event) ? An alternative was maybe to set the category on the rules or to use something like from gettext import ugettext as _ on MatchesSourceConfidenceBase.py, even this file is not really translated... Maybe the other alternative might be to add this file reference on POTFILES.in ? Then maybe we do not lost this string on an other dimension! Jérôme --- En date de : Mar 22.3.11, Peter Landgren <pet...@te...> a écrit : > De: Peter Landgren <pet...@te...> > Objet: Re: [Gramps-devel] Re : Filter editor in Gramps 3.3.0 > À: rom...@ya... > Cc: "Gary Burton" <bur...@ya...>, "Gramps Development List" <gra...@li...> > Date: Mardi 22 mars 2011, 15h18 > Jerome, Gary, > > > If I in _MatchesSourceConfidenceBase.py, line 47 > replace > category = _('General filters') > with > category = unicode(_('General > filters')) > > No problem any more, but don't why it's necessary for just > this place??? > > /Peter > > > > Hi Gary, > > > > > I looked in fr.po but did not see any translation > of the category for > > > > > > which the MatchesSourceConfidence filter > inherits. > > > > > > Why is that? > > > > MatchesSourceConfidenceBase reference is on > POTFILES.skip because all > > 'base' filter rules are not visible for the user. So, > do not need to > > translate something not visible. We use a generic > sentence 'Matches > > Object' but this will not be displayed under Filter > Editor and do not > > need to add unused strings on translations ! > > > > We also skip debug plugins and some modules with pure > python code or > > already translated (DB, API, some widgets, localized > handlers like > > Relationships and Date, etc ...) > > > > > > For the user, we have: > > > > #: > ../src/Filters/Rules/Person/_MatchesSourceConfidence.py:41 > > #: > ../src/Filters/Rules/Family/_MatchesSourceConfidence.py:41 > > #: > ../src/Filters/Rules/Event/_MatchesSourceConfidence.py:42 > > msgid "Confidence level:" > > msgstr "Niveau de confiance :" > > > > # trunk > > #: > ../src/Filters/Rules/Person/_MatchesSourceConfidence.py:42 > > msgid "Persons with at least one direct source >= > <confidence level>" > > msgstr "Individus avec au moins une source directe > >= à <niveau de > > confiance>" > > > > # trunk > > #: > ../src/Filters/Rules/Person/_MatchesSourceConfidence.py:43 > > msgid "Matches persons with at least one direct source > with confidence > > level(s)" > > msgstr "Correspond aux individus ayant au moins une > source directe avec > > des niveaux de confiance " > > > > # utilise correspondre pour to match, plus facile que > être compatible ou > > concorder dans ce contexte > > #: > ../src/Filters/Rules/Event/_MatchesSourceConfidence.py:44 > > msgid "Matches events with at least one direct source > with confidence > > level(s)" > > msgstr "Correspond aux événements ayant au moins une > source directe avec > > des niveaux de confiance " > > > > And our category: "General filters"! > > > > Note, you are right, "General filters" string is > ignored !!! > > But also translated because string is already listed. > > > > #: ../src/plugins/quickview/SameSurnames.py:41 > > #: ../src/plugins/quickview/SameSurnames.py:53 > > #: ../src/plugins/quickview/SameSurnames.py:66 > > #: ../src/plugins/quickview/SameSurnames.py:83 > > #: ../src/Filters/Rules/_Everything.py:46 > > #: ../src/Filters/Rules/_HasGrampsId.py:49 > > #: > ../src/Filters/Rules/_HasTextMatchingSubstringOf.py:49 > > #: ../src/Filters/Rules/_IsPrivate.py:45 > > #: ../src/Filters/Rules/Person/_Disconnected.py:46 > > #: ../src/Filters/Rules/Person/_Everyone.py:46 > > #: ../src/Filters/Rules/Person/_HasAddress.py:49 > > #: > ../src/Filters/Rules/Person/_HasAlternateName.py:45 > > #: ../src/Filters/Rules/Person/_HasAssociation.py:49 > > #: > ../src/Filters/Rules/Person/_HasFamilyAttribute.py:49 > > #: ../src/Filters/Rules/Person/_HasNameOf.py:62 > > #: > ../src/Filters/Rules/Person/_HasNameOriginType.py:47 > > #: ../src/Filters/Rules/Person/_HasNameType.py:47 > > #: ../src/Filters/Rules/Person/_HasNickname.py:45 > > #: ../src/Filters/Rules/Person/_HasSourceOf.py:47 > > #: > ../src/Filters/Rules/Person/_HasTextMatchingSubstringOf.py:50 > > #: > ../src/Filters/Rules/Person/_HasUnknownGender.py:47 > > #: ../src/Filters/Rules/Person/_IncompleteNames.py:47 > > #: ../src/Filters/Rules/Person/_IsBookmarked.py:47 > > #: ../src/Filters/Rules/Person/_IsDefaultPerson.py:46 > > #: ../src/Filters/Rules/Person/_IsFemale.py:47 > > #: ../src/Filters/Rules/Person/_IsMale.py:47 > > #: > ../src/Filters/Rules/Person/_MatchesEventFilter.py:56 > > #: ../src/Filters/Rules/Person/_MatchIdOf.py:48 > > #: ../src/Filters/Rules/Person/_NoBirthdate.py:45 > > #: ../src/Filters/Rules/Person/_NoDeathdate.py:45 > > #: ../src/Filters/Rules/Person/_PeoplePrivate.py:45 > > #: ../src/Filters/Rules/Person/_ProbablyAlive.py:48 > > #: ../src/Filters/Rules/Person/_RegExpName.py:50 > > #: ../src/Filters/Rules/Person/_SearchName.py:49 > > #: ../src/Filters/Rules/Family/_HasRelType.py:50 > > #: ../src/Filters/Rules/Family/_IsBookmarked.py:46 > > #: ../src/Filters/Rules/Event/_HasData.py:51 > > #: ../src/Filters/Rules/Event/_HasType.py:49 > > #: > ../src/Filters/Rules/Event/_MatchesPersonFilter.py:55 > > #: > ../src/Filters/Rules/Event/_MatchesSourceFilter.py:52 > > #: ../src/Filters/Rules/Place/_HasPlace.py:60 > > #: > ../src/Filters/Rules/Place/_MatchesEventFilter.py:54 > > #: ../src/Filters/Rules/Source/_HasRepository.py:47 > > #: ../src/Filters/Rules/Source/_HasSource.py:51 > > #: ../src/Filters/Rules/MediaObject/_HasMedia.py:54 > > #: ../src/Filters/Rules/Repository/_HasRepo.py:54 > > #: > ../src/Filters/Rules/Note/_MatchesSubstringOf.py:48 > > #: ../src/Filters/Rules/Note/_MatchesRegexpOf.py:48 > > #: ../src/Filters/Rules/Note/_HasNote.py:52 > > msgid "General filters" > > msgstr "Filtres généraux" > > > > > > These rules use the same 'filter' class as _HasTag > rules (_HasTagBase), > > which does not return this duplicated category ! Yes, > the problem is on > > 'MatchesSourceConfidence' code. > > > > > I see that all the categories in the list are of > type unicode except that > > > for MatchesSourceConfidence which is of type > str. > > > > type string ! > > On mapping, right ? > > > > elif v == _('Confidence level:'): > > t = MyList(map(str, range(5)), > > > [Utils.confidence[i] for i in range(5)]) > > > > > But I don't see where the str value is coming > from yet. > > > > We experimented some ways for returning keys on the > related feature > > request[1] and there is some 'shortcuts' on the code > but the idea was: > > for i in range(5): > > if conf == i and self.list[0] == > str(i) > > > > I suppose that's why unicode was not forced... > > > > I guess: > > > > MyList(map(str, range(5)) > > should be > > MyList(map(unicode(str), range(5)) > > > > will fix this problem ? > > > > > > > > Note, I suppose these rules is a possible way for > handling our source > > references. This does not match all requests from user > mailing list and > > I remember Helge request about cross searchs with > source title and > > repositories[2], but this may be useful. > > > > > > [1] http://www.gramps-project.org/bugs/view.php?id=4491 > > [2] http://www.gramps-project.org/bugs/view.php?id=4698 > > > > > > Thanks! > > Jérôme > > > > Gary Burton a écrit : > > > Hello Jerome/Peter > > > > > > I don't have a solution but some observations. > > > > > > I looked in fr.po but did not see any translation > of the category for > > > MatchesSourceConfidenceBase which the > MatchesSourceConfidence filter > > > inherits. Why is that? > > > > > > I also looked at this line in filtereditor.py: > > > > > > catlist = sorted(set(class_obj.category for > class_obj in keys)) > > > > > > I see that all the categories in the list are of > type unicode except that > > > for MatchesSourceConfidence which is of type str. > This explains why you > > > see two translations of 'General filters' - one > is unicode, the other is > > > not. But I don't see where the str value is > coming from yet. > > > > > > Bye > > > > > > Gary > |
From: Peter L. <pet...@te...> - 2011-03-22 14:30:10
|
Also If I change in_MatchesSourceConfidenceBase.py from gettext import gettext as _ to from gen.ggettext import sgettext as _ Everything is OK. /Peter > Hi Gary, > > > I looked in fr.po but did not see any translation of the category for > > > > which the MatchesSourceConfidence filter inherits. > > > > Why is that? > > MatchesSourceConfidenceBase reference is on POTFILES.skip because all > 'base' filter rules are not visible for the user. So, do not need to > translate something not visible. We use a generic sentence 'Matches > Object' but this will not be displayed under Filter Editor and do not > need to add unused strings on translations ! > > We also skip debug plugins and some modules with pure python code or > already translated (DB, API, some widgets, localized handlers like > Relationships and Date, etc ...) > > > For the user, we have: > > #: ../src/Filters/Rules/Person/_MatchesSourceConfidence.py:41 > #: ../src/Filters/Rules/Family/_MatchesSourceConfidence.py:41 > #: ../src/Filters/Rules/Event/_MatchesSourceConfidence.py:42 > msgid "Confidence level:" > msgstr "Niveau de confiance :" > > # trunk > #: ../src/Filters/Rules/Person/_MatchesSourceConfidence.py:42 > msgid "Persons with at least one direct source >= <confidence level>" > msgstr "Individus avec au moins une source directe >= à <niveau de > confiance>" > > # trunk > #: ../src/Filters/Rules/Person/_MatchesSourceConfidence.py:43 > msgid "Matches persons with at least one direct source with confidence > level(s)" > msgstr "Correspond aux individus ayant au moins une source directe avec > des niveaux de confiance " > > # utilise correspondre pour to match, plus facile que être compatible ou > concorder dans ce contexte > #: ../src/Filters/Rules/Event/_MatchesSourceConfidence.py:44 > msgid "Matches events with at least one direct source with confidence > level(s)" > msgstr "Correspond aux événements ayant au moins une source directe avec > des niveaux de confiance " > > And our category: "General filters"! > > Note, you are right, "General filters" string is ignored !!! > But also translated because string is already listed. > > #: ../src/plugins/quickview/SameSurnames.py:41 > #: ../src/plugins/quickview/SameSurnames.py:53 > #: ../src/plugins/quickview/SameSurnames.py:66 > #: ../src/plugins/quickview/SameSurnames.py:83 > #: ../src/Filters/Rules/_Everything.py:46 > #: ../src/Filters/Rules/_HasGrampsId.py:49 > #: ../src/Filters/Rules/_HasTextMatchingSubstringOf.py:49 > #: ../src/Filters/Rules/_IsPrivate.py:45 > #: ../src/Filters/Rules/Person/_Disconnected.py:46 > #: ../src/Filters/Rules/Person/_Everyone.py:46 > #: ../src/Filters/Rules/Person/_HasAddress.py:49 > #: ../src/Filters/Rules/Person/_HasAlternateName.py:45 > #: ../src/Filters/Rules/Person/_HasAssociation.py:49 > #: ../src/Filters/Rules/Person/_HasFamilyAttribute.py:49 > #: ../src/Filters/Rules/Person/_HasNameOf.py:62 > #: ../src/Filters/Rules/Person/_HasNameOriginType.py:47 > #: ../src/Filters/Rules/Person/_HasNameType.py:47 > #: ../src/Filters/Rules/Person/_HasNickname.py:45 > #: ../src/Filters/Rules/Person/_HasSourceOf.py:47 > #: ../src/Filters/Rules/Person/_HasTextMatchingSubstringOf.py:50 > #: ../src/Filters/Rules/Person/_HasUnknownGender.py:47 > #: ../src/Filters/Rules/Person/_IncompleteNames.py:47 > #: ../src/Filters/Rules/Person/_IsBookmarked.py:47 > #: ../src/Filters/Rules/Person/_IsDefaultPerson.py:46 > #: ../src/Filters/Rules/Person/_IsFemale.py:47 > #: ../src/Filters/Rules/Person/_IsMale.py:47 > #: ../src/Filters/Rules/Person/_MatchesEventFilter.py:56 > #: ../src/Filters/Rules/Person/_MatchIdOf.py:48 > #: ../src/Filters/Rules/Person/_NoBirthdate.py:45 > #: ../src/Filters/Rules/Person/_NoDeathdate.py:45 > #: ../src/Filters/Rules/Person/_PeoplePrivate.py:45 > #: ../src/Filters/Rules/Person/_ProbablyAlive.py:48 > #: ../src/Filters/Rules/Person/_RegExpName.py:50 > #: ../src/Filters/Rules/Person/_SearchName.py:49 > #: ../src/Filters/Rules/Family/_HasRelType.py:50 > #: ../src/Filters/Rules/Family/_IsBookmarked.py:46 > #: ../src/Filters/Rules/Event/_HasData.py:51 > #: ../src/Filters/Rules/Event/_HasType.py:49 > #: ../src/Filters/Rules/Event/_MatchesPersonFilter.py:55 > #: ../src/Filters/Rules/Event/_MatchesSourceFilter.py:52 > #: ../src/Filters/Rules/Place/_HasPlace.py:60 > #: ../src/Filters/Rules/Place/_MatchesEventFilter.py:54 > #: ../src/Filters/Rules/Source/_HasRepository.py:47 > #: ../src/Filters/Rules/Source/_HasSource.py:51 > #: ../src/Filters/Rules/MediaObject/_HasMedia.py:54 > #: ../src/Filters/Rules/Repository/_HasRepo.py:54 > #: ../src/Filters/Rules/Note/_MatchesSubstringOf.py:48 > #: ../src/Filters/Rules/Note/_MatchesRegexpOf.py:48 > #: ../src/Filters/Rules/Note/_HasNote.py:52 > msgid "General filters" > msgstr "Filtres généraux" > > > These rules use the same 'filter' class as _HasTag rules (_HasTagBase), > which does not return this duplicated category ! Yes, the problem is on > 'MatchesSourceConfidence' code. > > > I see that all the categories in the list are of type unicode except that > > for MatchesSourceConfidence which is of type str. > > type string ! > On mapping, right ? > > elif v == _('Confidence level:'): > t = MyList(map(str, range(5)), > [Utils.confidence[i] for i in range(5)]) > > > But I don't see where the str value is coming from yet. > > We experimented some ways for returning keys on the related feature > request[1] and there is some 'shortcuts' on the code but the idea was: > for i in range(5): > if conf == i and self.list[0] == str(i) > > I suppose that's why unicode was not forced... > > I guess: > > MyList(map(str, range(5)) > should be > MyList(map(unicode(str), range(5)) > > will fix this problem ? > > > > Note, I suppose these rules is a possible way for handling our source > references. This does not match all requests from user mailing list and > I remember Helge request about cross searchs with source title and > repositories[2], but this may be useful. > > > [1] http://www.gramps-project.org/bugs/view.php?id=4491 > [2] http://www.gramps-project.org/bugs/view.php?id=4698 > > > Thanks! > Jérôme > > Gary Burton a écrit : > > Hello Jerome/Peter > > > > I don't have a solution but some observations. > > > > I looked in fr.po but did not see any translation of the category for > > MatchesSourceConfidenceBase which the MatchesSourceConfidence filter > > inherits. Why is that? > > > > I also looked at this line in filtereditor.py: > > > > catlist = sorted(set(class_obj.category for class_obj in keys)) > > > > I see that all the categories in the list are of type unicode except that > > for MatchesSourceConfidence which is of type str. This explains why you > > see two translations of 'General filters' - one is unicode, the other is > > not. But I don't see where the str value is coming from yet. > > > > Bye > > > > Gary |
From: jerome <rom...@ya...> - 2011-03-22 14:39:37
|
Thanks! Fixed rev16882/3 : http://gramps.svn.sourceforge.net/gramps/?view=rev&rev=16882 http://gramps.svn.sourceforge.net/gramps/?view=rev&rev=16883 Jérôme --- En date de : Mar 22.3.11, Peter Landgren <pet...@te...> a écrit : > De: Peter Landgren <pet...@te...> > Objet: Re: [Gramps-devel] Re : Filter editor in Gramps 3.3.0 > À: rom...@ya... > Cc: "Gary Burton" <bur...@ya...>, "Gramps Development List" <gra...@li...> > Date: Mardi 22 mars 2011, 15h34 > Also > If I change in_MatchesSourceConfidenceBase.py > from gettext import gettext as _ > to > from gen.ggettext import sgettext as _ > > Everything is OK. > > /Peter > > > Hi Gary, > > > > > I looked in fr.po but did not see any translation > of the category for > > > > > > which the MatchesSourceConfidence filter > inherits. > > > > > > Why is that? > > > > MatchesSourceConfidenceBase reference is on > POTFILES.skip because all > > 'base' filter rules are not visible for the user. So, > do not need to > > translate something not visible. We use a generic > sentence 'Matches > > Object' but this will not be displayed under Filter > Editor and do not > > need to add unused strings on translations ! > > > > We also skip debug plugins and some modules with pure > python code or > > already translated (DB, API, some widgets, localized > handlers like > > Relationships and Date, etc ...) > > > > > > For the user, we have: > > > > #: > ../src/Filters/Rules/Person/_MatchesSourceConfidence.py:41 > > #: > ../src/Filters/Rules/Family/_MatchesSourceConfidence.py:41 > > #: > ../src/Filters/Rules/Event/_MatchesSourceConfidence.py:42 > > msgid "Confidence level:" > > msgstr "Niveau de confiance :" > > > > # trunk > > #: > ../src/Filters/Rules/Person/_MatchesSourceConfidence.py:42 > > msgid "Persons with at least one direct source >= > <confidence level>" > > msgstr "Individus avec au moins une source directe > >= à <niveau de > > confiance>" > > > > # trunk > > #: > ../src/Filters/Rules/Person/_MatchesSourceConfidence.py:43 > > msgid "Matches persons with at least one direct source > with confidence > > level(s)" > > msgstr "Correspond aux individus ayant au moins une > source directe avec > > des niveaux de confiance " > > > > # utilise correspondre pour to match, plus facile que > être compatible ou > > concorder dans ce contexte > > #: > ../src/Filters/Rules/Event/_MatchesSourceConfidence.py:44 > > msgid "Matches events with at least one direct source > with confidence > > level(s)" > > msgstr "Correspond aux événements ayant au moins une > source directe avec > > des niveaux de confiance " > > > > And our category: "General filters"! > > > > Note, you are right, "General filters" string is > ignored !!! > > But also translated because string is already listed. > > > > #: ../src/plugins/quickview/SameSurnames.py:41 > > #: ../src/plugins/quickview/SameSurnames.py:53 > > #: ../src/plugins/quickview/SameSurnames.py:66 > > #: ../src/plugins/quickview/SameSurnames.py:83 > > #: ../src/Filters/Rules/_Everything.py:46 > > #: ../src/Filters/Rules/_HasGrampsId.py:49 > > #: > ../src/Filters/Rules/_HasTextMatchingSubstringOf.py:49 > > #: ../src/Filters/Rules/_IsPrivate.py:45 > > #: ../src/Filters/Rules/Person/_Disconnected.py:46 > > #: ../src/Filters/Rules/Person/_Everyone.py:46 > > #: ../src/Filters/Rules/Person/_HasAddress.py:49 > > #: > ../src/Filters/Rules/Person/_HasAlternateName.py:45 > > #: ../src/Filters/Rules/Person/_HasAssociation.py:49 > > #: > ../src/Filters/Rules/Person/_HasFamilyAttribute.py:49 > > #: ../src/Filters/Rules/Person/_HasNameOf.py:62 > > #: > ../src/Filters/Rules/Person/_HasNameOriginType.py:47 > > #: ../src/Filters/Rules/Person/_HasNameType.py:47 > > #: ../src/Filters/Rules/Person/_HasNickname.py:45 > > #: ../src/Filters/Rules/Person/_HasSourceOf.py:47 > > #: > ../src/Filters/Rules/Person/_HasTextMatchingSubstringOf.py:50 > > #: > ../src/Filters/Rules/Person/_HasUnknownGender.py:47 > > #: ../src/Filters/Rules/Person/_IncompleteNames.py:47 > > #: ../src/Filters/Rules/Person/_IsBookmarked.py:47 > > #: ../src/Filters/Rules/Person/_IsDefaultPerson.py:46 > > #: ../src/Filters/Rules/Person/_IsFemale.py:47 > > #: ../src/Filters/Rules/Person/_IsMale.py:47 > > #: > ../src/Filters/Rules/Person/_MatchesEventFilter.py:56 > > #: ../src/Filters/Rules/Person/_MatchIdOf.py:48 > > #: ../src/Filters/Rules/Person/_NoBirthdate.py:45 > > #: ../src/Filters/Rules/Person/_NoDeathdate.py:45 > > #: ../src/Filters/Rules/Person/_PeoplePrivate.py:45 > > #: ../src/Filters/Rules/Person/_ProbablyAlive.py:48 > > #: ../src/Filters/Rules/Person/_RegExpName.py:50 > > #: ../src/Filters/Rules/Person/_SearchName.py:49 > > #: ../src/Filters/Rules/Family/_HasRelType.py:50 > > #: ../src/Filters/Rules/Family/_IsBookmarked.py:46 > > #: ../src/Filters/Rules/Event/_HasData.py:51 > > #: ../src/Filters/Rules/Event/_HasType.py:49 > > #: > ../src/Filters/Rules/Event/_MatchesPersonFilter.py:55 > > #: > ../src/Filters/Rules/Event/_MatchesSourceFilter.py:52 > > #: ../src/Filters/Rules/Place/_HasPlace.py:60 > > #: > ../src/Filters/Rules/Place/_MatchesEventFilter.py:54 > > #: ../src/Filters/Rules/Source/_HasRepository.py:47 > > #: ../src/Filters/Rules/Source/_HasSource.py:51 > > #: ../src/Filters/Rules/MediaObject/_HasMedia.py:54 > > #: ../src/Filters/Rules/Repository/_HasRepo.py:54 > > #: > ../src/Filters/Rules/Note/_MatchesSubstringOf.py:48 > > #: ../src/Filters/Rules/Note/_MatchesRegexpOf.py:48 > > #: ../src/Filters/Rules/Note/_HasNote.py:52 > > msgid "General filters" > > msgstr "Filtres généraux" > > > > > > These rules use the same 'filter' class as _HasTag > rules (_HasTagBase), > > which does not return this duplicated category ! Yes, > the problem is on > > 'MatchesSourceConfidence' code. > > > > > I see that all the categories in the list are of > type unicode except that > > > for MatchesSourceConfidence which is of type > str. > > > > type string ! > > On mapping, right ? > > > > elif v == _('Confidence level:'): > > t = MyList(map(str, range(5)), > > > [Utils.confidence[i] for i in range(5)]) > > > > > But I don't see where the str value is coming > from yet. > > > > We experimented some ways for returning keys on the > related feature > > request[1] and there is some 'shortcuts' on the code > but the idea was: > > for i in range(5): > > if conf == i and self.list[0] == > str(i) > > > > I suppose that's why unicode was not forced... > > > > I guess: > > > > MyList(map(str, range(5)) > > should be > > MyList(map(unicode(str), range(5)) > > > > will fix this problem ? > > > > > > > > Note, I suppose these rules is a possible way for > handling our source > > references. This does not match all requests from user > mailing list and > > I remember Helge request about cross searchs with > source title and > > repositories[2], but this may be useful. > > > > > > [1] http://www.gramps-project.org/bugs/view.php?id=4491 > > [2] http://www.gramps-project.org/bugs/view.php?id=4698 > > > > > > Thanks! > > Jérôme > > > > Gary Burton a écrit : > > > Hello Jerome/Peter > > > > > > I don't have a solution but some observations. > > > > > > I looked in fr.po but did not see any translation > of the category for > > > MatchesSourceConfidenceBase which the > MatchesSourceConfidence filter > > > inherits. Why is that? > > > > > > I also looked at this line in filtereditor.py: > > > > > > catlist = sorted(set(class_obj.category for > class_obj in keys)) > > > > > > I see that all the categories in the list are of > type unicode except that > > > for MatchesSourceConfidence which is of type str. > This explains why you > > > see two translations of 'General filters' - one > is unicode, the other is > > > not. But I don't see where the str value is > coming from yet. > > > > > > Bye > > > > > > Gary > |