Re: [translate-pootle] [Translate-devel] Pootle 1.3.0-beta3 [Debian package]

2009-09-11 Thread Nicolas François
On Fri, Sep 11, 2009 at 12:30:56PM +0200, Nicolas François wrote:
 
 So you are warned, I do not consider the packaging as finished, but you
 might want to try it. I did not upload it to the translate repository
 because of the above issues and the possible unavailability to fix them,
 but you can download the package from:

Here is the missing link:
http://alioth.debian.org/~nekral-guest/packages/translate/pootle/

Best Regards,
-- 
Nekral

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle


Re: [translate-pootle] Issue with Merge

2009-09-03 Thread Nicolas François
Hello Juan,

On Thu, Sep 03, 2009 at 09:50:54AM +0200, F Wolff wrote:
 Op Wo, 2009-09-02 om 17:35 -0300 skryf Juan Wajnerman:
  I can upload new .po files correctly, but whenever I try to merge an 
  existing 
  one, I get the error: list objects are unhashable.
  
  I just installed Pootle from debian repositories, version 1.2.1-3.

Can you try with version 1.2.1-4.

It should now be on most Debian mirrors (if you use Debian unstable).

You can alternatively use this repository:
http://translate.sourceforge.net/debian/

 Nicolas, do you think it would be possible to make an update release for
 Debian from the Pootle 1.2.1 branch with the latest fix to work
 correctly with translate-toolkit-1.4.0?  I think this might be the issue
 we are seeing here.

version 1.2.1-4 contains the commit from revision 12249.
Friedel, do you think there are other patches I should include?

Thanks in advance,
-- 
Nekral

--
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
___
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle


Re: [translate-pootle] plural NO DEFINIDO

2009-02-26 Thread Nicolas François
Hello,

I found https://answers.launchpad.net/rosetta/+question/60096 which makes
me think that the plural formula could be

Plural-Forms: nplurals=2; plural=n != 1;

Although, the case for 0 was not clear in this thread.

Best Regards,
-- 
Nekral

--
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
___
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle


Re: [translate-pootle] -B option making Pootle unresponsive

2009-02-05 Thread Nicolas François
On Thu, Feb 05, 2009 at 06:28:34PM +0530, Sayamindu Dasgupta wrote:
 
 (I have Lucene set up in the system, and the behaviour seems to be the
 same whether I use Apache, or access Pootle directly)

What version of lucene do you have, and what version of pylucene?
(dpkg -l pylucene)


I could not reproduce it with pylucene 2.3.1-1.1.
(after removing xapian)

-- 
Nekral

--
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
___
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle


Re: [translate-pootle] mail activation

2009-01-29 Thread Nicolas François
On Thu, Jan 29, 2009 at 03:44:54PM +0700, John Francis Lee wrote:
 
 I've completed step 1 and am awaiting my activation code... I'm afraid 
 it will never arrive. Is it possible I should have specified how to send 
 mail to pootle in the non-existent pootle.prefs file? or somewhere else?

Your activation email may have been discarded because it had a wrong From
line. And, yes, it requires a configuration in pootle.prefs.
(If you did not receive the mail, you can also find the activation code in
pootle.prefs or users.prefs)

I recommend you to read /usr/share/doc/pootle/README.Debian for the
detailed steps of the setup of a Pootle server on Ubuntu.

Best Regards,
-- 
Nekral

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle


Re: [translate-pootle] [Translate-devel] FOSDEM roll call

2009-01-27 Thread Nicolas François
Hello,

On Tue, Jan 27, 2009 at 12:00:35PM +0200, Dwayne Bailey wrote:
 Translate.org.za won't be at FOSDEM, but I was curious if anyone on our
 lists was going?
 
 If you are going it might be good to have a meet and share to discuss
 Pootle and the other tools we're developing here.  Plus pimp them in
 your other slots ;)

I will attend FOSDEM this year, starting from Friday evening.

Meeting some of the toolkit or tools developers or users would be
welcome!

Best Regards,
-- 
Nekral

--
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
___
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle


Re: [translate-pootle] Translate Toolkit 1.2.0-rc1 in Debian lenny?

2008-10-02 Thread Nicolas François
Hi,

On Thu, Oct 02, 2008 at 06:12:08PM +0200, Christian Perrier wrote:
 Quoting F Wolff ([EMAIL PROTECTED]):
 
  I agree with you, Christian. And unless something terrible is reported
  in the next few hours, I'm probably happy to build the official 1.2.0
  packages. Even the 1.2.0 packages will be hard to maintain for two years
  though, but hopefully easier than 1.1 :-)
  
  As I said, I can try to make the official build later today. Would you
  need anything else from my side to help this along? I would really like
  to see 1.2 in Lenny.
 
 
 Leave time for Nicolas to react..:-)I have no idea whether he
 agrees with me and *he* is the maintainer. I'm just the nagging guy
 who has ideas and makes others implement them...:)

I will ask the Release Managers.
The point is that new upstream releases and big non reviewable changes are
not really accepted.

But the arguments you mention are still valid, and it's worth trying.

Cheers,
-- 
Nekral

-
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK  win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100url=/
___
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle


Re: [translate-pootle] Installing Pootle on Debian Etch, The Easiest Way

2008-05-22 Thread Nicolas François
On Thu, May 22, 2008 at 05:55:26PM +0200, F Wolff wrote:
 On Wo, 2008-05-21 at 20:10 +0200, Gustavo Narea wrote:
  Hello, everyone.
  
  I've written an almost copypaste HOWTO to install Pootle on Debian 4.0; do 
  you have any suggestions?
  
  http://gustavonarea.net/blog/posts/installing-pootle-on-debian-etch-the-easiest-way/
  
  If you like it, you can copy/adapt it to use it in your own documentation 
  (it's under a CC license).
 
 I hope you and Nicolas (the Debian packager) can perhaps compare what
 you have done and then we publish some of it on the wiki for People
 installing from source (on whatever platform). That way we should save
 people some time. For now, I added a link to the section of external
 documentation here:
 http://translate.sourceforge.net/wiki/pootle/index


I will get a look that weekend (if I do not forget).
Installing pootle from Etch should just require aptitude install pootle
and some bits of configuration.

I still have to make a etch-backport package to ease the installation of
a more recent package.

Best Regards,
-- 
Nekral

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle


Re: [translate-pootle] Pootle not logged access

2008-04-19 Thread Nicolas François
On Wed, Apr 09, 2008 at 12:05:40PM +0200, F Wolff wrote:
 Op Woensdag 2008-04-09 skryf Gabriel Munch-Andersen:
  Hello,
  
  I'm trying to cut access to people not logged in so that they can't  
  view any tranlations keys.
  I've been trying to remove all the view access on the default and  
  nobody users, but it's still possible to view the keys when your are  
  not logged in.
  
  Is there a way to force the users to be logged in for them to acces  
  the pootle system?
  Basically if the user is not logged in nor activated he will always be  
  redirected to the login page.
  
  Thanks for your help!
  
 
 It is unfortunately not possible at the moment. I already entered this
 bug in bugzilla a while ago, but it has never been a very high priority
 - most people don't use Pootle for confidential stuff.

In the interim, one possibility could be to use apache to proxy the calls
(e.g. with mod_rewrite) to pootle, and to authenticate users with apache.

Kind Regards,
-- 
Nekral

-
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Don't miss this year's exciting event. There's still time to save $100. 
Use priority code J8TL2D2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
___
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle


Re: [translate-pootle] utf8 encoding problems

2008-02-10 Thread Nicolas François
Hi,

On Sun, Feb 10, 2008 at 04:54:59PM +0100, Olivier Ricordeau wrote:
 
 I've set up pootle on a machine, and I'm having troubles with utf8 
 encoding. I'm using the pootle-0.10.1-1 package provided by Debian's 
 testing repository.

You are probably using the package from the stable repository. testing
includes pootle-1.0.1-2

 My .po files and my .pot are encoded in UTF-8, and special characters 
 are not rendered well in the pootle interface. And when I edit strings 
 and add special characters in the pootle interface, they are encoded in 
 latin-1 (I guess), but not in UTF-8.
 
 So my question is: how can I tell pootle to handle files in UTF-8? It's 
 critical for me to be able to get the strings in UTF-8.

Maybe it's a browser issue, can you check if your browser does not force a
given encoding?

I remember only one issue with UTF-8 and old versions of pootle or the
toolkit, which was when the comment above the PO header includes non ascii
characters (maybe also the field of the header, like the last translator
name).
If you cannot switch to a more recent of Pootle, one solution could be to
just remove non-ascii chars from the header and its comments.
(Note that this error did not produce not rendered well special
characters, but simply stopped pootle from working)

Best Regards,
-- 
Nekral

-
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse012070mrt/direct/01/
___
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle


Re: [translate-pootle] PyLucene 2 porting

2007-04-25 Thread Nicolas François
Hi,

On Wed, Apr 25, 2007 at 12:34:26PM +0400, Rail Aliev wrote:
  NF == Nicolas François [EMAIL PROTECTED] writes:
 
   NF If you think PyLucene is useful, I can ask for its inclusion in
   NF Debian.
 
 AFAIR, there was some problems regarding binary format of jars supplied
 by upstream (PyLucene). See
 http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=256283

Yes. The Debian package should use a jar generated from source (or
provided by another binary package). I would like to see if the package
will be usable and useful before looking a that point.

   NF Just report here if it worked and if it was useful for Pootle.
 
 It worked after upgrade from previous version (1.9.x). Search worked
 well but when I tried to rebuild index new pylucene generated empty (20
 bytes) index files (manually and automatically from web). :( 

Thanks for trying.

I will have a deeper look.

Can you describe the method for rebuilding the index (manually and
automatically from web).

Also, did you try 2.0.0-3 or 2.1.0-1?

 So, after my first test I can say that upgrading to PyLucene 2 with your
 patches for Pootle brakes indexing.

;(

Kind Regards,
-- 
Nekral

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle


Re: [translate-pootle] PyLucene 2 porting

2007-04-20 Thread Nicolas François
Hi,

On Fri, Apr 20, 2007 at 05:16:37PM +0400, Rail Aliev wrote:
 
 Nikolas, can you point me to the latest python-lucene Debian package. I
 prepared one but have some problems with pycentral. packages.debian.org
 doesn't know about such package. :(

I think I found the package that Christian prepared.

I rebuilt it here:
http://users.alioth.debian.org/~nekral-guest/pootle/python-lucene/
(There is the source package and the binary (.deb) package for PyLucene
2.0.0-3)

I noticed that there is a new version of PyLucene (2.1.0-1), and packaged it.
But I did not retested pootle (and the patch for jToolkit) with it.

If you think PyLucene is useful, I can ask for its inclusion in Debian.

Just report here if it worked and if it was useful for Pootle.

Kind Regards,
-- 
Nekral

-
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
___
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle


[translate-pootle] Some news from the Debian Pootle package

2007-04-14 Thread Nicolas François
Hi,

First, a Debian package for 0.11 should be available really soon now.

I wanted to post a summary/status of the patches used in the Debian
package since a long time, but did not take the time to write it.
So here it is!

 * pootle_typos.patch
   It only fixes two small typos in the Python documentation.
   I'm attaching it to this mail.
   IMO, it can be applied.
 * debian_system_installation.patch
   Change the default paths for a system wide installation.
   I will probably keep it as a Debian specific patch
 * pootle_gnuprojects_no_detect.patch
   This provide a great speedup for large GNU style projects.
   IMO, it can be safely applied. It won't have any effect until an
   administrator adds a 'treestyle = gnu' property in the prefs file.
   It could be improved by providing a way to change/set this property
   with the WEB frontend.
 * pootle_logos_prefs.patch
   Permit a personalization of the Pootle logos (pootle, pootle-medium and
   banner) in the prefs file.
   For example: on http://i18n.debian.net:8080/projects/pootle/, you can
   see a Pootle with a swirl
 * pootle_get_pofiles_with_find.patch
   Speedup the listing of big projects by using find instead of the
   Python's os.path.walk. This should work when find is not available
   (i.e. on Windows), but it was not tested.
 * pootle_ll_CC_languages.patch
   This patch differentiate languages like pt and pt_BR in the stats.
   (IIRC, the pt_BR PO files were conted both in pt and pt_BR)
   Unfortunatelly, this patch is based on the
   pootle_get_pofiles_with_find.patch patch, so you will have to apply
   this one too if you want to apply it as is.
   But it can be easily changed to be applied on the SVN version.
   NOTE: I need to re-check if it is necessary, since the issue do not
   appears to be there on http://pootle.wordforge.org/projects/pootle/
 * pootle_continue_after_po_failure.patch
   It should not be necessary with the toolkit v0.11.
   I avoid pootle crashing when a Po is not valid (but the project with
   this PO file will not be usable). With toolkit 0.11, invalid PO files
   are not very frequent (IIRC, it was caused by PO files using UTF-8, or
   accentuated caracters not UTF-8 in the header)
 * pootle_mail_header.patch
   This fix the encoding of subjects of registration mails (IIRC, the
   problem occurred on a Russian registration mail).
   It could have been implemented in jToolkit, but the mailer would have
   to assume that it receives always UTF-8, or an argument should be
   added.
 * pootle_no_autoload.patch
   Speedup loading a project and lower the memory consumption of the
   PootleServer.
   When a project is loaded, only the quick stats file is loaded.
   This provides a great speedup, but it may be more dangerous than the
   other patches (It relies on the fact that the stats files and the PO
   files are synchronized - i.e. the PO files must always be updated with
   the web frontend, or the stats have to be regenerated by hand when the
   PO files are updated manually on the filesystem)
 * pootle_no_autoload_language.patch
   The goal of this patch is the same as the previous one, but for the
   language pages (i.e. pootle/lang/ or pootle/project/lang/).
   It is not activated on the Debian package (I did not work on it since a
   long time, I don't remember its status;)
   It is more complex, and thus more risky, but the goal is basically the
   same: only read the quick stats file if possible, otherwise fallback to
   the stats file (to display the checks results; depending on the
   options). I need to work a bit more on it, and test it.
   I'm also willing to disable some options depending on the number of PO
   files in a directory (e.g. you can only see the quick stats if there
   are more than 1000 PO files; you need to enter deeper in the hierarchy
   if you want to see the checks results)


You can find the patches in the Debian source package. If needed, I can
put them in a more accessible place.

I'm attaching the patches which I think could be worth being applied at
this time:
 * pootle_typos.patch
 * pootle_gnuprojects_no_detect.patch
 * pootle_logos_prefs.patch
 * pootle_mail_header.patch

I can provide some measurements for the speedups of
pootle_gnuprojects_no_detect.patch and pootle_no_autoload.patch if you
wish.

Kind Regards,
-- 
Nekral
Goal: minor typos

Index: trunk/Pootle/projects.py
===
--- trunk.orig/Pootle/projects.py	2007-04-14 14:36:58.0 +0200
+++ trunk/Pootle/projects.py	2007-04-14 14:38:47.0 +0200
@@ -61,7 +61,7 @@
 return True
 
 class potimecache(timecache.timecache):
-  caches pootlefile objects, remembers time, and reverts back to statistics when neccessary...
+  caches pootlefile objects, remembers time, and reverts back to statistics when necessary...
   def __init__(self, expiryperiod, project):
 initialises the cache to keep objects for the given expiryperiod, and point back to the 

[translate-pootle] Speeding up import of big projects

2006-12-26 Thread Nicolas François
(podir, , 1)
-  while basedirname.startswith(os.sep):
-basedirname = basedirname.replace(os.sep, , 1)
-  ext = os.extsep + poext
-  ponames = [fn for fn in fnames if fn.endswith(ext) and self.languagematch(languagecode, fn[:-len(ext)])]
-  pofilenames.extend([os.path.join(basedirname, poname) for poname in ponames])
+#def addgnufiles(podir, dirname, fnames):
+#  adds the files to the set of files for this project
+#  basedirname = dirname.replace(podir, , 1)
+#  while basedirname.startswith(os.sep):
+#basedirname = basedirname.replace(os.sep, , 1)
+#  ext = os.extsep + poext
+#  ponames = [fn for fn in fnames if fn.endswith(ext) and self.languagematch(languagecode, fn[:-len(ext)])]
+#  pofilenames.extend([os.path.join(basedirname, poname) for poname in ponames])
 pofilenames = []
 podir = self.getpodir(languagecode, projectcode)
 if self.hasgnufiles(podir, languagecode) == gnu:
-  os.path.walk(podir, addgnufiles, podir)
+#  This is the generic way:
+#  os.path.walk(podir, addgnufiles, podir)
+#  But if we can use find, it is much much faster:
+  cmd = 'find %s \\( -name %s.po -o -name %s_[A-Z][A-Z].po -o -name %s_[A-Z][A-Z][A-Z].po \\) -printf %%P\\n'%(podir, languagecode, languagecode, languagecode)
+  pofilenames = [n[:-1] for n in os.popen(cmd).readlines()]
 else:
   os.path.walk(podir, addfiles, podir)
 return pofilenames
/**
 * Copyright (c) Nicolas François, 2006
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *notice, this list of conditions and the following disclaimer in the
 *documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED
 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
 * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 *
 * Compile with:
 * gcc -o gen_simplestats gen_simplestats.c -lgettextpo -lgettextsrc
 */
#include gettext-po.h
#include errno.h /* errno */
#include stdio.h /* printf */
#include string.h /* strtok */
#include error.h /* error */

//#define QUICKSTATS

#ifndef QUICKSTATS
/* stat */
#include sys/types.h
#include sys/stat.h
#include unistd.h
#endif

/* Maximum length of stat lines */
#define BUF_LEN 16384

extern void textmode_xerror (int severity,
 po_message_t message,
 const char *filename, size_t lineno, size_t column,
 int multiline_p, const char *message_text);
extern void textmode_xerror2 (int severity,
  po_message_t message1,
  const char *filename1, size_t lineno1, size_t column1,
  int multiline_p1, const char *message_text1,
  po_message_t message2,
  const char *filename2, size_t lineno2, size_t column2,
  int multiline_p2, const char *message_text2);
struct po_xerror_handler default_xerror_handler={textmode_xerror,
 textmode_xerror2};

int wordcount(const char *msg)
{
int cnt = 0;
char *tmp = strdup(msg);
char *tmp_orig = tmp;
tmp = strtok((char *)tmp,  \t\n\r);
while (NULL != tmp)
{
cnt++;
tmp = strtok(NULL,  \t\n\r);
}
free(tmp_orig);
return cnt;
}

int main (int argc, char **argv)
{
if (2  argc)
{
fprintf (stderr, Usage: %s PO files\n, argv[0]);
return 1;
}

argv++;
argc--;
while (0  argc)
{
int tmid = 0; /* # of translated messages */
int fmid = 0; /* # of fuzzy messages */
int tcnt = 0; /* # of words in the translated messages */
int fcnt = 0; /* # of words in the fuzzy messages */
int cnt = 0;  /* # of words */
int n = -1;   /* index of the current message */
#ifndef QUICKSTATS
struct stat s;
char *tmpfilename;
char total[BUF_LEN] = total:;
char blank[BUF_LEN] = blank:;
char translated

Re: [translate-pootle] [Translate-devel] Various errors and limitations encoutered during import of Debian debconf translations in Pootle 0.10.1

2006-12-26 Thread Nicolas François
Hi Javier,

On Wed, Dec 27, 2006 at 09:03:01AM +0700, Javier SOLA wrote:
 Christian Perrier wrote
  - when one of my 700+ directories has a two-letter or three-letter
name, Pootle seems to switch itself to let's assume that this
project arranges file with language directories and many PO files
for the same language in the same directory layout mode
 
workaround: do not try to import two-letter and three-letter
directories which means ignore packages such as nn,
jed, cvs, etc.
 
expected fix: allow the project admin to enforce the style of layout
  between:
- many directories containing files named after
  languages ISO codes and ONE POT file each
- one directory per language and many pairs of
  PO/POT files in each

 This makes sense, but it will complicate things a bit. Pootle has both a 
 project centered view (which projects are there, independently of the 
 language) and a language centered view (which projects are there for 
 this language). It will probably be necessary to code separately for 
 directories that include the files for all languages, using different names.

It should be quite easy to add a line like:
myproject.treestyle = gnu
or:
myproject.treestyle = nongnu

in pootle.prefs, and use it in potree.isgnustyle() or potree.hasgnufiles()

This should avoid having to guess whether a project with a vi directory is
a project with Vietnamese translations or a project with translations
related to the vi editor.

This should also provide a good speedup for GNU style projects with a lot
of files / directories.

Kind Regards,
-- 
Nekral

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle


Re: [translate-pootle] Trigger reindexing from the command line?

2006-12-25 Thread Nicolas François
Hi,

On Mon, Dec 25, 2006 at 07:05:51PM +0100, Christian Perrier wrote:
 When PO files are added externally to a project, Pootle reindexes them
 and updates its stats the first time someone accesses the project page
 through the web interface.
 
 However, as I want to setup a daily import of PO files in Pootle, how
 can I trigger this update in my update script?

You can try the --refreshstats option.

On Debian: /usr/sbin/PootleServer --refreshstats.

I don't know whether the Pootle server should be stopped or not before.

Kind Regards,
-- 
Nekral

-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV
___
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle


Re: [translate-pootle] New python-pylucene Debian package, please test and criticize

2006-12-24 Thread Nicolas François
Hello,

Here is a patch to implement the new Python Policy.

The current source package embed a binary only JAR of lucene. It would be
better to update the liblucene-java Debian package and to build
python-lucene with the JAR distributed by this package.

Kind Regards,
-- 
Nekral
diff -rauN ../orig/PyLucene-src-2.0.0-3/debian/changelog PyLucene-src-2.0.0-3/debian/changelog
--- ../orig/PyLucene-src-2.0.0-3/debian/changelog	2006-12-24 13:55:24.0 +0100
+++ PyLucene-src-2.0.0-3/debian/changelog	2006-12-25 01:43:27.0 +0100
@@ -1,8 +1,14 @@
+python-pylucene (2.0.0+3-3) unstable; urgency=low
+
+  * Switch to the new Python policy.
+
+ -- Christian Perrier [EMAIL PROTECTED]  Sun, 25 Dec 2006 01:41:21 +0100
+
 python-pylucene (2.0.0+3-2) unstable; urgency=low
 
   * Adapt to Debian etch
   * Lintian fixes:
-- Remove thenow useless prerm and postinst scripts
+- Remove the now useless prerm and postinst scripts
 - Do not install LICENSE files
 - Build-Depends on python | python-dev | python-all-dev
 
diff -rauN ../orig/PyLucene-src-2.0.0-3/debian/control PyLucene-src-2.0.0-3/debian/control
--- ../orig/PyLucene-src-2.0.0-3/debian/control	2006-12-24 13:55:24.0 +0100
+++ PyLucene-src-2.0.0-3/debian/control	2006-12-25 00:52:23.0 +0100
@@ -3,13 +3,15 @@
 Priority: optional
 Maintainer: Christian Perrier [EMAIL PROTECTED]
 Standards-Version: 3.7.2
-Build-Depends: debhelper (= 5.0.38), gcj-4.1, libgcj7-dev, python-all-dev (= 2.3.5-11)
+Build-Depends: debhelper (= 5.0.38), gcj-4.1, libgcj7-dev, python-all-dev (= 2.3.5-11), python-central (= 0.5.6)
 XS-Python-Version: current, = 2.3
 
 Package: python-pylucene
 Architecture: any
 Priority: optional
-Depends: ${shlibs:Depends}
+Depends: ${shlibs:Depends}, ${python:Depends}
+Provides: ${python:Provides}
+XB-Python-Version: ${python:Versions}
 Description: Interface to Lucene from Python
  Python package to wrap the Java lucene library in to python
 
diff -rauN ../orig/PyLucene-src-2.0.0-3/debian/python-pylucene.install PyLucene-src-2.0.0-3/debian/python-pylucene.install
--- ../orig/PyLucene-src-2.0.0-3/debian/python-pylucene.install	2006-12-24 13:55:24.0 +0100
+++ PyLucene-src-2.0.0-3/debian/python-pylucene.install	1970-01-01 01:00:00.0 +0100
@@ -1 +0,0 @@
-PyLucene.py usr/lib/python2.4/site-packages
diff -rauN ../orig/PyLucene-src-2.0.0-3/debian/rules PyLucene-src-2.0.0-3/debian/rules
--- ../orig/PyLucene-src-2.0.0-3/debian/rules	2006-12-24 13:55:24.0 +0100
+++ PyLucene-src-2.0.0-3/debian/rules	2006-12-25 01:22:15.0 +0100
@@ -1,7 +1,5 @@
 #!/usr/bin/make -f
 
-export DH_OPTIONS
-
 PREFIX=/usr
 PREFIX_PYTHON=$(PREFIX)
 GCJ_HOME = $(shell $(JCC) --print-search-dirs | sed -ne '/^install:/ {s/^install: \(.*\)\/$$/\1/; p}')
@@ -21,14 +19,16 @@
 export JCCH
 
 d=$(CURDIR)/debian/python-pylucene
-pv=$(shell pyversions -vr)
-pylucene=$(d)/usr/lib/python$(pv)/site-packages/pylucene
+
+PYVERS=$(shell pyversions -vs)
 
 build: build-stamp
 build-stamp:
 	dh_testdir
 
-	$(MAKE)
+	for pyver in $(PYVERS); do \
+		$(MAKE) PYTHON_VER=$$pyver BINDIR=pylucene-$$pyver; \
+	done
 	touch build-stamp
 
 install: build
@@ -37,8 +37,12 @@
 	dh_clean -k
 	dh_installdirs
 	dh_install
-	mkdir -p $(pylucene)
-	cp release/_PyLucene.so $(pylucene)
+	for pyver in $(PYVERS); do \
+		pylucene=$(d)/usr/lib/python$$pyver/site-packages; \
+		mkdir -p $$pylucene; \
+		install -m 644 PyLucene.py $$pylucene; \
+		install pylucene-$$pyver/_PyLucene.so $$pylucene; \
+	done
 
 clean:
 	dh_testdir
@@ -46,13 +50,17 @@
 	rm -f build-stamp
 
 	dh_clean
-	$(MAKE) clean
+	for pyver in $(PYVERS); do \
+		$(MAKE) PYTHON_VER=$$pyver BINDIR=pylucene-$$pyver clean; \
+	done
+	rm -f PyLucene.pyc
 
 binary-arch: build install
 	dh_testdir
 	dh_testroot
 	dh_installdocs
 	dh_installchangelogs CHANGES
+	dh_pycentral
 	dh_strip
 	dh_compress
 	dh_fixperms
-
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT  business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.phpp=sourceforgeCID=DEVDEV___
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle


Re: [translate-pootle] Gentoo packages for Pootle and friends

2006-11-02 Thread Nicolas François
Hi,

On Thu, Nov 02, 2006 at 06:31:50PM -0200, Leonardo Fontenelle wrote:
 I'm couldn't get pootle reading the /usr/share/pootle/(html|templates)
 folders. How did you configure pootle to find files there?

I patched Pootle/filelocations.py
(I changed prefsfile, htmldir, and templatedir)

(This is the only patch to the source)

ftp://ftp.debian.org/debian/pool/main/p/pootle/pootle_0.10.1-1.diff.gz

Cheers,
-- 
Nekral

-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle


Re: [translate-pootle] (very) Early python-jtoolkit and pootle Debian packages available

2006-07-15 Thread Nicolas François
Hello Christian,

On Sat, Jul 15, 2006 at 07:43:36PM +0200, Christian Perrier wrote:
 On http://www.perrier.eu.org/debian/packages you will find very
 preliminary packages for python-jtoolkit and pootle.
 
 http://www.perrier.eu.org/debian/packages/python-jtoolkit_0.7.8-1_all.deb
 http://www.perrier.eu.org/debian/packages/pootle_0.9-1_all.deb

I also have a pootle and python-jtoolkit package on:
http://mentors.debian.net/debian/pool/main/p/python-jtoolkit/
http://mentors.debian.net/debian/pool/main/p/pootle/

I posted a RFS on debian-mentors. I'm still waiting for a sponsor.

My pootle package contains an init script to start Pootle on startup.


Kind Regards,
-- 
Nekral


-
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnkkid=120709bid=263057dat=121642
___
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle


Re: [translate-pootle] Wordforge

2006-06-07 Thread Nicolas François
Hello Gintautas,

On Thu, Jun 08, 2006 at 12:17:28AM +0300, Gintautas Miliauskas wrote:
 Hi,
 
 I have a strong opinion about the direction Pootle's backend should be
 headed. I think that at the moment you have a 'loose' system based on
 files, which is simple and transparent.  However, it is inefficient
 in memory usage, speed and ease of distribution.  Since memory usage
 depends on the database size, I take it that you are using some sort of
 memory cache to speed up the system.
 
 I think that an obvious solution here is to use a relational database
 (I would suggest PostgreSQL).  Unlike ordinary files, it allows
 extremely speedy random writes which is exactly what we need here.
 I would expect the problem of high memory usage to disappear completely
 too.  In fact, if we can put all important data on the database,
 distribution of the system would then become trivial -- several
 instances of the application (possibly on different computers) would
 simply use a single instance of the database.  I would say that by doing
 everything (indexing, locking, etc.) manually we're reinventing the
 wheel, badly.

I'm not that sure a database would bring a that important performance
improvement.

Writing to the database will probably be faster than writing an XLIFF
file.
But users may want to retrieve XLIFF files. This operation will be faster
if the strings are already stored in a XLIFF file.

Also, I'm not sure a Pootle server is mostly doing write operations
(the number of write operations is probably proportionnal to the number of
users).
The CPU may be more occupied in doing fuzzy matching of strings. I'm not
sure the fuzzy matching algorithm can use some kind of cache in a
database. (The number of fuzzy matching operation is more than
proportionnal to the number of strings - which IMHO better reflects the
size of the translation server than the number of the simultaneous users
triggering write operations)


 I also think that using XLIFF, an XML format, for the backend is a bad
 idea.  I think that XML is great for serializing data and sharing it
 between completely disparate systems, but it's awful for random writes
 and places where performance is important (such as the data storage
 backend for a heavily used system). Nobody cares whether the backend
 storage is compliant with some standard, it's only the interface where
 standards-compliance matters. The backend must simply be as efficient
 as possible and not get in the way.
 
 I do not mean to thrash your design decisions or stall work on the
 backend.  Files as backend are great for small projects where
 performance is unimportant, because then you don't need to set up an
 SQL server.  I just want to suggest designing the API in such a way that
 does not depend on files, i.e., such that a relational database would
 not be too much trouble to plug in.

I'm not that used to Pootle. Maybe the base.TranslationStore (or
TranslationUnit) API can be used for a database storage.

It could be latter interresting to investigate the performance gain given
by such a storage. So if you think a method is missing or should be
generalized (to help using faster search in a database), this could be
nice to know it in advance.

 I would be happy to hear your thoughts.  I hope the letter did not come
 out too harsh.  There may be more options here, or you may have some
 plans that I am simply not aware of.  However, this is critical for my
 work for Debian and I want to cover this ASAP.

If you can work on an API for the storage method, this won't be critical,
and could be sorted out during an optimization phase (Pootle 1.5.1 in the
Wordforge's roadmap)

Kind Regards,
-- 
Nekral


___
Translate-pootle mailing list
Translate-pootle@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/translate-pootle