Re: [Zim-wiki] Call for translators

2012-12-06 Thread Jean-Baptiste Holcroft
Hi,

Is it possible to add a translation string please ?
Every time you create a new page, it add Created followed by the date
whatever the language.
Date format is ok, but Created is always in english.
It is a little bit annoying since you can't search and replace in all Zim
pages.

Thanks,

--
Jean-Baptiste Holcroft


2012/11/29 Jaap Karssenberg jaap.karssenb...@gmail.com

 On Thu, Nov 29, 2012 at 9:00 AM, Jaap Karssenberg 
 jaap.karssenb...@gmail.com wrote:

 Dear all,

 Since there are one or two bugs in the 0.57 release that I don't want to
 leave out in the wild, I decided to create a 0.58 release in the next two
 weeks. I still have a few small items on the list that I want to merge, but
 I think I already got all changes that result in changes for the
 translation.

 So, if you would like to update the translation for your language please
 visit: https://translations.launchpad.net/zim/pyzim/

 For translations that were up to date with the last release there are
 only 7 new messages to translate. Please make any updates before end of day
 of Friday December 7th. If all goes according to plan, I will wrap up
 everything that Saturday.

 Thanks,

 Jaap


 P.S. There is one translation string called calendar:week_start:0 which
 controls the first day of the week to be either Sunday or Monday.

 Please do not put in your personal preference, but put the official value
 for your language. Otherwise the behavior will not be consistent with the
 Gtk calendar widget.

 If launchpad already suggests a translation based on the Gtk translations,
 please use that one.

 Thanks,

 Jaap

 ___
 Mailing list: https://launchpad.net/~zim-wiki
 Post to : zim-wiki@lists.launchpad.net
 Unsubscribe : https://launchpad.net/~zim-wiki
 More help   : https://help.launchpad.net/ListHelp


___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] Call for translators

2012-12-06 Thread Jean-Baptiste Holcroft
Done : https://bugs.launchpad.net/zim/+bug/1087204
I'll be there for testing/translating if needed.

Regards,

--
Jean-Baptiste Holcroft


2012/12/6 Jaap Karssenberg jaap.karssenb...@gmail.com

 On Thu, Dec 6, 2012 at 11:30 AM, Jean-Baptiste Holcroft 
 jb.holcr...@gmail.com wrote:

 Is it possible to add a translation string please ?
 Every time you create a new page, it add Created followed by the date
 whatever the language.
 Date format is ok, but Created is always in english.
 It is a little bit annoying since you can't search and replace in all Zim
 pages.


 That means we need to make the templates translatable, it is a valid
 request, but more work than it might seem. Please check the bug tracker if
 such a request already exists and if not create one there.

 In the mean time you can just edit the template for new pages in your
 local copy by going to Edit  Templates and modify wiki, Default
 template.

 Regards,

 Jaap


___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] List embedded files into template

2012-11-19 Thread Jean-Baptiste Holcroft
Thanks for your answer, I submited the bug request you asked for.
https://bugs.launchpad.net/zim/+bug/1080705

I thought to one more thing : it would be interresting to have a particular
class, according to the type of the

It looks like this patch does the job quite well :
=== modified file 'zim/formats/html.py'
--- zim/formats/html.py2012-02-22 12:32:31 +
+++ zim/formats/html.py2012-11-19 14:25:52 +
@@ -133,7 +133,8 @@
 elif element.tag == 'link':
 href = self.linker.link(element.attrib['href'])
 title = text.replace('', 'quot;')
-output.append('a href=%s title=%s%s/a' % (href,
title, text))
+hrefType = link_type(element.attrib['href'])
+output.append('a href=%s title=%s class=%s%s/a'
% (href, title, hrefType, text))
 elif element.tag in ['emphasis', 'strong', 'mark', 'strike',
'code','sub','sup']:
 if element.tag == 'mark': tag = 'u'
 elif element.tag == 'emphasis': tag = 'em'

I tried to commit with bzr, but bzr send failed : no success : bzr: ERROR:
No mail-to address (--mail-to) or output (-o) specified.
--
Jean-Baptiste Holcroft


2012/11/17 Jaap Karssenberg jaap.karssenb...@gmail.com

 On Sat, Nov 17, 2012 at 11:45 AM, Jean-Baptiste Holcroft 
 jb.holcr...@gmail.com wrote:

 I wanted to have a little bit of fun with Templates using
 http://www.initializr.com/

 Is there a way to list all files embeded files in page ?
 Do you have more information about Files templates ? I do not understand
 what it is. Is says to go to Attachments but I do not understand how it
 works :(
 *If you are looking for information for file templates for attachments,
 see Attachments http://zim-wiki.org/manual/Help/Attachments.html*

 In my fun, I also successfully crashed Zim ;) :
 https://bugs.launchpad.net/zim/+bug/1079811
 I'll be please to give the final templates to Zim in you are interested
 and licence allow it.



 Assuming your question is how to list attached files in an export
 template. Correct ?

 Afraid there is no function for this at the moment, but if you file a
 request in the tracker, we can check how easy it is to add that.

 (File templates are something else, those are templates to create new
 attachments.)

 Regards,

 Jaap



___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


Re: [Zim-wiki] List embedded files into template

2012-11-19 Thread Jean-Baptiste Holcroft
Let's go for an other patch.

When creating the page index, I was annoyed by the lack of link and the
presence of strong tag.
It is easier when you use css to have a normal link for the current page
and set a class.

=== modified file 'zim/formats/html.py'
--- zim/formats/html.py2012-11-19 14:27:36 +
+++ zim/formats/html.py2012-11-19 21:45:01 +
@@ -133,8 +133,10 @@
 elif element.tag == 'link':
 href = self.linker.link(element.attrib['href'])
 title = text.replace('', 'quot;')
-hrefType = link_type(element.attrib['href'])
-output.append('a href=%s title=%s class=%s%s/a'
% (href, title, hrefType, text))
+hrefClass = link_type(element.attrib['href'])
+if element.attrib.get('isCurrentPage', False)==True:
+hrefClass +=  active
+output.append('a href=%s title=%s class=%s%s/a'
% (href, title, hrefClass, text))
 elif element.tag in ['emphasis', 'strong', 'mark', 'strike',
'code','sub','sup']:
 if element.tag == 'mark': tag = 'u'
 elif element.tag == 'emphasis': tag = 'em'

=== modified file 'zim/templates.py'
--- zim/templates.py2012-09-22 19:03:55 +
+++ zim/templates.py2012-11-19 21:31:07 +
@@ -745,12 +745,12 @@

 if page == self._page:
 # Current page is marked with the strong style
-builder.start('strong')
+builder.start('link', {'type': 'page', 'href': ':'+
page.name, 'isCurrentPage':True})
 builder.data(page.basename)
-builder.end('strong')
+builder.end('link')
 else:
 # links to other pages
-builder.start('link', {'type': 'page', 'href': ':'+
page.name})
+builder.start('link', {'type': 'page', 'href': ':'+
page.name, 'isCurrentPage':False})
 builder.data(page.basename)
 builder.end('link')
--
Jean-Baptiste Holcroft


2012/11/19 Jean-Baptiste Holcroft jb.holcr...@gmail.com

 Thanks for your answer, I submited the bug request you asked for.
 https://bugs.launchpad.net/zim/+bug/1080705

 I thought to one more thing : it would be interresting to have a
 particular class, according to the type of the

 It looks like this patch does the job quite well :
 === modified file 'zim/formats/html.py'
 --- zim/formats/html.py2012-02-22 12:32:31 +
 +++ zim/formats/html.py2012-11-19 14:25:52 +
 @@ -133,7 +133,8 @@
  elif element.tag == 'link':
  href = self.linker.link(element.attrib['href'])
  title = text.replace('', 'quot;')
 -output.append('a href=%s title=%s%s/a' % (href,
 title, text))
 +hrefType = link_type(element.attrib['href'])
 +output.append('a href=%s title=%s class=%s%s/a'
 % (href, title, hrefType, text))
  elif element.tag in ['emphasis', 'strong', 'mark', 'strike',
 'code','sub','sup']:
  if element.tag == 'mark': tag = 'u'
  elif element.tag == 'emphasis': tag = 'em'

 I tried to commit with bzr, but bzr send failed : no success : bzr: ERROR:
 No mail-to address (--mail-to) or output (-o) specified.
 --
 Jean-Baptiste Holcroft



 2012/11/17 Jaap Karssenberg jaap.karssenb...@gmail.com

 On Sat, Nov 17, 2012 at 11:45 AM, Jean-Baptiste Holcroft 
 jb.holcr...@gmail.com wrote:

 I wanted to have a little bit of fun with Templates using
 http://www.initializr.com/

 Is there a way to list all files embeded files in page ?
 Do you have more information about Files templates ? I do not understand
 what it is. Is says to go to Attachments but I do not understand how it
 works :(
 *If you are looking for information for file templates for
 attachments, see 
 Attachmentshttp://zim-wiki.org/manual/Help/Attachments.html
 *

 In my fun, I also successfully crashed Zim ;) :
 https://bugs.launchpad.net/zim/+bug/1079811
 I'll be please to give the final templates to Zim in you are interested
 and licence allow it.



 Assuming your question is how to list attached files in an export
 template. Correct ?

 Afraid there is no function for this at the moment, but if you file a
 request in the tracker, we can check how easy it is to add that.

 (File templates are something else, those are templates to create new
 attachments.)

 Regards,

 Jaap





___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp


[Zim-wiki] List embedded files into template

2012-11-17 Thread Jean-Baptiste Holcroft
Hi,

I wanted to have a little bit of fun with Templates using
http://www.initializr.com/

Is there a way to list all files embeded files in page ?
Do you have more information about Files templates ? I do not understand
what it is. Is says to go to Attachments but I do not understand how it
works :(
*If you are looking for information for file templates for attachments,
see Attachments http://zim-wiki.org/manual/Help/Attachments.html*

In my fun, I also successfully crashed Zim ;) :
https://bugs.launchpad.net/zim/+bug/1079811
I'll be please to give the final templates to Zim in you are interested and
licence allow it.

Thanks for your help,
--
Jean-Baptiste Holcroft
___
Mailing list: https://launchpad.net/~zim-wiki
Post to : zim-wiki@lists.launchpad.net
Unsubscribe : https://launchpad.net/~zim-wiki
More help   : https://help.launchpad.net/ListHelp