×

INDI Library v2.0.7 is Released (01 Apr 2024)

Bi-monthly release with minor bug fixes and improvements

Compiling kstars with language-support fails

  • Posts: 61
  • Thank you received: 10
My OS is openSUSE-Tumbleweed. I clone indi, astrometry.net and kstars from git and compile and install them. I want to run kstars in german, but I cannot change its language. Only english is vailable. I compiled and installed kstars like this:
sternenkarten.com/2019/03/25/neues-von-d...en-und-installieren/

I searched, how to get other languages for kstars. in the CMakeLists.txt I found a solution, I thought:
seescho.files.wordpress.com/2019/04/01-fetch-translations.jpg
I started building kstars with this DFETCH-option from the buildfile:
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DFETCH_TRANSLATIONS=ON ~/astrostuff/kstars &&\
make &&\
sudo make install
But no other languages were build. I saw a message: "... option is clearing the normal variable 'KDE_L10N_AUTO_TRANSLATIONS'. " See this screenshot:
seescho.files.wordpress.com/2019/04/02-compatibility-issues.jpg

No clue why, but I decided to hardcode "SET(FETCH_TRANSLATIONS ON)" into the makefile:
seescho.files.wordpress.com/2019/04/03-hardcode.jpg
Another try with
cd ~/astrostuff/kstars/build/kstars &&\
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release ~/astrostuff/kstars &&\
make &&\
sudo make install

And now. the releaseme-scripts were cloned from kde into "kstars/build/kstars" and a po-directory was generated, which contained po-files for all the languages:
seescho.files.wordpress.com/2019/04/04-po-files.jpg
But kstars was idiosyncratic. It was adamant that it would not provide more than one language (english). "locale" for the other languages was missing.

I found a solution for this dilemma. Now, that I had the po-files in the build-directory of kstars, I had to remove the hardcoded part from the makefile . In the new build-process I had to unset the "FETCH_TRANSLATIONS"-Variable like this
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DFETCH_TRANSLATIONS=OFF ~/astrostuff/kstars
make &&\
sudo make install

And what shall I say, the locale "kstars.mo" was generated in the build-dir and installed to /usr/share/locale/.../LC_MESSAGES

So my question: Is there an easier way to get language-support for kstars, if I compile kstars myself? What was my fault?
4 years 11 months ago #38532

Please Log in or Create an account to join the conversation.

  • Posts: 61
  • Thank you received: 10
I found for me an workaround for this odd behavior. Tested on openSUSE Tumbleweed
mkdir ~/astrostuff (1)
cd ~/astrostuff (2)
git clone git://anongit.kde.org/kstars.git (3)
 
mkdir -p ~/astrostuff/kstars/build/kstars (4)
cd ~/astrostuff/kstars/build/kstars (5)
 
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DFETCH_TRANSLATIONS=ON ~/astrostuff/kstars (6)
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DFETCH_TRANSLATIONS=ON ~/astrostuff/kstars (7)
make (8)
 
cmake -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release -DFETCH_TRANSLATIONS=OFF ~/astrostuff/kstars (9)
make (10)
 
sudo make install (11)


1. Create a directory for kstars, astrometry.net and indi
2. Change into this directory
3. Clone kstars from git into this directory

4. Make a directory for the build files of kstars
5. Change into this build-directory

6. Generate the build-files for kstars

In the terminal you can see this warning:
"For compatibility with older versions of CMake, option is clearing the
normal variable 'KDE_L10N_AUTO_TRANSLATIONS'."

Now, if you would tpye "make" into the terminal, no language files would be downloaded. So, first:

7. Generate the build files for kstars a second time

Now no compatibility warnig appears in the terminal

8. Build kstars

A po-directory is created and the language-files (po-files) are downloaded into this po-directory. But the locales are missing, so no language-support will be created.

9. Create the build files for kstars a third time ( with -DFETCH_TRANSLATIONS=OFF). This time an empty locale-directory for the mo-files is generated
10. Build kstars once more, this time with language-support

11. Install the whole stuff. The mo-locales for the German language are installed into "/usr/share/locale/de/LC_MESSAGES/kstars.mo"

And now, you have a self-compiled kstars with support for other languages.
4 years 11 months ago #38557

Please Log in or Create an account to join the conversation.

Time to create page: 0.182 seconds