[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-i18n-doc
Subject:    D17739: Add a po file for the list of words in GCompris
From:       Karl Ove Hufthammer <noreply () phabricator ! kde ! org>
Date:       2019-01-20 14:39:05
Message-ID: 042fed4850f7f5ed16329b5db2dcd004 () localhost ! localdomain
[Download RAW message or body]

[Attachment #2 (text/plain)]

huftis added a comment.


  Since the filename, e.g. `alarmclock.ogg`, is used as the key in the JSON file, I \
think it would be cleaner to use it as a ‘msgctxt' in the PO file. That way, you \
don't have to try to parse the comments to extract the keys when regenerating the \
JSON files. And it makes it possible to have more the one image with the same \
‘msgid' (homographs with different meaning, e.g. a verb and a noun). (I don't think \
there's currently any such strings, but there may be in the future.)

INLINE COMMENTS

> datasetToPo.py:85
> +                      " / " + lesson['name'] + \
> +                      " / " + voice + \
> +                      ": "+ imageLink)

Consider using the ‘msgctxt' field for storing the JSON keys.

> poToDataset.py:42
> +for entry in poFile:
> +    word = entry.comment.split('\n')[0].split(' ')[-1].replace("%20", " ")
> +    if word in data:

Consider using the ‘msgctxt' field for storing the JSON keys.

REVISION DETAIL
  https://phabricator.kde.org/D17739

To: jjazeix, #gcompris, #localization, huftis
Cc: pino, huftis, aacid, kde-edu, harrymecwan, ganeshredcobra, nityanandkumar, \
echarruau, rahulyadav, narvaez, scagarwal, apol, timotheegiet, hkaelberer, jjazeix, \
bcoudoin


[Attachment #3 (text/html)]

<table><tr><td style="">huftis added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: \
right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: \
#F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: \
inline-block; border: 1px solid rgba(71,87,120,.2);" \
href="https://phabricator.kde.org/D17739">View Revision</a></tr></table><br \
/><div><div><p>Since the filename, e.g. <tt style="background: #ebebeb; font-size: \
13px;">alarmclock.ogg</tt>, is used as the key in the JSON file, I think it would be \
cleaner to use it as a ‘msgctxt' in the PO file. That way, you don't have to try to \
parse the comments to extract the keys when regenerating the JSON files. And it makes \
it possible to have more the one image with the same ‘msgid' (homographs with \
different meaning, e.g. a verb and a noun). (I don't think there's currently any such \
strings, but there may be in the future.)</p></div></div><br /><div><strong>INLINE \
COMMENTS</strong><div><div style="margin: 6px 0 12px 0;"><div style="border: 1px \
solid #C7CCD9; border-radius: 3px;"><div style="padding: 0; background: #F7F7F7; \
border-color: #e3e4e8; border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div \
style="color: #74777d; background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a \
style="float: right; text-decoration: none;" \
href="https://phabricator.kde.org/D17739#inline-101724">View Inline</a><span \
style="color: #4b4d51; font-weight: bold;">datasetToPo.py:85</span></div> <div \
style="font: 11px/15px &quot;Menlo&quot;, &quot;Consolas&quot;, &quot;Monaco&quot;, \
monospace; white-space: pre-wrap; clear: both; padding: 4px 0; margin: 0;"><div \
style="padding: 0 8px; margin: 0 4px; background: rgba(251, 175, 175, .7);">          \
<span class="bright"></span><span style="color: #aa4000"><span \
class="bright">print</span></span><span class="bright"> </span><span style="color: \
#766510"><span class="bright">&quot;#:</span> &quot;</span> <span style="color: \
#aa2211">+</span> <span class="bright"></span><span style="color: #766510"><span \
class="bright">&quot;https://gcompris.net/incoming/lang/words.html#&quot;</span></span> \
<span style="color: #aa2211">+</span> \ </div><div style="padding: 0 8px; margin: 0 \
4px; background: rgba(251, 175, 175, .7);">                <span \
class="bright"></span><span class="n"><span class="bright">word</span></span><span \
class="bright"></span><span class="p"><span class="bright">[</span></span><span \
class="bright"></span><span style="color: #766510"><span \
class="bright">&#039;image&#039;</span></span><span class="bright"></span><span \
class="p"><span class="bright">]</span></span><span class="bright"></span><span \
style="color: #aa2211"><span class="bright">.</span></span><span \
class="bright"></span><span class="n"><span class="bright">split</span></span><span \
class="bright"></span><span class="p"><span class="bright">(</span></span><span \
class="bright"></span><span style="color: #766510"><span \
class="bright">&#039;/&#039;</span></span><span class="bright"></span><span \
class="p"><span class="bright">)[</span></span><span class="bright"></span><span \
style="color: #aa2211"><span class="bright">-</span></span><span \
class="bright"></span><span style="color: #601200"><span \
class="bright">1</span></span><span class="bright"></span><span class="p"><span \
class="bright">]</span></span><span class="bright"></span><span style="color: \
#aa2211"><span class="bright">.</span></span><span class="bright"></span><span \
class="n"><span class="bright">split</span></span><span class="bright"></span><span \
class="p"><span class="bright">(</span></span><span class="bright"></span><span \
style="color: #766510"><span class="bright">&quot;.&quot;</span></span><span \
class="bright"></span><span class="p"><span class="bright">)[</span></span><span \
class="bright"></span><span style="color: #601200"><span \
class="bright">0</span></span><span class="bright"></span><span class="p"><span \
class="bright">]</span></span> </div><div style="padding: 0 8px; margin: 0 4px; \
background: rgba(251, 175, 175, .7);">            <span class="bright"></span><span \
style="color: #aa4000"><span class="bright">print</span></span><span class="bright"> \
</span><span style="color: #766510"><span class="bright">&#039;msgctxt \
&quot;LangWords|&quot;&#039;</span></span> </div><div style="padding: 0 8px; margin: \
0 4px; background: rgba(151, 234, 151, .6);">            <span class="bright">        \
</span><span style="color: #766510"><span class="bright">&quot; /</span> \
&quot;</span> <span style="color: #aa2211">+</span> <span class="bright"></span><span \
class="n"><span class="bright">lesson</span></span><span class="bright"></span><span \
class="p"><span class="bright">[</span></span><span class="bright"></span><span \
style="color: #766510"><span class="bright">&#039;name&#039;</span></span><span \
class="bright"></span><span class="p"><span class="bright">]</span></span> <span \
style="color: #aa2211">+</span> \ </div><div style="padding: 0 8px; margin: 0 4px; \
background: rgba(151, 234, 151, .6);">                <span class="bright">      \
</span><span style="color: #766510"><span class="bright">&quot; / \
&quot;</span></span><span class="bright"> </span><span style="color: #aa2211"><span \
class="bright">+</span></span><span class="bright"> </span><span class="n"><span \
class="bright">voice</span></span><span class="bright"> </span><span style="color: \
#aa2211"><span class="bright">+</span></span><span class="bright"> \</span> \
</div><div style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, \
.6);">            <span class="bright">          </span><span style="color: \
#766510"><span class="bright">&quot;: &quot;</span></span><span \
class="bright"></span><span style="color: #aa2211"><span \
class="bright">+</span></span><span class="bright"> </span><span class="n"><span \
class="bright">imageLink</span></span><span class="bright"></span><span \
class="p"><span class="bright">)</span></span> </div></div></div>
<div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; margin: \
8px;">Consider using the ‘msgctxt' field for storing the JSON \
keys.</p></div></div><br /><div style="border: 1px solid #C7CCD9; border-radius: \
3px;"><div style="padding: 0; background: #F7F7F7; border-color: #e3e4e8; \
border-style: solid; border-width: 0 0 1px 0; margin: 0;"><div style="color: #74777d; \
background: #eff2f4; padding: 6px 8px; overflow: hidden;"><a style="float: right; \
text-decoration: none;" href="https://phabricator.kde.org/D17739#inline-101723">View \
Inline</a><span style="color: #4b4d51; font-weight: \
bold;">poToDataset.py:42</span></div> <div style="font: 11px/15px &quot;Menlo&quot;, \
&quot;Consolas&quot;, &quot;Monaco&quot;, monospace; white-space: pre-wrap; clear: \
both; padding: 4px 0; margin: 0;"><div style="padding: 0 8px; margin: 0 4px; \
background: rgba(151, 234, 151, .6);"><span style="color: #aa4000">for</span> <span \
class="n">entry</span> <span style="color: #aa22ff">in</span> <span \
class="n">poFile</span><span class="p">:</span> </div><div style="padding: 0 8px; \
margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span class="n">word</span> \
<span style="color: #aa2211">=</span> <span class="n">entry</span><span style="color: \
#aa2211">.</span><span class="n">comment</span><span style="color: \
#aa2211">.</span><span class="n">split</span><span class="p">(</span><span \
style="color: #766510">&#039;</span><span style="color: #bb6622">\n</span><span \
style="color: #766510">&#039;</span><span class="p">)[</span><span style="color: \
#601200">0</span><span class="p">]</span><span style="color: #aa2211">.</span><span \
class="n">split</span><span class="p">(</span><span style="color: #766510">&#039; \
&#039;</span><span class="p">)[</span><span style="color: #aa2211">-</span><span \
style="color: #601200">1</span><span class="p">]</span><span style="color: \
#aa2211">.</span><span class="n">replace</span><span class="p">(</span><span \
style="color: #766510">&quot;%20&quot;</span><span class="p">,</span> <span \
style="color: #766510">&quot; &quot;</span><span class="p">)</span> </div><div \
style="padding: 0 8px; margin: 0 4px; background: rgba(151, 234, 151, .6);">    <span \
style="color: #aa4000">if</span> <span class="n">word</span> <span style="color: \
#aa22ff">in</span> <span class="n">data</span><span class="p">:</span> \
</div></div></div> <div style="margin: 8px 0; padding: 0 12px;"><p style="padding: 0; \
margin: 8px;">Consider using the ‘msgctxt' field for storing the JSON \
keys.</p></div></div></div></div></div><br /><div><strong>REVISION \
DETAIL</strong><div><a \
href="https://phabricator.kde.org/D17739">https://phabricator.kde.org/D17739</a></div></div><br \
/><div><strong>To: </strong>jjazeix, GCompris, Localization, huftis<br /><strong>Cc: \
</strong>pino, huftis, aacid, kde-edu, harrymecwan, ganeshredcobra, nityanandkumar, \
echarruau, rahulyadav, narvaez, scagarwal, apol, timotheegiet, hkaelberer, jjazeix, \
bcoudoin<br /></div>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic