<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><br><div><div>Le 18 oct. 2014 à 10:02, Jean-Baptiste Holcroft <<a href="mailto:jb.holcroft@gmail.com">jb.holcroft@gmail.com</a>> a écrit :</div><br class="Apple-interchange-newline"><blockquote type="cite"><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div><br class="Apple-interchange-newline">Dans le code, l'erreur serait là :<br><a href="https://github.com/osm-fr/osmose-backend/blob/649db8ac4e642e0fdbf065c1012744e627c8e906/plugins/TagFix_MultipleTag.py#L35">https://github.com/osm-fr/osmose-backend/blob/649db8ac4e642e0fdbf065c1012744e627c8e906/plugins/TagFix_MultipleTag.py#L35</a><br></div></div></blockquote><div><br></div>J’essai de comprendre le code mais ce n’est pas très clair (en comparaison à d’autres erreurs):</div><div><div>Donc si l’objet à l’attribut « name » et que son parent ne serait pas nommé ?? (je ne pige pas la seconde condition)</div><div><br></div></div><div><table class="highlight tab-size-8 js-file-line-container" style="box-sizing: border-box; border-collapse: collapse; border-spacing: 0px; background-color: rgb(255, 255, 255); tab-size: 8; color: rgb(51, 51, 51); font-family: Helvetica, arial, freesans, clean, sans-serif, 'Segoe UI Emoji', 'Segoe UI Symbol'; font-size: 13px; line-height: 18px; position: static; z-index: auto;"><tbody style="box-sizing: border-box;"><tr style="box-sizing: border-box;"></tr><tr style="box-sizing: border-box;"><td id="LC46" class="blob-code js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; vertical-align: top; white-space: pre; overflow: visible;"><span class="k" style="box-sizing: border-box; font-weight: bold;">if</span> <span class="n" style="box-sizing: border-box;">tags</span><span class="o" style="box-sizing: border-box; font-weight: bold;">.</span><span class="n" style="box-sizing: border-box;">get</span><span class="p" style="box-sizing: border-box;">(</span><span class="s" style="box-sizing: border-box; color: rgb(223, 80, 0);">"name"</span><span class="p" style="box-sizing: border-box;">)</span> <span class="ow" style="box-sizing: border-box; font-weight: bold;">and</span> <span class="nb" style="box-sizing: border-box; color: rgb(0, 134, 179);">len</span><span class="p" style="box-sizing: border-box;">(</span><span class="n" style="box-sizing: border-box;">key_set</span> <span class="o" style="box-sizing: border-box; font-weight: bold;">&</span> <span class="bp" style="box-sizing: border-box; color: rgb(153, 153, 153);">self</span><span class="o" style="box-sizing: border-box; font-weight: bold;">.</span><span class="n" style="box-sizing: border-box;">name_parent</span><span class="p" style="box-sizing: border-box;">)</span> <span class="o" style="box-sizing: border-box; font-weight: bold;">==</span> <span class="mi" style="box-sizing: border-box; color: rgb(148, 82, 119);">0</span><span class="p" style="box-sizing: border-box;">:
    </span><span class="n" style="box-sizing: border-box;">err</span><span class="o" style="box-sizing: border-box; font-weight: bold;">.</span><span class="n" style="box-sizing: border-box;">append</span><span class="p" style="box-sizing: border-box;">((</span><span class="mi" style="box-sizing: border-box; color: rgb(148, 82, 119);">21101</span><span class="p" style="box-sizing: border-box;">,</span> <span class="mi" style="box-sizing: border-box; color: rgb(148, 82, 119);">1</span><span class="p" style="box-sizing: border-box;">,</span> <span class="p" style="box-sizing: border-box;">{}))
</span></td></tr><tr style="box-sizing: border-box;"><td id="L47" class="blob-num js-line-number" data-line-number="47" style="box-sizing: border-box; padding: 0px 10px; width: 50px; min-width: 50px; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; color: rgba(0, 0, 0, 0.298039); vertical-align: top; text-align: right; border-style: solid; border-color: rgb(238, 238, 238); border-width: 0px 1px 0px 0px; cursor: pointer; -webkit-user-select: none;"></td><td id="LC47" class="blob-code js-file-line" style="box-sizing: border-box; padding: 0px 10px; position: relative; font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace; font-size: 12px; vertical-align: top; white-space: pre; overflow: visible;"><br></td></tr></tbody></table></div><div><br><blockquote type="cite"><div dir="ltr" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">(si vous parlez des langues étrangères, n'hésitez pas à aider à la traduction d’osmose)<br></div></blockquote>Osmose ne semble pas utiliser de bibliothèque de code <a href="http://fr.wikipedia.org/wiki/Internationalisation_(informatique)">i18n</a> (la traduction est faite dans le code source, pas dans des fichiers ressources séparés).</div><div>Bref ça rend la traduction plus difficile à faire et ça explique peut-être pourquoi certaines erreurs apparaissent dans une langue, mais pas dans une autre… ?</div><div><br></div><div>La bibliothèque gtext existe en Python : <a href="https://docs.python.org/2/library/i18n.html">https://docs.python.org/2/library/i18n.html</a></div><div><br></div><div>Est-ce que son utilisation à été envisagée ?</div><div>C’est un gros chantier que de modifier le code source et d’extraire les messages, mais vu l’importance d’Osmose et son utilisation qui semble mondiale, ce travail sera un gain de temps pour le futur.</div><div>Et avec plein de petites fourmis, il n’est peut-être pas si difficile et long à faire.</div><div><br></div><div>—</div><div>Yves</div></body></html>