[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'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 <<a href="mailto:yurchor@ukr.net">yurchor@ukr.net</a>> 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> > \
Hi<br> > <br>
> On Friday, 14 August, 2020 11:51:28 AM IST Yuri Chornoivan wrote:<br>
> > Is the path for the glossary in your project settings (Project -><br>
> > Configure<br>
> > Project...) writable? What are the permissions on terms.tbx?<br>
> > <br>
> > $ ls -l terms.tbx<br>
> > -rw-r--r-- 1 yurchor yurchor 49414 сер 14 08:25 terms.tbx<br>
> <br>
> Yes the folder has write permission<br>
> This is the output of ` ls -l .` on the project folder.<br>
> ```<br>
> drwxr-xr-x 1 raghu raghu 100 Aug 14 11:14 .<br>
> drwxr-xr-x 1 raghu raghu 22 Aug 14 10:24 ..<br>
> -rw------- 1 raghu raghu 127 Aug 14 11:14 index.lokalize<br>
> drwxr-xr-x 1 raghu raghu 4368 Aug 14 10:25 messages<br>
> ```<br>
> <br>
> > > Do I need to have pre-exisiting terms.tbx file to save it?<br>
> > <br>
> > No (just tested by removing terms.tbx).<br>
> <br>
> Lokalize doesn't create the terms.tbx file for me. 😞<br>
> <br>
> I am using Version 20.04.3 of lokalize<br>
> <br>
> 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->setEnabled(false);<br>
- foreach (const QByteArray& termId, QSet<QByteArray>(termIds.begin(), \
<br> termIds.end())) {<br>
+ foreach (const QByteArray& termId, termIds.toSet()) {<br>
// now check which of them are really hits...<br>
foreach (const QString& 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>
<?xml version='1.0' encoding='UTF-8'?><br>
<!DOCTYPE martif PUBLIC 'ISO 12200:1999A//DTD MARTIF core (DXFcdV04)//EN' \
<br> 'TBXcdv04.dtd'><br>
<martif xml:lang="en" type="TBX"><br>
<martifHeader><br>
<fileDesc><br>
<titleStmt><br>
<title>Hindi Team Glossary</title><br>
</titleStmt><br>
</fileDesc><br>
<encodingDesc><br>
<p type="DCSName">SYSTEM \
"TBXDCSv05b.xml"</p><br> </encodingDesc><br>
</martifHeader><br>
<text><br>
<body><br>
<termEntry id="duffy_duck"><br>
<langSet xml:lang="en_US"><br>
<ntig><br>
<termGrp><br>
<term>test</term><br>
</termGrp><br>
</ntig><br>
</langSet><br>
<langSet xml:lang="hi"><br>
<ntig><br>
<termGrp><br>
<term>test</term><br>
</termGrp><br>
</ntig><br>
</langSet><br>
</termEntry><br>
</body><br>
</text><br>
</martif><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