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

List:       kde-i18n-doc
Subject:    Re: How to add new glossary item in lokalize?
From:       Simon Depiets <sdepiets () gmail ! com>
Date:       2020-08-14 7:24:31
Message-ID: CAPVZv+HqVJFxu7ueMwHcJTWTUvdzaBqLMAoL=F1U0fptxQu5mA () mail ! gmail ! com
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hi,
What do you have in the project config?
It seems by default it could be a folder name, in that case saving doesn't
work indeed.

I will change that
[image: image.png]
Regards
Simon

Le ven. 14 août 2020   15:12, Yuri Chornoivan <yurchor@ukr.net> a écrit :

> пʼятниця, 14 серпня 2020 р. 09:47:51 EEST Raghavendra Kamath написано:
> > Hi
> >
> > On Friday, 14 August, 2020 11:51:28 AM IST Yuri Chornoivan wrote:
> > > Is the path for the glossary in your project settings (Project ->
> > > Configure
> > > Project...) writable? What are the permissions on terms.tbx?
> > >
> > > $ ls -l terms.tbx
> > > -rw-r--r-- 1 yurchor yurchor 49414 сер 14 08:25 terms.tbx
> >
> > Yes the folder has write permission
> > This is the output of ` ls -l .` on the project folder.
> > ```
> > drwxr-xr-x 1 raghu raghu  100 Aug 14 11:14 .
> > drwxr-xr-x 1 raghu raghu   22 Aug 14 10:24 ..
> > -rw------- 1 raghu raghu  127 Aug 14 11:14 index.lokalize
> > drwxr-xr-x 1 raghu raghu 4368 Aug 14 10:25 messages
> > ```
> >
> > > > Do I need to have pre-exisiting terms.tbx  file to save it?
> > >
> > > No (just tested by removing terms.tbx).
> >
> > Lokalize doesn't create the terms.tbx file for me. 😞
> >
> > I am using Version 20.04.3 of lokalize
> >
> > Thank you
>
> H-m-m... the only thing that differs in my Lokalize in this case is
>
> diff --git a/src/glossary/glossaryview.cpp b/src/glossary/glossaryview.cpp
> index 0aab0b1..19bdf14 100644
> --- a/src/glossary/glossaryview.cpp
> +++ b/src/glossary/glossaryview.cpp
> @@ -166,7 +166,7 @@ void GlossaryView::slotNewEntryDisplayed(DocPosition
> pos)
>
>      bool found = false;
>      //m_flowLayout->setEnabled(false);
> -    foreach (const QByteArray& termId, QSet<QByteArray>(termIds.begin(),
> termIds.end())) {
> +    foreach (const QByteArray& termId, termIds.toSet()) {
>          // now check which of them are really hits...
>          foreach (const QString& enTerm, glossary.terms(termId,
> sourceLangCode)) {
>              // ...and if so, which part of termEn list we must thank for
> match ...
>
> Can you try to create terms.tbx with the following content and use it?
>
> <?xml version='1.0' encoding='UTF-8'?>
> <!DOCTYPE martif PUBLIC 'ISO 12200:1999A//DTD MARTIF core (DXFcdV04)//EN'
> 'TBXcdv04.dtd'>
> <martif xml:lang="en" type="TBX">
>     <martifHeader>
>         <fileDesc>
>             <titleStmt>
>                 <title>Hindi Team Glossary</title>
>             </titleStmt>
>         </fileDesc>
>         <encodingDesc>
>             <p type="DCSName">SYSTEM "TBXDCSv05b.xml"</p>
>         </encodingDesc>
>     </martifHeader>
>     <text>
>         <body>
>             <termEntry id="duffy_duck">
>                 <langSet xml:lang="en_US">
>                     <ntig>
>                         <termGrp>
>                             <term>test</term>
>                         </termGrp>
>                     </ntig>
>                 </langSet>
>                 <langSet xml:lang="hi">
>                     <ntig>
>                         <termGrp>
>                             <term>test</term>
>                         </termGrp>
>                     </ntig>
>                 </langSet>
>             </termEntry>
>     </body>
>     </text>
> </martif>
>
>
> Thanks in advance for your answers.
>
> Best regards,
> Yuri
>
>
>
>

-- 
Simon Depiets

[Attachment #5 (text/html)]

<div dir="ltr">Hi,<div>What do you have in the project config?</div><div>It seems by \
default it could be a folder name, in that case saving doesn&#39;t work \
indeed.</div><div><br></div><div>I will change that</div><div><div><img \
src="cid:ii_kdtwnp2r0" alt="image.png" width="504" \
height="367"><br></div></div><div>Regards</div><div>Simon</div></div><br><div \
class="gmail_quote"><div dir="ltr" class="gmail_attr">Le  ven. 14 août 2020    \
15:12, Yuri Chornoivan &lt;<a href="mailto:yurchor@ukr.net">yurchor@ukr.net</a>&gt; a \
écrit  :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px \
0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">пʼятниця, 14 \
серпня 2020 р. 09:47:51 EEST Raghavendra Kamath написано:<br> &gt; \
Hi<br> &gt; <br>
&gt; On Friday, 14 August, 2020 11:51:28 AM IST Yuri Chornoivan wrote:<br>
&gt; &gt; Is the path for the glossary in your project settings (Project -&gt;<br>
&gt; &gt; Configure<br>
&gt; &gt; Project...) writable? What are the permissions on terms.tbx?<br>
&gt; &gt; <br>
&gt; &gt; $ ls -l terms.tbx<br>
&gt; &gt; -rw-r--r-- 1 yurchor yurchor 49414 сер 14 08:25 terms.tbx<br>
&gt; <br>
&gt; Yes the folder has write permission<br>
&gt; This is the output of ` ls -l .` on the project folder.<br>
&gt; ```<br>
&gt; drwxr-xr-x 1 raghu raghu   100 Aug 14 11:14 .<br>
&gt; drwxr-xr-x 1 raghu raghu     22 Aug 14 10:24 ..<br>
&gt; -rw------- 1 raghu raghu   127 Aug 14 11:14 index.lokalize<br>
&gt; drwxr-xr-x 1 raghu raghu 4368 Aug 14 10:25 messages<br>
&gt; ```<br>
&gt; <br>
&gt; &gt; &gt; Do I need to have pre-exisiting terms.tbx   file to save it?<br>
&gt; &gt; <br>
&gt; &gt; No (just tested by removing terms.tbx).<br>
&gt; <br>
&gt; Lokalize doesn&#39;t create the terms.tbx file for me. 😞<br>
&gt; <br>
&gt; I am using Version 20.04.3 of lokalize<br>
&gt; <br>
&gt; Thank you<br>
<br>
H-m-m... the only thing that differs in my Lokalize in this case is<br>
<br>
diff --git a/src/glossary/glossaryview.cpp b/src/glossary/glossaryview.cpp<br>
index 0aab0b1..19bdf14 100644<br>
--- a/src/glossary/glossaryview.cpp<br>
+++ b/src/glossary/glossaryview.cpp<br>
@@ -166,7 +166,7 @@ void GlossaryView::slotNewEntryDisplayed(DocPosition pos)<br>
<br>
        bool found = false;<br>
        //m_flowLayout-&gt;setEnabled(false);<br>
-      foreach (const QByteArray&amp; termId, QSet&lt;QByteArray&gt;(termIds.begin(), \
<br> termIds.end())) {<br>
+      foreach (const QByteArray&amp; termId, termIds.toSet()) {<br>
              // now check which of them are really hits...<br>
              foreach (const QString&amp; enTerm, glossary.terms(termId, <br>
sourceLangCode)) {<br>
                    // ...and if so, which part of termEn list we must thank for <br>
match ...<br>
<br>
Can you try to create terms.tbx with the following content and use it?<br>
<br>
&lt;?xml version=&#39;1.0&#39; encoding=&#39;UTF-8&#39;?&gt;<br>
&lt;!DOCTYPE martif PUBLIC &#39;ISO 12200:1999A//DTD MARTIF core (DXFcdV04)//EN&#39; \
<br> &#39;TBXcdv04.dtd&#39;&gt;<br>
&lt;martif xml:lang=&quot;en&quot; type=&quot;TBX&quot;&gt;<br>
      &lt;martifHeader&gt;<br>
            &lt;fileDesc&gt;<br>
                  &lt;titleStmt&gt;<br>
                        &lt;title&gt;Hindi Team Glossary&lt;/title&gt;<br>
                  &lt;/titleStmt&gt;<br>
            &lt;/fileDesc&gt;<br>
            &lt;encodingDesc&gt;<br>
                  &lt;p type=&quot;DCSName&quot;&gt;SYSTEM \
&quot;TBXDCSv05b.xml&quot;&lt;/p&gt;<br>  &lt;/encodingDesc&gt;<br>
      &lt;/martifHeader&gt;<br>
      &lt;text&gt;<br>
            &lt;body&gt;<br>
                  &lt;termEntry id=&quot;duffy_duck&quot;&gt;<br>
                        &lt;langSet xml:lang=&quot;en_US&quot;&gt;<br>
                              &lt;ntig&gt;<br>
                                    &lt;termGrp&gt;<br>
                                          &lt;term&gt;test&lt;/term&gt;<br>
                                    &lt;/termGrp&gt;<br>
                              &lt;/ntig&gt;<br>
                        &lt;/langSet&gt;<br>
                        &lt;langSet xml:lang=&quot;hi&quot;&gt;<br>
                              &lt;ntig&gt;<br>
                                    &lt;termGrp&gt;<br>
                                          &lt;term&gt;test&lt;/term&gt;<br>
                                    &lt;/termGrp&gt;<br>
                              &lt;/ntig&gt;<br>
                        &lt;/langSet&gt;<br>
                  &lt;/termEntry&gt;<br>
      &lt;/body&gt;<br>
      &lt;/text&gt;<br>
&lt;/martif&gt;<br>
<br>
<br>
Thanks in advance for your answers.<br>
<br>
Best regards,<br>
Yuri<br>
<br>
<br>
<br>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr" \
class="gmail_signature"><div dir="ltr">Simon Depiets</div></div>


["image.png" (image/png)]

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

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