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

List:       kde-i18n-doc
Subject:    Re: Scripty's third branch and the transition to kf5
From:       Burkhard =?ISO-8859-1?Q?L=FCck?= <lueck () hube-lueck ! de>
Date:       2014-05-04 21:54:31
Message-ID: 2463861.xAthktt7HW () parodia
[Download RAW message or body]

Am Sonntag, 4. Mai 2014, 23:10:02 schrieb Albert Astals Cid:
> El Diumenge, 4 de maig de 2014, a les 22:59:22, Burkhard Lück va escriure:
> > Am Sonntag, 4. Mai 2014, 22:06:32 schrieb Albert Astals Cid:
> > > El Diumenge, 4 de maig de 2014, a les 21:57:29, Burkhard Lück va 
escriure:
> > > > Am Sonntag, 4. Mai 2014, 21:07:42 schrieb Luigi Toscano:
> > > > > Burkhard Lück ha scritto:
> > > > > > Am Samstag, 3. Mai 2014, 15:54:09 schrieb Burkhard Lück:
> > > > > >>> * in subdir data some teams have three autocorrect subdirs in
> > > > > >>> kdelibs, koffice and calligra, this should be fixed before copy
> > > > > >>> them
> > > > > >>> over
> > > > > > 
> > > > > > 1) data/koffice/autocorrect has to be removed
> > > > > 
> > > > > No doubts here.
> > > > > 
> > > > > > 2) data/kdelibs/autocorrect was commited by by aacid 19 month ago
> > > > > > with
> > > > > > the
> > > > > > log:
> > > > > > "Move calligra autocorrect to kdelibs
> > > > > > It's now used by both kdelibs and kmail"
> > > > > 
> > > > > Albert, do you remember why?
> > > > > 
> > > > > > $ wcgrep autocorrect kdelibs/ -> no hit
> > > > > > 
> > > > > > kdepim/pimcommon/autocorrection/autocorrection.cpp
> > > > > > QString kdelang = locale->languageList().first();
> > > > > > ...
> > > > > > fname = KGlobal::dirs()->findResource("data",
> > > > > > QLatin1String("autocorrect/") + kdelang + QLatin1String(".xml"));
> > > > > > 
> > > > > > de/data/kdelibs/autocorrect/CMakeLists.txt:
> > > > > > install( FILES  de_DE.xml DESTINATION
> > > > > > ${DATA_INSTALL_DIR}/autocorrect
> > > > > > )
> > > > > > Name of autocorrect file in german is "de_DE.xml"
> > > > > > 
> > > > > > 3) data/calligra/autocorrect/
> > > > > > calligra/plugins/textediting/autocorrection/Autocorrect.cpp
> > > > > > QString kdelang = locale->languageList().first();
> > > > > > ...
> > > > > > 
> > > > > >     folders << QLatin1String("") << QLatin1String("calligra/");
> > > > > >     QString fname;
> > > > > >     Q_FOREACH(const QString& path, folders)
> > > > > >     {
> > > > > > 
> > > > > > ...
> > > > > > 
> > > > > >         if (m_autocorrectLang != "all_languages") {
> > > > > >         
> > > > > >             if (fname.isEmpty() && !kdelang.isEmpty())
> > > > > >             
> > > > > >                 fname = KGlobal::dirs()->findResource("data", path
> > > > > >                 +
> > > > > > 
> > > > > > "autocorrect/" + kdelang + ".xml");
> > > > > > 
> > > > > > de/data/calligra/autocorrect/CMakeLists.txt:
> > > > > > install( FILES  de.xml DESTINATION
> > > > > > ${DATA_INSTALL_DIR}/calligra/autocorrect ) Name of autocorrect
> > > > > > file
> > > > > > in
> > > > > > german is "de.xml"
> > > > > > 
> > > > > > In 2 + 3 both have kdelang = locale->languageList().first();, but
> > > > > > the
> > > > > > language autocorrect xml in de/data have different names, for
> > > > > > calligra
> > > > > > "de.xml" and for kdelibs/kmail "de_DE.xml".
> > > > > > Is that really correct?
> > > > > 
> > > > > I don't have the answer; if the idea is to move it in kdelibs, it
> > > > > should
> > > > > be
> > > > > shipped with some framework. When kmail and calligra are ported they
> > > > > can
> > > > > refer to the common file in the porting phase.
> > > > 
> > > > From my pov this is already an issue in 4.13 + calligra 2.8.
> > > > Question is what is the return value of
> > > > locale->languageList().first();
> > > > "de" or "de_DE"?
> > > > So what is the correct name for the autocorrect xml in german,
> > > > "de.xml"
> > > > or
> > > > "de_DE.xml"?
> > > 
> > > I guess the first question should be why are we installing two copies of
> > > the files if my commit message said "move" and not copy :D
> > 
> > We do not only install two copies of the autocorrect xml, but also two
> > similar code files to load the autocorrect xml, i. e. autocorrection.cpp
> > in
> > kdepim + Autocorrect.cpp in calligra.
> > 
> > The autocorrection code looks like a candidate for kdelibs/frameworks.
> > 
> > > It's probably de.xml, but it'd be easier if you just can try running
> > > strace
> > > on the code that does that and see which file it tries to open.
> > 
> > strace calligrawords in 4.13:
> > access("/home/kdestable/.kde413/share/apps/autocorrect/de.xml", R_OK) = -1
> > ENOENT (No such file or directory)
> > 
> > Looks like the correct filename is "de.xml", not "de_DE.xml".
> > 
> > So in kdelibs/autocorrect/ the filename de_DE.xml has to be changed to
> > de.xml and in CMakeLists.txt as well, similar in all langs in KDE 4.13 /
> > calligra 2.8 and kde4/calligra master
> 
> Well, you'll have to delete the calligra one, otherwise it'll collide on
> installation and distros won't be happy.
> 
I doubt that, because they have different install targets 
${DATA_INSTALL_DIR}/calligra/autocorrect vs ${DATA_INSTALL_DIR}/autocorrect, 
so I see no clash here.

-- 
Burkhard Lück

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

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