<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>The .mo not are in git.. But before call this function, the bundlebuilder<div>generates it: and the list of files have them.</div><div><br></div><div>A solution: remove the generate locale and put before the call:</div><div><br></div><div>Line 179:</div><div>- self.builder.build_locale()</div><div><br></div><div><br></div><div><div> def package(self):</div><div> bundle_zip = zipfile.ZipFile(self.package_path, 'w',</div><div> zipfile.ZIP_DEFLATED)</div><div><br></div><div> for f in self.get_files_in_git():</div><div> print 'file:', f</div><div> bundle_zip.write(os.path.join(self.config.source_dir, f),</div><div> os.path.join(self.config.bundle_root_dir, f))</div><div><br></div><div>+ <span style="font-size: 12pt;">self.builder.build_locale()</span></div><div><br></div><div> locale_dir = os.path.join(self.config.source_dir, 'locale')</div><div> locale_files = list_files(locale_dir, IGNORE_DIRS, IGNORE_FILES)</div><div> for f in locale_files:</div><div> bundle_zip.write(os.path.join(locale_dir, f),</div><div> os.path.join(self.config.bundle_root_dir,</div><div> 'locale', f))</div><div><br></div><div> bundle_zip.close()</div></div><div><br></div><div><br><br><div><div id="SkyDrivePlaceholder"></div><hr id="stopSpelling">Date: Sat, 2 Mar 2013 20:25:04 -0300<br>From: gonzalo@laptop.org<br>To: alanjas@hotmail.com<br>CC: sugar-devel@lists.sugarlabs.org<br>Subject: Re: [Sugar-devel] Sugar bundleBuilder<br><br>The .mo and the .linfo files should not be in git anyway, right?<div><br></div><div>Gonzalo<br><br><div class="ecxgmail_quote">On Sat, Mar 2, 2013 at 12:04 AM, Alan Jhonn Aguiar Schwyn <span dir="ltr"><<a href="mailto:alanjas@hotmail.com" target="_blank">alanjas@hotmail.com</a>></span> wrote:<br>
<blockquote class="ecxgmail_quote" style="border-left:1px #ccc solid;padding-left:1ex;">
<div><div dir="ltr">Hi,<div><br></div><div>I found a problem with bundlebuilder (sugar-toolkit) when use "dist_xo" out</div><div>of git. The locale folder adds twice times the same .mo and the same .linfo.</div>
<div>The problem is easy solved, but exist some ways.</div><div>Basically: when execute the command, the .po are compiled. After, when</div><div>no git -> use list_files function (that returns all files including the locale</div>
<div>folder files).</div><div>In the package function, the files of get_files_in_git are add to the .zip</div><div>After, the locale files are again added:</div><div><br></div><div><div> def package(self):</div><div> bundle_zip = zipfile.ZipFile(self.package_path, 'w',</div>
<div> zipfile.ZIP_DEFLATED)</div><div><br></div><div> for f in self.get_files_in_git():</div><div> bundle_zip.write(os.path.join(self.config.source_dir, f),</div><div>
os.path.join(self.config.bundle_root_dir, f))</div><div> locale_dir = os.path.join(self.config.source_dir, 'locale')</div><div> locale_files = list_files(locale_dir, IGNORE_DIRS, IGNORE_FILES)</div>
<div><br></div><div> for f in locale_files:</div><div> bundle_zip.write(os.path.join(locale_dir, f),</div><div> os.path.join(self.config.bundle_root_dir,</div><div> 'locale', f))</div>
</div><div><br></div><div>I have installed "python-sugar-toolkit-0.96".</div><div>Some .XO can have bigger size due to this issue.</div><div><br></div><div>Regards!</div><span class="ecxHOEnZb"><font color="#888888"><div>
<br></div><div>Alan</div><div><br></div> </font></span></div></div>
<br>_______________________________________________<br>
Sugar-devel mailing list<br>
<a href="mailto:Sugar-devel@lists.sugarlabs.org">Sugar-devel@lists.sugarlabs.org</a><br>
<a href="http://lists.sugarlabs.org/listinfo/sugar-devel" target="_blank">http://lists.sugarlabs.org/listinfo/sugar-devel</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel</div></div> </div></body>
</html>