2009-03-12 klockan 18:05 skrev Toms:
> Horribly sorry, the patch attached was not the right one.
> Attaching the right one with this letter.
> Also forgot to mention that this does not involve string breaks or anything.
Is it me or does this patch even *REMOVE* translation markers and hence
break i18n of certain strings? See below for details.
> On Thu, Mar 12, 2009 at 6:33 PM, Toms <toms baugis gmail com> wrote:
> Index: hamster/db.py
> ===================================================================
> --- hamster/db.py (revision 829)
> +++ hamster/db.py (working copy)
> @@ -340,7 +340,7 @@
> """
> end_date = end_date or date
>
> - return self.fetchall(query, (_("Unsorted"), date, end_date))
> + return self.fetchall(query, (unicode(_("Unsorted")), date, end_date))
Not here: still a _() marker.
> def __remove_fact(self, fact_id):
> query = """
> @@ -702,13 +702,13 @@
> category_count = self.fetchone("select count(*) from categories")[0]
>
> if category_count == 0:
> - work_cat_id = self.__add_category(_(work_category["name"]))
> + work_cat_id = self.__add_category(unicode(work_category["name"]))
> for entry in work_category["entries"]:
> - self.__add_activity(_(entry), work_cat_id)
> + self.__add_activity(unicode(entry), work_cat_id)
>
> - nonwork_cat_id = self.__add_category(_(nonwork_category["name"]))
> + nonwork_cat_id = self.__add_category(unicode(nonwork_category["name"]))
> for entry in nonwork_category["entries"]:
> - self.__add_activity(_(entry), nonwork_cat_id)
> + self.__add_activity(unicode(entry), nonwork_cat_id)
But it does remove the _() call in these 4 cases.
— Wouter
Attachment:
signature.asc
Description: Digital signature