elementary / docs

Documentation for 3rd-party app development
https://docs.elementary.io
78 stars 30 forks source link

Translations example fails ninja install after Step 9 #121

Open aral opened 2 years ago

aral commented 2 years ago

What Happened

Not sure if I did something wrong but the Translation example (docs/writing-apps/our-first-app/translations.md) fails to install if you run ninja install after Step 9.

Expected Behavior

It should work as before.

Steps to Reproduce

  1. Follow the instructions at https://docs.elementary.io/develop/writing-apps/our-first-app/translations
  2. Run ninja install after Step 9.

Logs

[0/1] Installing files.
Installation failed due to insufficient permissions.
Attempting to use polkit to gain elevated privileges...
Installing org.small-tech.hello-world to /usr/bin
Installing org.small-tech.hello-world.desktop to /usr/share/applications
Installing org.small-tech.hello-world.appdata.xml to /usr/share/metainfo
Running custom install script '/usr/bin/meson --internal gettext install --subdir=po --localedir=share/locale --pkgname=org.small-tech.hello-world'
msgfmt: error while opening "/home/aral/Projects/learning/gtk-hello/build/po/de.gmo" for writing: No such file or directory
Traceback (most recent call last):
  File "/usr/bin/meson", line 20, in <module>
    sys.exit(mesonmain.main())
  File "/usr/lib/python3/dist-packages/mesonbuild/mesonmain.py", line 226, in main
    return run(sys.argv[1:], launcher)
  File "/usr/lib/python3/dist-packages/mesonbuild/mesonmain.py", line 215, in run
    return run_script_command(args[1], args[2:])
  File "/usr/lib/python3/dist-packages/mesonbuild/mesonmain.py", line 163, in run_script_command
    return module.run(script_args)
  File "/usr/lib/python3/dist-packages/mesonbuild/scripts/gettext.py", line 118, in run
    if gen_gmo(src_sub, bld_sub, langs) != 0:
  File "/usr/lib/python3/dist-packages/mesonbuild/scripts/gettext.py", line 65, in gen_gmo
    subprocess.check_call(['msgfmt', os.path.join(src_sub, l + '.po'),
  File "/usr/lib/python3.8/subprocess.py", line 364, in check_call
    raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['msgfmt', '/home/aral/Projects/learning/gtk-hello/po/de.po', '-o', '/home/aral/Projects/learning/gtk-hello/build/po/de.gmo']' returned non-zero exit status 1.
FAILED: meson-install 
/usr/bin/meson install --no-rebuild
ninja: build stopped: subcommand failed.

Platform Information

OS: elementary OS 6 Odin x86_64 
Host: LabTop Mk IV 
Kernel: 5.11.0-25-generic 
Uptime: 1 day, 4 hours, 14 mins 
Packages: 2078 (dpkg), 29 (flatpak) 
Shell: fish 3.3.1 
Resolution: 3840x2160 
DE: Pantheon 
WM: Mutter(Gala) 
Terminal: io.elementary.t 
CPU: Intel i7-10710U (12) @ 4.700GHz 
GPU: Intel Device 9bca 
Memory: 4247MiB / 15875MiB 
aral commented 2 years ago

Huh, odd, after completing the icons bit, I ran it again and no errors this time. Perhaps a first-run error? Please feel free to close if you cannot reproduce.

[0/1] Installing files.
Installation failed due to insufficient permissions.
Attempting to use polkit to gain elevated privileges...
Installing org.small-tech.hello-world to /usr/bin
Installing org.small-tech.hello-world.desktop to /usr/share/applications
Installing org.small-tech.hello-world.appdata.xml to /usr/share/metainfo
Installing /home/aral/Projects/learning/gtk-hello/data/16.svg to /usr/share/icons/hicolor/16x16/apps
Installing /home/aral/Projects/learning/gtk-hello/data/16.svg to /usr/share/icons/hicolor/16x16@2/apps
Installing /home/aral/Projects/learning/gtk-hello/data/24.svg to /usr/share/icons/hicolor/24x24/apps
Installing /home/aral/Projects/learning/gtk-hello/data/24.svg to /usr/share/icons/hicolor/24x24@2/apps
Installing /home/aral/Projects/learning/gtk-hello/data/32.svg to /usr/share/icons/hicolor/32x32/apps
Installing /home/aral/Projects/learning/gtk-hello/data/32.svg to /usr/share/icons/hicolor/32x32@2/apps
Installing /home/aral/Projects/learning/gtk-hello/data/48.svg to /usr/share/icons/hicolor/48x48/apps
Installing /home/aral/Projects/learning/gtk-hello/data/48.svg to /usr/share/icons/hicolor/48x48@2/apps
Installing /home/aral/Projects/learning/gtk-hello/data/64.svg to /usr/share/icons/hicolor/64x64/apps
Installing /home/aral/Projects/learning/gtk-hello/data/64.svg to /usr/share/icons/hicolor/64x64@2/apps
Installing /home/aral/Projects/learning/gtk-hello/data/128.svg to /usr/share/icons/hicolor/128x128/apps
Installing /home/aral/Projects/learning/gtk-hello/data/128.svg to /usr/share/icons/hicolor/128x128@2/apps
Running custom install script '/usr/bin/meson --internal gettext install --subdir=po --localedir=share/locale --pkgname=org.small-tech.hello-world'
Installing /home/aral/Projects/learning/gtk-hello/build/po/de.gmo to /usr/share/locale/de/LC_MESSAGES/org.small-tech.hello-world.mo
Installing /home/aral/Projects/learning/gtk-hello/build/po/es.gmo to /usr/share/locale/es/LC_MESSAGES/org.small-tech.hello-world.mo