Linux あれこれ

Linux 関連(一部 Windows11 )の備忘録です。

「Lubuntu 25.04」にて、「lubuntu-update」の翻訳にトライ〈H175-5〉

登録日: 2025-08-11 更新日: 2025-08-23

前回 、「VirtualBox 7.1.10」に「Lubuntu 25.04」をインストールしました。

-

今回 は、その「Lubuntu 25.04」にて、システム更新の通知とシステム更新を行う「lubuntu-update」を翻訳してみました:

-

「Lubuntu 20.10」で同じ機能を持つ「Update Notifier」と「Apply Full Upgrade」は、python で書かれていて、国際化しきれていませんでした。

今回の「Lubuntu Update」は、国際化に対応した Qt (C++) で書かれているので、(プログラムが対応していれば行けるはずなので)少し期待できそう:

ただし、Ubuntu は、Qt6 に移行しているところなので、その辺りがどうかです。

-

その備忘録です。

-

-

使用したPC は、新しく購入した ミニPC「MINISFORUM NAB5」です。
プロセッサは「Core i5-12450H」で、メモリ 16GB、SSD 512GB です。

-

(注)リンクを戻るときはブラウザの左上の「←」をクリック
Android スマホであれば「ホーム」ボタン隣の「<」をタップ

-

-


目次

-

今回の作業:

  1. 「仮想マシン」の準備:

  2.  事前作業:

  3.  ビルドに必要な依存パッケージをインストール:

  4.  ソースファイルをダウンロード:

  5.  翻訳する言語に「日本語」を追加:

  6. 「日本語」のテンプレートファイルを翻訳:

  7.  ビルドするための残りの設定:

  8. 「lubuntu-update」を削除後、「cmake」を指定なしで実行(日本語化成功):

-

参考になりそうな作業:

  1. 「日本語」のテンプレートファイル(翻訳前):

  2. 「日本語」のテンプレートファイル(翻訳後):

  3. 「Qt 5.15」の場合に、「lubuntu-update」の「cmake」に必要な依存パッケージをインストール:

  4. 「Qt6」の場合に、「lubuntu-update」の「cmake」に必要な依存パッケージをインストール:

  5. 「lubuntu-update」アプリのビルドについての説明:

  6.  翻訳する言語に「日本語」を追加、失敗した例:

  7. 「Qt 5.15」の場合に「cmake」を実行、失敗した例:

  8. 「Qt6」の場合に「cmake」を実行、失敗した例:

  9.  インストール先に「~/local」を指定して「cmake」を実行、成功した例:

  10. 「日本語」の翻訳だけビルドして、配置する場合:

  11.  インストール先に「~/local」を指定してビルドする場合:

  12.  日本語化に成功したビルドのやり方:

  13. 「Lubuntu」で「パネル」が消えた場合の対応:

  14. 「Lubuntu」で「パネル」の設定ファイルを退避:

-

「まとめ へ」

「目次詳細 へ」

-

-


- --- - --- - --- - --- - --- - --- - --- - -

ホストOS の「Xubuntu 24.04.2 LTS」を立ち上げ:

-

仮想マシンの「Lubuntu 25.04」を起動:

→デスクトップ画面の半分のサイズに変更して、右に移動しました:

壁紙はデフォルトです。

-

目立たないけど、使い勝手が良くなるようにカスタマイズしています:

-

-


- --- - --- - --- - --- - --- - --- - --- - --

VirtualBox」について:

-

VirtualBox 」は、Oracle(オラクル)社が開発している「仮想マシン」を構築するためのソフトウェアです。

-

-

-


- --- - --- - --- - --- - --- - --- - --- - ---

「Lubuntu」について:

-

Ubuntu の公式フレーバー(性格の違う兄弟?)です

「Lubuntu」(ルブントゥ)は、 Ubuntu をベースにした、Qt ベースの、軽量な「LXQt」デスクトップ環境です。 低スペックのPC でも使えるように、リソースを節約するように設計されています。

Ubuntu がベースなので、多くのノウハウ、情報等があること、および問題の少ない「x11」で動いていることが強みです。

-

LXQt はツールキットに「Qt」を採用しています。

-

-


現在のOS のバージョンを表示:

-

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

ホストOS : 「Xubuntu 24.04.3 LTS」

2025-08-11 現在

-

カーネル:
$ uname -r
6.8.0-71-generic

→LTS版は安定志向なので、更新の回数は少なめです:

-

リリース:
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=24.04
DISTRIB_CODENAME=noble
DISTRIB_DESCRIPTION="Ubuntu 24.04.3 LTS"

→LTS 版の更新(ポイントリリース)は、6ヶ月前後で、
 今は「24.04.3」にアップされています

-

x11」と「Wayland」のどちらで動作してるか確認:
$ echo $XDG_SESSION_TYPE
x11

→「Wayland」ではなく、「x11」で動作しています。

-

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

ゲストOS : 「Lubuntu 25.04」

2025-08-11 現在

-

カーネル:
$ uname -r
6.14.0-27-generic

→ホストOS よりも進んでいます:

-

リリース:
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=25.04
DISTRIB_CODENAME=plucky
DISTRIB_DESCRIPTION="Ubuntu 25.04"

→通常版はサポートが短く、2026-01 までです:

-

x11」と「Wayland」のどちらで動作してるか確認:
$ echo $XDG_SESSION_TYPE
x11

→「Wayland」ではなく、「x11」で動作しています。

-

-


- --- - --- - --- - --- - --- - --- - --- - ----

1. 作業用の「Lubuntu 25.04」の仮想マシンを準備:

-

前回作成した、「Lubuntu 25.04」をインストールした「仮想マシン」を、クローン作成で退避:

退避後は、元の「Lubuntu 25.04」の「仮想マシン」で作業します:

-

作業でシステムが汚れたら、「仮想マシン」を削除。

仮想マシン」 のオリジナルからクローンして、「Lubuntu 25.04」の「仮想マシン」を再び作成。

それを作業に使います:

-


1). 「VirtualBox」マネージャを起動:

-


2). 仮想マシンの「Lubuntu25-04」を右クリック→「クローン」

名前: 「Lubuntu25-04 のオリジナル」

→「完了」

-


3). 仮想マシンの「Lubuntu25-04 のオリジナル」が作成されました:

→「Lubuntu25-04 のオリジナル」はさわらずに保存しておきます:

-

確実で早くて、安全ですが、同じサイズのディスク容量が消費されるのが難点です:

-


4). 以降の作業は、元の「Lubuntu25-04」で行います:

-

-


- --- - --- - --- - --- - --- - --- - --- - -----

2. 事前作業:

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- -

2-1. 「Lubuntu Update」を翻訳する手順を確認:

-

GitHub: lubuntu-team/lubuntu-update

「Lubuntu Update」は、Qt(つまり、C++)で書かれているみたい:

なので国際化はやりやすいと思います。言語によっては国際化のやり方がバラバラで、難しい言語があります:

-

README.mdファイルからの抜粋(翻訳):

→内容が更新されておらず、情報が古いので注意:

-

GNU General Public License version 2 でライセンスされてます:

Copyright (c) 2023-2024 Lubuntu Contributors. Licensed under the GNU General Public License version 2, or (at your option) any later version.

-


1). 依存パッケージ:

ビルド時: Qt 5.15、cmake        ←(Qt6 の誤り)
実行時:  apt、apt-get、curl、diff

-


2). ビルド:

cd lubuntu-update
mkdir build
cd build
cmake ..
make -j$(nproc)

→「make install」の記述がされていないのがポイント:

-

使用するには、
「lubuntu-update-backend」スクリプトを「/usr/libexec/lubuntu-update-backend」にコピーし、
 次に、「lubuntu-update」をコンパイルして実行します。

-

「lubuntu-update」を「sudo make install」などで、システムにインストールしないことを、強くお勧めします。

→まだ完全ではないらしいので注意:

-

テストと開発に Lubuntu の「仮想マシン」を使用することを強くお勧めします。
可能な限り最新の開発リリースを使用してください。

→まだ完全ではないらしいので注意:

-

「Qt Creator」は、コードの編集に推奨されます。

Ubuntu の公式リポジトリに存在し、

「sudo apt install qtcreator」でインストールできます。

-


3). 設定ファイル:

「nextDoReleaseUpgradeNotify=123456789」値は、秒数です。  
ユーザにアップグレードをいつ提供するかを決定するために使用されます。

-

さらっと書かれていますが、「lubuntu-update」を使うときに重要なことです:

説明が足りないので、
どの「設定ファイル」のことか、どのように設定するのか(エディタでスクリプトを修正するのか、GUI で設定できるのか)、今のところ、わかりません:

-


4). 制限:

パッケージをダブルクリックしても、詳細な情報は表示されません。

リリースアップグレードのサポートはありません。

翻訳サポートはほとんどテストされていませんが、機能するはずです。

-


5). 翻訳について:

-

(1). 翻訳する新しい言語を追加するには:

1. 「gen_ts.sh」スクリプトを開き、新しい言語のロケールコードを「langList」配列に追加します:

-

2. 上記を行った後に「gen_ts.sh」スクリプトを実行します:

→新しいテンプレートファイル「.ts」が、「src/translations/」に生成されます:

-

3. 次に、新しいテンプレートファイルを「CMakeLists.txt」の「TS_FILES」リストに追加します:

→「src/translations/lubuntu-update_locale_CODE.ts」という名前です:

 ここで、「locale_CODE」は追加した言語のロケールコードです:

-

4. 最後に、「src/translations.qrc」リソースファイルに下記の行を追加して、新しい翻訳ファイルを登録します:

 行は、下記のようにする必要があります:

 <file alias="locale_CODE">lubuntu-update_locale_CODE.qm</file>

-

 ここで、「locale_CODE」は追加した言語のロケールコードです:

 この行は <qresource> タグで囲む必要があります:

-

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

(2). 例: 翻訳できる言語のリストに「中国語」を追加する場合:

以下を行います:

vim gen_ts.sh
# 以下のコードをLangList 配列に追加します:
#    'zh_CN'

-

./gen_ts.sh

-

vim CMakeLists.txt
# 以下の行をTS_FILES リストに追加します:
#    src/translations/lubuntu-update_zh_CN.ts

-

vim src/translations.qrc
# 以下の行をファイルリソースのリストに追加します:
#    <file alias="zh_CN">lubuntu-update_zh_CN.qm</file>

プログラムは、ビルド時に追加された「言語」を拾いあげます。

新しい言語を選択するプログラムユーザに、
新しく作成された「.ts」ファイルに追加された翻訳が示されます。

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- --

2-2. 「Lubuntu Update」関連のファイルの配置を確認:

-


1). lubuntu-update 関連のファイルを検索:

$ sudo find / -name lubuntu-up*
:
/usr/bin/lubuntu-update                 ←(実行ファイル)
/usr/libexec/lubuntu-update-backend          ←(スクリプト)
/usr/share/applications/lubuntu-update.desktop           ←(注目)
/usr/share/doc/lubuntu-update-notifier
/etc/xdg/autostart/lubuntu-update-autostart.desktop        ←(注目)
/etc/xdg/xdg-Lubuntu/autostart/lubuntu-update-autostart.desktop ←(注目)
find: ‘/run/user/1000/doc’: 許可がありません
find: ‘/run/user/1000/gvfs’: 許可がありません
/var/lib/dpkg/info/lubuntu-update-notifier.postinst
/var/lib/dpkg/info/lubuntu-update-notifier.md5sums
/var/lib/dpkg/info/lubuntu-update-notifier.conffiles
/var/lib/dpkg/info/lubuntu-update-notifier.list

-


2). デスクトップファイルの確認:

-

(1). 「lubuntu-update.desktop」の確認:
$ cat /usr/share/applications/lubuntu-update.desktop
[Desktop Entry]
Exec=/usr/bin/lubuntu-update
Name=Lubuntu Update
GenericName=Lubuntu Update
Comment=View available updates and optionally install them
Icon=system-software-update
Type=Application
Version=0.1
Categories=System;Settings;
Keywords=upgrade;update
Terminal=false

コメントの和訳:

利用可能な更新を表示し、オプションでそれらをインストールします:

-

→実行ファイルは「/usr/bin/lubuntu-update」です

-

(2). 「lubuntu-update-autostart.desktop」の確認:
$ cat /etc/xdg/autostart/lubuntu-update-autostart.desktop
[Desktop Entry]
Exec=/usr/bin/lubuntu-update
NoDisplay=true
Name=Lubuntu Update Autostart
Icon=system-software-update
Type=Application
Version=0.1

→実行ファイルは「/usr/bin/lubuntu-update」です

-

(3). 「lubuntu-update-autostart.desktop」の確認2:
$ cat /etc/xdg/xdg-Lubuntu/autostart/lubuntu-update-autostart.desktop
[Desktop Entry]
Name=Lubuntu Update
Comment=lubuntu-update
Exec=/usr/bin/lubuntu-update
Type=Application
X-LXQt-Module=true

→実行ファイルは「/usr/bin/lubuntu-update」です

-


3). バックエンドの「lubuntu-update-backend」スクリプトの確認:

2025-08-06 現在:

$ cat /usr/libexec/lubuntu-update-backend
#!/bin/bash
# Backend script for Lubuntu Update (does text processing and update installation, can be run as root and must be in order to install updates)

set -e
export LC_ALL='C'

# Returns 0 if the release is supported, 1 if unsupported, 2 if if didn't exist at all, and 3 if something went wrong.
isReleaseSupported () {
        releaseYear="${1:-}";
        releaseMonth="${2:-}";
        metaReleaseStr="${3:-}";

        if [ -z "$releaseYear" ]; then
                echo '! ! ! releaseYear is blank';
                return 3;
        elif [ -z "$releaseMonth" ]; then
                echo '! ! ! releaseMonth is blank';
                return 3;
        elif [ -z "$metaReleaseStr" ]; then
                echo '! ! ! metaReleaseStr is blank';
                return 3;
        fi

        releaseCode="$releaseYear.$releaseMonth";
        scanForSupported='n';

        while IFS= read -r line || [[ -n $line ]]; do
                if [[ "$line" =~ $releaseCode ]]; then
                        scanForSupported='y';
                fi
                if [ "$scanForSupported" = 'y' ]; then
                        if [[ "$line" =~ Supported ]]; then
                                if [ "$(echo "$line" | cut -d':' -f2 | tail -c+2)" = '0' ]; then
                                        return 1;
                                else
                                        return 0;
                                fi
                        fi
                fi
        done < <(printf '%s' "$metaReleaseStr")
        return 2;
}

if [ "$1" = 'pkgver' ]; then
        shift
        while [ "$1" != '' ]; do
                source="$(apt-cache show "$1" | grep 'Source:' | cut -d' ' -f2)"
                version="$(apt-cache show "$1" | grep Version: | head -n1 | cut -d' ' -f2)"
                if [ "$source" = '' ]; then
                        echo "$1"
                else
                        echo "$source"
                fi
                echo "$version"
                shift
        done
elif [ "$1" = 'checkupdate' ]; then
        apt-get -o Apt::Color='0' -o Dpkg::Use-Pty='0' update
elif [ "$1" = 'doupdate' ]; then
        # Prepare to be able to grep through the logs
        rm /run/lubuntu-update-apt-log || true
        touch /run/lubuntu-update-apt-log
        chmod 0600 /run/lubuntu-update-apt-log # prevent non-root from being able to trick the script into deleting arbitrary files later on

        # Repair an interrupted upgrade if necessary
        dpkg --configure -a

        # Run the real update
        DEBIAN_FRONTEND='noninteractive' apt-get -o Dpkg::Options::='--force-confdef' -o Dpkg::Options::='--force-confold' -o Apt::Color='0' -o Dpkg::Use-Pty='0' -y dist-upgrade |& tee /run/lubuntu-update-apt-log

        # Find all the conffiles
        doConffiles='y';
        mapfile conffileRawList <<< "$(grep -P "^Configuration file \'.*\'$" '/run/lubuntu-update-apt-log')"
        if [ "$(echo "${conffileRawList[0]}" | head -c1)" != 'C' ]; then # Empty or invalid list, we're done
                doConffiles='n';
        fi

        if [ "$doConffiles" = 'y' ]; then
                conffileList=()
                counter=0
                while [ "$counter" -lt "${#conffileRawList[@]}" ]; do
                        # Cut off "Configuration file '" from the start and "'" plus a couple trailing characters from the end
                        conffileList[counter]="$(echo "${conffileRawList[$counter]}" | tail -c+21 | head -c-3)"
                        counter=$((counter+1))
                done

                echo "Lubuntu Update !!! CONFIGURATION FILE LIST START";
                counter=0
                while [ "$counter" -lt "${#conffileList[@]}" ]; do
                        echo "${conffileList[$counter]}"
                        counter=$((counter+1))
                done
                echo "Lubuntu Update !!! CONFIGURATION FILE LIST END";

                # If we make it this far, there were conffiles to deal with
                breakLoop='no'
                gotCommand='no'
                commandName=''
                while [ "$breakLoop" = 'no' ]; do
                        read -r inputVal
                        if [ "$gotCommand" = 'no' ]; then
                                if [ "$inputVal" = 'done' ]; then
                                        breakLoop='yes'
                                else
                                        commandName="$inputVal"
                                        gotCommand='yes'
                                fi
                        else
                                if [ "$commandName" = 'replace' ]; then # Replace an existing file
                                        counter=0
                                        while [ "$counter" -lt "${#conffileList[@]}" ]; do
                                                if [ "$inputVal" = "${conffileList[$counter]}" ]; then
                                                        mv "$inputVal.dpkg-dist" "$inputVal"
                                                        break
                                                fi
                                                counter=$((counter+1))
                                        done
                                elif [ "$commandName" = 'keep' ]; then # Keep an existing file
                                        counter=0
                                        while [ "$counter" -lt "${#conffileList[@]}" ]; do
                                                if [ "$inputVal" = "${conffileList[$counter]}" ]; then
                                                        rm "$inputVal.dpkg-dist"
                                                        break
                                                fi
                                                counter=$((counter+1))
                                        done
                                fi
                                gotCommand='no'
                        fi
                done
        fi

        echo 'Checking release status...'

        releaseCode="$(cat /etc/lsb-release | grep "DISTRIB_RELEASE" | cut -d'=' -f2)";
        releaseYear="$(cut -d'.' -f1 <<< "$releaseCode")";
        releaseMonth="$(cut -d'.' -f2 <<< "$releaseCode")";
        metaReleaseData="$(curl https://changelogs.ubuntu.com/meta-release)";
        #nextReleaseMonth='';
        #nextReleaseYear='';
        #nextLTSReleaseMonth='';
        #nextLTSReleaseYear='';

        while true; do
                if ((releaseMonth == 4)); then
                        releaseMonth='10';
                else
                        releaseMonth='04';
                        ((releaseYear++));
                fi
                releaseSupportedResult="$(isReleaseSupported "$releaseYear" "$releaseMonth" "$metaReleaseData"; echo "$?")";
                if [ "$releaseSupportedResult" = '0' ]; then
                        echo 'Lubuntu Update !!! NEW RELEASE';
                        echo "$releaseYear.$releaseMonth";
                elif [ "$releaseSupportedResult" = '2' ]; then
                        break;
                fi
        done

#       if ((releaseMonth == 4)); then
#               nextReleaseMonth=$((releaseMonth + 6));
#               nextReleaseYear="$releaseYear";
#               if (((releaseYear % 2) == 0)); then
#                       nextLTSReleaseMonth='04';
#                       nextLTSReleaseYear=$((releaseYear + 2));
#               fi
#       else
#               nextReleaseMonth="$releaseMonth";
#               nextReleaseYear=$((releaseYear + 1));
#       fi
#
#       if [ -n "$nextLTSReleaseYear" ]; then
#               if isReleaseSupported "$nextLTSReleaseYear" "$nextLTSReleaseMonth" "$metaReleaseData"; then
#                       echo 'Lubuntu Update !!! NEW RELEASE';
#                       echo "$nextLTSReleaseYear.$nextLTSReleaseMonth";
#               fi
#       fi
#
#       if ! (((nextReleaseYear == nextLTSReleaseYear) && (nextReleaseMonth == nextLTSReleaseMonth))); then
#               if isReleaseSupported "$nextReleaseYear" "$nextReleaseMonth" "$metaReleaseData"; then
#                       echo 'Lubuntu Update !!! NEW RELEASE';
#                       echo "$nextReleaseYear.$nextReleaseMonth";
#               else
#                       echo "Unsupported release: $nextReleaseYear.$nextReleaseMonth";
#               fi
#       fi

        echo 'Update installation complete.'
elif [ "$1" = 'doReleaseUpgrade' ]; then
        do-release-upgrade -m desktop -f DistUpgradeViewKDE;
elif [ "$1" = 'declineReleaseUpgrade' ]; then
        sed -i -E 's/^Prompt=(never|lts|normal)$/Prompt=never/' /etc/update-manager/release-upgrades;
fi

コメントの和訳:

Lubuntu Update のバックエンドスクリプト:

(更新をインストールするために必要な、テキスト処理と更新インストールは、root として実行できます)

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ---

3. 「lubuntu-update」のビルドに必要な依存パッケージをインストール:

-

「Qt6」の場合に、「lubuntu-update」の「cmake」に必要な依存パッケージをインストールします:

-

Qt 5.15」の場合の依存パッケージのインストールは、「こちら」:

-


1). 「Qt 6」のインストール:

$ sudo apt install qt6-base-dev
:
Installing:                                                 
  qt6-base-dev

Installing dependencies:
  libgl-dev      libvulkan-dev  libxcb1-dev   qmake6-bin          xorg-sgml-doctools
  libglx-dev     libx11-dev     libxdmcp-dev  qt6-base-dev-tools  xtrans-dev
  libopengl-dev  libxau-dev     qmake6        x11proto-dev

提案パッケージ:
  libx11-doc  libxcb-doc

-

確認:
$ apt list qt6-base-dev
:
qt6-base-dev/plucky,now 6.8.3+dfsg-0ubuntu2 amd64 [インストール済み]

→「Qt5」(qtbase5-dev) と微妙にパッケージ名の付け方が違います:

-


2). 「clang」のインストール:

C/C++/Objective-C コンパイラ:

$ sudo apt install clang
:
Installing:                                                 
  clang

-

確認:
$ apt list clang
:
clang/plucky,now 1:20.0-63ubuntu1 amd64 [インストール済み]

-


3). 「Qt Creator」のインストール:

$ sudo apt install qtcreator
:
Installing:                                                 
  qtcreator
                                                                                                         
Installing dependencies:
  assistant-qt6              libqt6help6                       qdbus-qt6
  clang-tidy                 libqt6qmlcompiler6                qdoc-qt6                                  
  clang-tidy-20              libqt6quick3d6                    qml-qt6                                   
  clangd                     libqt6quick3dassetimport6         qml6-module-qtquick-timeline              
  clangd-20                  libqt6quick3dassetutils6          qml6-module-qtquick3d                     
  designer-qt6               libqt6quick3druntimerender6       qml6-module-qtquick3d-particles3d         
  libcares2                  libqt6quick3dutils6               qt6-declarative-dev-tools                 
  libclang-cpp19             libqt6quicktest6                  qt6-documentation-tools                   
  libgrpc++1.51t64           libqt6quickvectorimagegenerator6  qt6-l10n-tools                            
  libgrpc29t64               libqt6serialport6                 qt6-tools-dev-tools                       
  libprotoc32t64             libqt6uitools6                    qtcreator-data                            
  libqt6charts6              libre2-11                         qtcreator-doc                             
  libqt6designer6            libyaml-cpp0.8                                                              
  libqt6designercomponents6  linguist-qt6                                                                
                                                                                                         
提案パッケージ:
  clazy  meson  subversion  valgrind  python3-pylsp

-

確認:
$ apt list qtcreator
:
qtcreator/plucky,now 15.0.1-1build3 amd64 [インストール済み]

-

$ qtcreator -version
:
Qt Creator 15.0.1 based on Qt 6.8.3

  Android 15.0.1 Develop applications for Android devices.
: 省略

-


4). 「dev-tools」のインストール:

参考:

「Qt 5」の環境の場合、翻訳で使う「gen_ts.sh」スクリプトは、「/usr/lib/qt5/bin/lupdate」のパスが通っていないと実行できませんでした:

→「qttools5-dev-tools」のパッケージをインストールすることでパスが通りました:

-

「Qt 6」の場合も同様だろうと思われます:

-

「dev-tools」がインストールされているか確認:
$ apt list *dev-tools | grep 済
:
pyqt6-dev-tools/plucky,plucky,now 6.8.1-1build1 all [インストール済み、自動]
qt6-base-dev-tools/plucky,now 6.8.3+dfsg-0ubuntu2 amd64 [インストール済み、自動]
qt6-declarative-dev-tools/plucky,now 6.8.3+dfsg-0ubuntu1 amd64 [インストール済み、自動]
qt6-tools-dev-tools/plucky,now 6.8.3-0ubuntu1 amd64 [インストール済み、自動]

-

確認:
$ ls -1 /usr/lib/qt6/bin/l*
:
/usr/lib/qt6/bin/lconvert
/usr/lib/qt6/bin/linguist
/usr/lib/qt6/bin/lrelease    ←(注目)
/usr/lib/qt6/bin/lupdate     ←(注目)

→これなら使えそう:

-


5). Qt6 開発パッケージのインストール:

これがないと、cmake で「Qt6 リンギスト」が認識されません:

$ sudo apt install qt6-tools-dev
:
Installing:                                                 
  qt6-tools-dev

→メニューに「Qt6 リンギスト」は表示されません:

 たぶん、デスクトップファイルが必要と思われます:

-

Qt6 リンギストの実行:
$ /usr/lib/qt6/bin/linguist

-

GUI で「Qt6 リンギスト」が起動されました:

-


6). 他のツールをインストール:

$ sudo apt install cmake curl
:
curl はすでに最新バージョン (8.12.1-3ubuntu1) です。        
curl は手動でインストールしたと設定されました。

Installing:                 
  cmake
                                                                                                         
Installing dependencies:
  cmake-data  libjsoncpp26  librhash1
                                                                                                         
提案パッケージ:
  cmake-doc  cmake-format  elpa-cmake-mode  ninja-build

-


7). 「diff」のツールをインストール:

$ apt list diffutils
:
diffutils/plucky,now 1:3.10-3 amd64 [インストール済み]

→「diff」コマンドが使える、「diffutils」パッケージがインストールされていました:

-

$ whereis diff
:
diff: /usr/bin/diff /usr/share/man/man1/diff.1.gz

→「実行ファイル」と「マニュアル」がありました:

-

実行してみる:
$ diff --help
:
使用法: diff [OPTION]... FILES
FILES を行ごとに比較します。
: 省略

→OK

-


8). Qt (Qt Creator) を起動できるか確認:

メニュー→「プログラミング」→「Qt Creator

「Welcome to Qt Creator」画面が表示:

→1/2 画面だと、横幅が足りないみたい:

終了ボタンが表示されないので、Alt+F4 で終了:

-

「Qt6」の場合、「Qt5」と違って、メニューに「Qt Creator」しか表示されません:

「Qt リンキング」とかの表示もなし。  ←(これがおかしいことだったみたい)

-


9). 「cmake」で、不足している「依存パッケージ」をインストール:

$ sudo apt install libkf6wallet-dev libsqlite3-dev libxkbcommon-dev libxkbfile-dev pkg-config qt6-declarative-dev qt6-svg-dev qt6-webchannel-dev qt6-webengine-dev sqlite3

-


10). 最終的に、「lubuntu-update」の「cmake」に必要な依存パッケージを確認: ★

$ apt list cmake qt6-base-dev qt6-svg-dev libqt6quickwidgets6 xkb-data  libxkbcommon-dev libxkbfile-dev libqt6svgwidgets6 qt6-svg-dev qtcreator qt6-declarative-dev qt6-base-dev qt6-webchannel-dev libqt6webenginewidgets6 qt6-webengine-dev libkf6wallet-dev sqlite3 libsqlite3-dev pkg-config
cmake/plucky,now 3.31.6-1ubuntu1 amd64 [インストール済み]
cmake/plucky 3.31.6-1ubuntu1 i386
libkf6wallet-dev/plucky,now 6.12.0-0ubuntu1 amd64 [インストール済み]
libqt6quickwidgets6/plucky,now 6.8.3+dfsg-0ubuntu1 amd64 [インストール済み、自動]
libqt6svgwidgets6/plucky,now 6.8.3-0ubuntu1 amd64 [インストール済み、自動]
libqt6webenginewidgets6/plucky,now 6.8.3+dfsg-0ubuntu1 amd64 [インストール済み、自動]
libsqlite3-dev/plucky-updates,plucky-security,now 3.46.1-3ubuntu0.2 amd64 [インストール済み]
libsqlite3-dev/plucky-updates,plucky-security 3.46.1-3ubuntu0.2 i386
libxkbcommon-dev/plucky,now 1.7.0-2 amd64 [インストール済み]
libxkbcommon-dev/plucky 1.7.0-2 i386
libxkbfile-dev/plucky,now 1:1.1.0-1build4 amd64 [インストール済み]
libxkbfile-dev/plucky 1:1.1.0-1build4 i386
pkg-config/plucky,now 1.8.1-4 amd64 [インストール済み]
pkg-config/plucky 1.8.1-4 i386
qt6-base-dev/plucky,now 6.8.3+dfsg-0ubuntu2 amd64 [インストール済み]
qt6-declarative-dev/plucky,now 6.8.3+dfsg-0ubuntu1 amd64 [インストール済み]
qt6-svg-dev/plucky,now 6.8.3-0ubuntu1 amd64 [インストール済み]
qt6-webchannel-dev/plucky,now 6.8.3-0ubuntu1 amd64 [インストール済み]
qt6-webengine-dev/plucky,now 6.8.3+dfsg-0ubuntu1 amd64 [インストール済み]
qtcreator/plucky,now 15.0.1-1build3 amd64 [インストール済み]
sqlite3/plucky-updates,plucky-security,now 3.46.1-3ubuntu0.2 amd64 [インストール済み]
sqlite3/plucky-updates,plucky-security 3.46.1-3ubuntu0.2 i386
xkb-data/plucky,plucky,now 2.42-1ubuntu1 all [インストール済み、自動]

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----

4. GitHub から「Lubuntu Update」のソースファイルをダウンロード:

-

仮想マシン」の「Lubuntu 25.04」で操作:

GitHub から「Lubuntu Update」のソースファイルをダウンロードしました:

-

プルリクエストするなら、「git clone」でダウンロードしますが、
ソースファイルが欲しいだけなので、ZIP でダウンロードしました:

-


1). 任意: 作業用の「~/Git/」フォルダを作成:

$ mkdir -p ~/Git

-


2). ダウンロードするサイト:

GitHub: lubuntu-team/lubuntu-update

-

-


3). 緑色の「Code」をクリック:

→表示されたダイアログの下にある「Download ZIP」をクリック:

-


4). ダウンロードされた「lubuntu-update-ubuntu-plucky.zip」を「~/Git」に移動:

-

確認:
$ ls ~/ダウンロード/*.zip
:
/home/usr/ダウンロード/lubuntu-update-ubuntu-plucky.zip

→ファイルの名前に「plucky」が含まれていることに注目:

 「Lubuntu 25.04」用のソースファイルです:

-

移動:
$ mv ~/ダウンロード/lubuntu-update-ubuntu-plucky.zip ~/Git/

-

確認:
$ ls ~/Git/
:
lubuntu-update-ubuntu-plucky.zip

-


5). 解凍:

$ cd ~/Git/
$ unzip lubuntu-update-ubuntu-plucky.zip

-

解凍されたフォルダを確認:
$ ls -1p
:
lubuntu-update-ubuntu-plucky/
lubuntu-update-ubuntu-plucky.zip

-


6). ソースファイルの構成を確認:

$ cd ~/Git/lubuntu-update-ubuntu-plucky/
$ tree -a
.
├── .gitignore
├── CMakeLists.txt                ←(注目)3
├── README.md
├── debian
│   ├── changelog
│   ├── control
│   ├── copyright
│   ├── files
│   ├── lubuntu-update-notifier.install
│   ├── lubuntu-update-notifier.postinst
│   ├── rules
│   └── source
│       ├── format
│       └── lintian-overrides
├── gen_ts.sh                   ←(注目)1
├── lubuntu-update-autostart.desktop
├── lubuntu-update.desktop
└── src
    ├── aptmanager.cpp
    ├── aptmanager.h
    ├── conffilehandlerdialog.cpp
    ├── conffilehandlerdialog.h
    ├── conffilehandlerdialog.ui
    ├── conffilewidget.cpp
    ├── conffilewidget.h
    ├── conffilewidget.ui
    ├── diffdisplaydialog.cpp
    ├── diffdisplaydialog.h
    ├── diffdisplaydialog.ui
    ├── lubuntu-update-backend
    ├── main.cpp
    ├── mainwindow.cpp
    ├── mainwindow.h
    ├── mainwindow.ui
    ├── orchestrator.cpp
    ├── orchestrator.h
    ├── releaseupgradewindow.cpp
    ├── releaseupgradewindow.h
    ├── releaseupgradewindow.ui
    ├── res
    │   └── images
    │       └── update.svg
    ├── resources.qrc
    ├── translations
    │   ├── lubuntu-update_en_US.ts    ←(注目)2
    │   ├── lubuntu-update_es_ES.ts    ←(注目)2
    │   └── lubuntu-update_zh_CN.ts    ←(注目)2
    ├── translations.qrc           ←(注目)4
    ├── upgradedelaywindow.cpp
    ├── upgradedelaywindow.h
    ├── upgradedelaywindow.ui
    ├── windowshowwatcher.cpp
    └── windowshowwatcher.h

7 directories, 47 files

→(注目)の数字は、作業の順番です:

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- -----

5. 翻訳する言語に「日本語」を追加しました:

-

「gen_ts.sh」スクリプトの実行で、2つのエラーがあったときの履歴は「こちら」:

-


1). 「gen_ts.sh」スクリプトに「日本語」を追加:

-

(1). 作業前の確認:
$ cd ~/Git/lubuntu-update-ubuntu-plucky/
$ cat gen_ts.sh
:
#!/bin/bash
langList=('en_US' 'es_ES' 'zh_CN')
for i in ${langList[@]}; do
    targetFile="translations/lubuntu-update_$i.ts"
    if [ ! -e $targetFile ]; then
        echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>" > $targetFile
        echo "<!DOCTYPE TS>" >> $targetFile
        echo "<TS version=\"2.1\" language=\"$i\"></TS>" >> $targetFile
    fi
done
lupdate *.cpp *.h *.ui -ts translations/*

→英語(en_US)、スペイン語(es_ES)、中国語(zh_CN)が登録されています:

-

(2). 修正:
$ nano gen_ts.sh

↓ 2行目の langList 配列に「'ja_JP'」を追加しました:

#!/bin/bash
langList=('en_US' 'es_ES' 'zh_CN' 'ja_JP')
for i in ${langList[@]}; do
    targetFile="translations/lubuntu-update_$i.ts"
    if [ ! -e $targetFile ]; then
        echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>" > $targetFile
        echo "<!DOCTYPE TS>" >> $targetFile
        echo "<TS version=\"2.1\" language=\"$i\"></TS>" >> $targetFile
    fi
done
lupdate *.cpp *.h *.ui -ts translations/*

Ctrl+O で書き込み先を確認して、Enter
Ctrl+X で終了

-

確認:
$ cat gen_ts.sh

-


2). 「gen_ts.sh」スクリプトを実行:

-

(1). 「src/」の位置に移動して、「gen_ts.sh」スクリプトを実行:
$ cd ~/Git/lubuntu-update-ubuntu-plucky/src/
$ ../gen_ts.sh

→相対位置を変えるため、「../」の点が 2つであることに注意:

Updating 'translations/lubuntu-update_en_US.ts'...
    Found 38 source text(s) (14 new and 24 already existing)
Updating 'translations/lubuntu-update_es_ES.ts'...
    Found 38 source text(s) (14 new and 24 already existing)
Updating 'translations/lubuntu-update_ja_JP.ts'...
    Found 38 source text(s) (38 new and 0 already existing)
Updating 'translations/lubuntu-update_zh_CN.ts'...
    Found 38 source text(s) (14 new and 24 already existing)

→うまく行きました:

-

(2). 確認:
$ pwd
/home/usr/Git/lubuntu-update-ubuntu-plucky/src
$ tree translations
:
translations
├── lubuntu-update_en_US.ts
├── lubuntu-update_es_ES.ts
├── lubuntu-update_ja_JP.ts   ←(追加)
└── lubuntu-update_zh_CN.ts

1 directory, 4 files

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- -

6. 参考: 翻訳についての説明:

-

手順

(1). 「Qt」アプリは、「.po」を介さないで、直接「.ts」ファイルを翻訳:
(2). 「.ts」をビルド(変換)すると、「.qm」ファイルが作られます:
(3). 「.qm」を配置:
 (今のところ位置は、不明)
/usr/share/アプリ名/translations/アプリ名_ja_JP.qm
/usr/local/アプリ名/translations/アプリ名_ja_JP.qm
/usr/share/locale/ja_JP/LC_MESSAGES/アプリ名.qm

-


(4). 参考: 翻訳ファイルの配置例:

-

「qpdfview」アプリの場合:
/usr/share/qpdfview/qpdfview_ja.qm (翻訳ファイル)  
/usr/share/qpdfview/help_ja.html  (ヘルプファイル)html

-

「featherpad」アプリの場合:
/usr/share/featherpad/translations/featherpad_ja.qm (翻訳ファイル)  
/usr/share/featherpad/help_ja              (ヘルプファイル)text

-

その他のアプリの場合:
/usr/share/locale/ja/LC_MESSAGES/sonnet5_qt.qm
/usr/share/locale/ja/LC_MESSAGES/kolourpaint.mo  ←「kolourpaint」アプリ
/usr/share/locale/ja_JP/LC_MESSAGES/hexchat.mo  ←これはQt アプリではありません

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- --

6-1. 参考: すでにある「言語」のテンプレートファイルの内容を確認:

-


1). すでにある「言語」を確認:

$ cd ~/Git/lubuntu-update-ubuntu-plucky/src/
$ ls -1 translations/
:
lubuntu-update_en_US.ts
lubuntu-update_es_ES.ts
lubuntu-update_ja_JP.ts      ←(追加された日本語)
lubuntu-update_zh_CN.ts

-


2). 「中国語」のテンプレートファイルを確認:

$ cat translations/lubuntu-update_zh_CN.ts

→まだ翻訳されていません:

ヘッダー部以外は、「日本語」のテンプレートとほぼ同じ:
参考になりません:

-

サポートの短い「Lubuntu 25.04」で、「lubuntu-update」を翻訳する人は少ないのか、

それとも、「lubuntu-update」の翻訳は、まだ未サポートで、ビルド時にわざと無効にしているか、です:

-

翻訳されていないテンプレートファイルでも、置かれていれば、(英語だけど)その言語の「.qm」ファイルはどこかにあるはずです。
それがないのは、ビルド時に「.qm」の配置を無効にしている可能性が高いです。

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ---

6-2. 参考:「日本語」のテンプレートファイルの内容を確認:

-

どの言語も、ヘッダー部の 3行目の言語指定が違うだけ、みたい:

-


1). 作成された「日本語」のテンプレートファイルを確認:

翻訳部分に「html」が含まれる、翻訳しづらいところが、3つあります:

-

$ cd ~/Git/lubuntu-update-ubuntu-plucky/src/
$ cat translations/lubuntu-update_ja_JP.ts
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="ja_JP">
<context>
    <name>ConffileHandlerDialog</name>
    <message>
        <location filename="../conffilehandlerdialog.ui" line="14"/>
        <source>Configuration File Conflicts</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../conffilehandlerdialog.ui" line="24"/>
        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Some of the newly installed updates have updated configuration files. &lt;/p&gt;&lt;p&gt;Please choose what to do with these files.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../conffilehandlerdialog.ui" line="81"/>
        <source>Done</source>
        <translation type="unfinished"></translation>
    </message>
</context>
<context>
    <name>ConffileWidget</name>
    <message>
        <location filename="../conffilewidget.ui" line="14"/>
        <source>Form</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../conffilewidget.ui" line="20"/>
        <source>Filename</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../conffilewidget.ui" line="40"/>
        <source>Keep old</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../conffilewidget.ui" line="47"/>
        <source>Replace with new</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../conffilewidget.ui" line="54"/>
        <source>Show diff</source>
        <translation type="unfinished"></translation>
    </message>
</context>
<context>
    <name>DiffDisplayDialog</name>
    <message>
        <location filename="../diffdisplaydialog.ui" line="14"/>
        <source>Dialog</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../diffdisplaydialog.ui" line="24"/>
        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Lines that start with a &amp;quot;+&amp;quot; only exist in the &lt;span style=&quot; font-weight:700;&quot;&gt;new&lt;/span&gt; file.&lt;/p&gt;&lt;p&gt;Lines that start with a &amp;quot;-&amp;quot; only exist in the &lt;span style=&quot; font-weight:700;&quot;&gt;old&lt;/span&gt; file.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../diffdisplaydialog.ui" line="56"/>
        <source>Done</source>
        <translation type="unfinished"></translation>
    </message>
</context>
<context>
    <name>MainWindow</name>
    <message>
        <location filename="../mainwindow.ui" line="14"/>
        <source>Lubuntu Update</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../mainwindow.ui" line="25"/>
        <source>0 package(s) will be updated. 0 of these updates are security-related.</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../mainwindow.ui" line="33"/>
        <source>Packages</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../mainwindow.ui" line="83"/>
        <source>Install Updates</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../mainwindow.ui" line="94"/>
        <source>Check for Updates</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../mainwindow.ui" line="101"/>
        <source>Close</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../mainwindow.cpp" line="57"/>
        <source>To be installed</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../mainwindow.cpp" line="60"/>
        <source>To be upgraded</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../mainwindow.cpp" line="63"/>
        <source>To be removed</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../mainwindow.cpp" line="66"/>
        <source>Held back (usually temporarily)</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../mainwindow.cpp" line="77"/>
        <source>%1 package(s) will be updated. %2 of these updates are security-related.</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../mainwindow.cpp" line="145"/>
        <source>Update installation complete.</source>
        <translation type="unfinished"></translation>
    </message>
</context>
<context>
    <name>Orchestrator</name>
    <message>
        <location filename="../orchestrator.cpp" line="71"/>
        <source>Updates available!

%1 to upgrade, %2 to install, and %3 to remove.

Click the tray icon to install the updates.</source>
        <translation type="unfinished"></translation>
    </message>
</context>
<context>
    <name>ReleaseUpgradeWindow</name>
    <message>
        <location filename="../releaseupgradewindow.ui" line="14"/>
        <location filename="../releaseupgradewindow.cpp" line="58"/>
        <source>Lubuntu Update</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../releaseupgradewindow.ui" line="20"/>
        <source>upgrade available</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../releaseupgradewindow.ui" line="45"/>
        <source>Upgrade Now</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../releaseupgradewindow.ui" line="52"/>
        <source>Remind me later</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../releaseupgradewindow.ui" line="59"/>
        <source>Decline Upgrade</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../releaseupgradewindow.cpp" line="14"/>
        <source>An upgrade to Lubuntu %1 is available! Would you like to install this upgrade now?</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../releaseupgradewindow.cpp" line="59"/>
        <source>You have declined the upgrade to Lubuntu %1.
You can upgrade manually by following the directions at https://manual.lubuntu.me/stable/D/upgrading.html.</source>
        <translation type="unfinished"></translation>
    </message>
</context>
<context>
    <name>UpgradeDelayWindow</name>
    <message>
        <location filename="../upgradedelaywindow.ui" line="14"/>
        <source>Lubuntu Update</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../upgradedelaywindow.ui" line="20"/>
        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;How long would you like to wait before being reminded of the upgrade again?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../upgradedelaywindow.ui" line="48"/>
        <source>OK</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../upgradedelaywindow.ui" line="55"/>
        <source>Cancel</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../upgradedelaywindow.ui" line="63"/>
        <source>Days</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../upgradedelaywindow.ui" line="68"/>
        <source>Weeks</source>
        <translation type="unfinished"></translation>
    </message>
    <message>
        <location filename="../upgradedelaywindow.ui" line="73"/>
        <source>Months</source>
        <translation type="unfinished"></translation>
    </message>
</context>
</TS>

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----

7. 「日本語」のテンプレートファイルを翻訳:

-

直接、テンプレートファイルを翻訳しました:

-

翻訳に使うツールは、(ミスを減らすため)「Qt Creator」を使うのが推奨されています。

今回は、使い慣れた、テキストエディタの「featherpad」を使いました:

-


1). 作成された「日本語」のテンプレートファイルを翻訳しながら、修正:

$ cd ~/Git/lubuntu-update-ubuntu-plucky/src/
$ featherpad translations/lubuntu-update_ja_JP.ts
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="ja_JP">
<context>
    <name>ConffileHandlerDialog</name>
    <message>
        <location filename="../conffilehandlerdialog.ui" line="14"/>
        <source>Configuration File Conflicts</source>
        <translation>設定ファイルの競合</translation>
    </message>
    <message>
        <location filename="../conffilehandlerdialog.ui" line="24"/>
        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Some of the newly installed updates have updated configuration files. &lt;/p&gt;&lt;p&gt;Please choose what to do with these files.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;新しくインストールされた更新の一部で、設定ファイルが更新されました。 &lt;/p&gt;&lt;p&gt;これらのファイルをどうするかを選択してください。&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
    </message>
    <message>
        <location filename="../conffilehandlerdialog.ui" line="81"/>
        <source>Done</source>
        <translation>終了</translation>
    </message>
</context>
<context>
    <name>ConffileWidget</name>
    <message>
        <location filename="../conffilewidget.ui" line="14"/>
        <source>Form</source>
        <translation>形式</translation>
    </message>
    <message>
        <location filename="../conffilewidget.ui" line="20"/>
        <source>Filename</source>
        <translation>ファイル名</translation>
    </message>
    <message>
        <location filename="../conffilewidget.ui" line="40"/>
        <source>Keep old</source>
        <translation>古いまま</translation>
    </message>
    <message>
        <location filename="../conffilewidget.ui" line="47"/>
        <source>Replace with new</source>
        <translation>新しいものと置き換え</translation>
    </message>
    <message>
        <location filename="../conffilewidget.ui" line="54"/>
        <source>Show diff</source>
        <translation>差分を表示</translation>
    </message>
</context>
<context>
    <name>DiffDisplayDialog</name>
    <message>
        <location filename="../diffdisplaydialog.ui" line="14"/>
        <source>Dialog</source>
        <translation>ダイアログ</translation>
    </message>
    <message>
        <location filename="../diffdisplaydialog.ui" line="24"/>
        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;Lines that start with a &amp;quot;+&amp;quot; only exist in the &lt;span style=&quot; font-weight:700;&quot;&gt;new&lt;/span&gt; file.&lt;/p&gt;&lt;p&gt;Lines that start with a &amp;quot;-&amp;quot; only exist in the &lt;span style=&quot; font-weight:700;&quot;&gt;old&lt;/span&gt; file.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;から始まる行 &amp;quot;+&amp;quot; にのみ存在します &lt;span style=&quot; font-weight:700;&quot;&gt;新しい&lt;/span&gt; ファイル.&lt;/p&gt;&lt;p&gt;から始まる行 &amp;quot;-&amp;quot; にのみ存在します &lt;span style=&quot; font-weight:700;&quot;&gt;古い&lt;/span&gt; ファイル.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
    </message>
    <message>
        <location filename="../diffdisplaydialog.ui" line="56"/>
        <source>Done</source>
        <translation>終了</translation>
    </message>
</context>
<context>
    <name>MainWindow</name>
    <message>
        <location filename="../mainwindow.ui" line="14"/>
        <source>Lubuntu Update</source>
        <translation>Lubuntu Update</translation>
    </message>
    <message>
        <location filename="../mainwindow.ui" line="25"/>
        <source>0 package(s) will be updated. 0 of these updates are security-related.</source>
        <translation>0 個のパッケージが更新されます。更新の 0 個はセキュリティ関連です。</translation>
    </message>
    <message>
        <location filename="../mainwindow.ui" line="33"/>
        <source>Packages</source>
        <translation>パッケージ</translation>
    </message>
    <message>
        <location filename="../mainwindow.ui" line="83"/>
        <source>Install Updates</source>
        <translation>更新をインストール</translation>
    </message>
    <message>
        <location filename="../mainwindow.ui" line="94"/>
        <source>Check for Updates</source>
        <translation>更新を確認</translation>
    </message>
    <message>
        <location filename="../mainwindow.ui" line="101"/>
        <source>Close</source>
        <translation>閉じる</translation>
    </message>
    <message>
        <location filename="../mainwindow.cpp" line="57"/>
        <source>To be installed</source>
        <translation>インストール</translation>
    </message>
    <message>
        <location filename="../mainwindow.cpp" line="60"/>
        <source>To be upgraded</source>
        <translation>アップグレード</translation>
    </message>
    <message>
        <location filename="../mainwindow.cpp" line="63"/>
        <source>To be removed</source>
        <translation>削除</translation>
    </message>
    <message>
        <location filename="../mainwindow.cpp" line="66"/>
        <source>Held back (usually temporarily)</source>
        <translation>保留(一時的に)</translation>
    </message>
    <message>
        <location filename="../mainwindow.cpp" line="77"/>
        <source>%1 package(s) will be updated. %2 of these updates are security-related.</source>
        <translation>%1 個のパッケージが更新されます。更新の %2 個はセキュリティ関連です。</translation>
    </message>
    <message>
        <location filename="../mainwindow.cpp" line="145"/>
        <source>Update installation complete.</source>
        <translation>インストールを完了します。</translation>
    </message>
</context>
<context>
    <name>Orchestrator</name>
    <message>
        <location filename="../orchestrator.cpp" line="71"/>
        <source>Updates available!

%1 to upgrade, %2 to install, and %3 to remove.

Click the tray icon to install the updates.</source>
        <translation>利用可能な更新!

アップグレード %1 個、インストール %2 個、削除 %3 個。

トレイアイコンをクリックして更新をインストールします。</translation>
    </message>
</context>
<context>
    <name>ReleaseUpgradeWindow</name>
    <message>
        <location filename="../releaseupgradewindow.ui" line="14"/>
        <location filename="../releaseupgradewindow.cpp" line="58"/>
        <source>Lubuntu Update</source>
        <translation>Lubuntu Update</translation>
    </message>
    <message>
        <location filename="../releaseupgradewindow.ui" line="20"/>
        <source>upgrade available</source>
        <translation>アップグレードが利用可能です</translation>
    </message>
    <message>
        <location filename="../releaseupgradewindow.ui" line="45"/>
        <source>Upgrade Now</source>
        <translation>今すぐアップグレード</translation>
    </message>
    <message>
        <location filename="../releaseupgradewindow.ui" line="52"/>
        <source>Remind me later</source>
        <translation>後で通知</translation>
    </message>
    <message>
        <location filename="../releaseupgradewindow.ui" line="59"/>
        <source>Decline Upgrade</source>
        <translation>アップグレードを拒否</translation>
    </message>
    <message>
        <location filename="../releaseupgradewindow.cpp" line="14"/>
        <source>An upgrade to Lubuntu %1 is available! Would you like to install this upgrade now?</source>
        <translation>Lubuntu %1 へのアップグレードが利用可能です! 今すぐこのアップグレードをインストールしますか?</translation>
    </message>
    <message>
        <location filename="../releaseupgradewindow.cpp" line="59"/>
        <source>You have declined the upgrade to Lubuntu %1.
You can upgrade manually by following the directions at https://manual.lubuntu.me/stable/D/upgrading.html.</source>
        <translation>Lubuntu %1 へのアップグレードを拒否しました。
https://manual.lubuntu.me/stable/D/upgrading.html での指示に従うことで、手動でアップグレードできます。</translation>
    </message>
</context>
<context>
    <name>UpgradeDelayWindow</name>
    <message>
        <location filename="../upgradedelaywindow.ui" line="14"/>
        <source>Lubuntu Update</source>
        <translation>Lubuntu Update</translation>
    </message>
    <message>
        <location filename="../upgradedelaywindow.ui" line="20"/>
        <source>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;How long would you like to wait before being reminded of the upgrade again?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</source>
        <translation>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;アップグレードをもう一度通知するまで、どのくらい待ちますか?&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</translation>
    </message>
    <message>
        <location filename="../upgradedelaywindow.ui" line="48"/>
        <source>OK</source>
        <translation>OK</translation>
    </message>
    <message>
        <location filename="../upgradedelaywindow.ui" line="55"/>
        <source>Cancel</source>
        <translation>キャンセル</translation>
    </message>
    <message>
        <location filename="../upgradedelaywindow.ui" line="63"/>
        <source>Days</source>
        <translation>日</translation>
    </message>
    <message>
        <location filename="../upgradedelaywindow.ui" line="68"/>
        <source>Weeks</source>
        <translation>週</translation>
    </message>
    <message>
        <location filename="../upgradedelaywindow.ui" line="73"/>
        <source>Months</source>
        <translation>月</translation>
    </message>
</context>
</TS>

→「Held back (usually temporarily)」の部分をどう翻訳すべきか、翻訳が難しいです:

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- -----

8. 参考:「日本語」の翻訳だけビルドして、配置する場合:

-

追記:

こちらの作業は、他の「アプリ」を日本語化する場合は、参考になるかもしれませんが、

「lubuntu-update」アプリでは使えません:

-

翻訳ファイル「.ts」をビルドして出来た「.qm」ファイルは、ファイルとして配置されるのではなく、

「cmake」時に、Qt リソース(つまり、アプリ)に埋め込まれている?

つまり、「.qm」がファイルの配置でなく、アプリに「埋め込まれることがある」ことがわかりました:

-


-

「lubuntu-update」のビルドとインストールを行った、または、行う予定であれば、

翻訳は自動で行われるので、こちらの作業は要りません:

-

「Lubuntu 25.04」をインストールした場合、

「lubuntu-update」アプリはインストールされていますが、日本語化されていません。

-

その「lubuntu-update」アプリの日本語化にトライしました:

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- -

8-1. 「日本語」の翻訳をビルド:

-


1). 「lrelease」をインストール:

項番 3-4).」を参照:

-


2). 「lrelease」がインストールされていることを確認:

$ ls -1 /usr/lib/qt6/bin/ | grep lrelease
:
lrelease

-

実行:
$ lrelease --help
:
lrelease: コマンドが見つかりません

→パスが通っていません:

-

パスを付けて実行:
$ /usr/lib/qt6/bin/lrelease --help
:
Usage:
    lrelease [options] -project project-file
    lrelease [options] ts-files [-qm qm-file]
:

→OK

-


3). 翻訳ファイルの変換:

確認:
$ cd ~/Git/lubuntu-update-ubuntu-plucky/src/translations/
$ ls -1
:
lubuntu-update_en_US.ts                                                                                  
lubuntu-update_es_ES.ts                                                                                  
lubuntu-update_ja_JP.ts                                                                                  
lubuntu-update_zh_CN.ts                                          

-

変換:
$ /usr/lib/qt6/bin/lrelease lubuntu-update_ja_JP.ts
:
Updating 'lubuntu-update_ja_JP.qm'...
    Generated 38 translation(s) (38 finished and 0 unfinished)

-

確認:
$ ls -1 ~/Git/lubuntu-update-ubuntu-plucky/src/translations/
:
lubuntu-update_en_US.ts
lubuntu-update_es_ES.ts
lubuntu-update_ja_JP.qm  ←(追加)
lubuntu-update_ja_JP.ts
lubuntu-update_zh_CN.ts

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- --

8-2. 「/usr/share/locale/ja_JP/LC_MESSAGES/」フォルダに配置してみる:

-

「翻訳ファイル」を配置する位置は(今のところ、わからないので)、

以前の慣例である、

/usr/share/locale/ja_JP/LC_MESSAGES/アプリ名.qm

に配置してみました:

-

この位置で認識されるかは、やってみないとわかりません:

-


1). 「/usr/share/locale/ja_JP/LC_MESSAGES/lubuntu-update.qm」で試してみる:

-

フォルダを確認:
$ ls /usr/share/locale/ja_JP/
:
ls: '/usr/share/locale/ja_JP/' にアクセスできません: そのようなファイルやディレクトリはありません

-

フォルダを作成:
$ sudo mkdir -p /usr/share/locale/ja_JP/LC_MESSAGES/

-

確認:
$ ls /usr/share/locale/ja_JP/LC_MESSAGES/
$

-

配置:
$ cd ~/Git/lubuntu-update-ubuntu-plucky/src/translations/
$ sudo cp lubuntu-update_ja_JP.qm /usr/share/locale/ja_JP/LC_MESSAGES/lubuntu-update.qm 

-

確認:
$ ls /usr/share/locale/ja_JP/LC_MESSAGES/lubuntu-update.qm
:
/usr/share/locale/ja_JP/LC_MESSAGES/lubuntu-update.qm

-

再起動:
$ reboot

-

日本語化されたか確認:

メニュー→「設定」→「Lubuntu update」

→日本語化されていません:

-


2). 「/usr/share/locale/ja_JP/LC_MESSAGES/lubuntu-update_ja_JP.qm」と名前を変えて、試してみる:

配置:
$ cd ~/Git/lubuntu-update-ubuntu-plucky/src/translations/
$ sudo cp lubuntu-update_ja_JP.qm /usr/share/locale/ja_JP/LC_MESSAGES/lubuntu-update_ja_JP.qm

-

再起動:
$ reboot

-

日本語化されたか確認:

メニュー→「設定」→「Lubuntu update」

→日本語化されていません:

-

後始末で、フォルダを削除:
$ sudo rm -R /usr/share/locale/ja_JP/

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ---

8-3. 「/usr/share/lubuntu-update/」フォルダに配置してみる:

-

「翻訳ファイル」を配置する位置は(今のところ、わからないので)、

/usr/share/アプリ名/translations/アプリ名_ja_JP.qm

もしくは、

/usr/share/アプリ名/アプリ名_ja_JP.qm

に配置してみました:

-


1). 「/usr/share/lubuntu-update/translations/lubuntu-update_ja_JP.qm」で試してみる:

-

フォルダを確認:
$ ls /usr/share/lubuntu-update/
:
ls: '/usr/share/lubuntu-update/' にアクセスできません: そのようなファイルやディレクトリはありません

-

フォルダを作成:
$ sudo mkdir -p /usr/share/lubuntu-update/translations/

-

確認:
$ ls /usr/share/lubuntu-update/translations/
$

-

配置:
$ cd ~/Git/lubuntu-update-ubuntu-plucky/src/translations/
$ sudo cp lubuntu-update_ja_JP.qm /usr/share/lubuntu-update/translations/lubuntu-update_ja_JP.qm

-

確認:
$ ls /usr/share/lubuntu-update/translations/lubuntu-update_ja_JP.qm
:
/usr/share/lubuntu-update/translations/lubuntu-update_ja_JP.qm

-

再起動:
$ reboot

-

日本語化されたか確認:

メニュー→「設定」→「Lubuntu update」

→日本語化されていません:

-


2). 「/usr/share/lubuntu-update/lubuntu-update_ja_JP.qm」で試してみる:

-

「translations/」フォルダを削除:
$ sudo rm -R /usr/share/lubuntu-update/translations/

-

確認:
$ ls /usr/share/lubuntu-update/
$

-

配置:
$ cd ~/Git/lubuntu-update-ubuntu-plucky/src/translations/
$ sudo cp lubuntu-update_ja_JP.qm /usr/share/lubuntu-update/lubuntu-update_ja_JP.qm

-

確認:
$ ls /usr/share/lubuntu-update/lubuntu-update_ja_JP.qm
:
/usr/share/lubuntu-update/lubuntu-update_ja_JP.qm

-

再起動:
$ reboot

-

日本語化されたか確認:

メニュー→「設定」→「Lubuntu update」

→日本語化されていません:

-


3). 後始末:

-

「lubuntu-update/」フォルダを削除:
$ sudo rm -R /usr/share/lubuntu-update/

-

確認:

$ ls /usr/share/lubuntu-update/
:
ls: '/usr/share/lubuntu-update/' にアクセスできません: そのようなファイルやディレクトリはありません

-

「lubuntu-update_ja_JP.qm」ファイルを削除:
$ rm ~/Git/lubuntu-update-ubuntu-plucky/src/translations/lubuntu-update_ja_JP.qm

-

確認:
$ ls -1 ~/Git/lubuntu-update-ubuntu-plucky/src/translations/
:
lubuntu-update_en_US.ts
lubuntu-update_es_ES.ts
lubuntu-update_ja_JP.ts
lubuntu-update_zh_CN.ts

-

もしかしたら、「lubuntu-update」アプリのバージョンが低くて、国際化されていない可能性がありますが、

「lubuntu-update」アプリにバージョン表示の機能がないので、違いを確認できません:

-

「lubuntu-update」のビルドに期待です:

次の「項番 9.」以降を実施:

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----

9. 翻訳後に、ビルドするための残りの設定を実施:

-

「日本語」の翻訳のみをビルドして配置する場合は、こちらの作業は要りません:

-

(翻訳を含めた)「lubuntu-update」のビルドに必要な設定の

残っている設定です:

-


1). ソースファイルのファイル構成を確認:

$ cd ~/Git/lubuntu-update-ubuntu-plucky/
$ tree -a
.
├── .gitignore
├── CMakeLists.txt                ←(注目)4
├── README.md
├── debian
│   ├── changelog
│   ├── control
│   ├── copyright
│   ├── files
│   ├── lubuntu-update-notifier.install
│   ├── lubuntu-update-notifier.postinst
│   ├── rules
│   └── source
│       ├── format
│       └── lintian-overrides
├── gen_ts.sh                   ←(注目)1
├── lubuntu-update-autostart.desktop
├── lubuntu-update.desktop
└── src
    ├── aptmanager.cpp
    ├── aptmanager.h
    ├── conffilehandlerdialog.cpp
    ├── conffilehandlerdialog.h
    ├── conffilehandlerdialog.ui
    ├── conffilewidget.cpp
    ├── conffilewidget.h
    ├── conffilewidget.ui
    ├── diffdisplaydialog.cpp
    ├── diffdisplaydialog.h
    ├── diffdisplaydialog.ui
    ├── lubuntu-update-backend
    ├── main.cpp
    ├── mainwindow.cpp
    ├── mainwindow.h
    ├── mainwindow.ui
    ├── orchestrator.cpp
    ├── orchestrator.h
    ├── releaseupgradewindow.cpp
    ├── releaseupgradewindow.h
    ├── releaseupgradewindow.ui
    ├── res
    │   └── images
    │       └── update.svg
    ├── resources.qrc
    ├── translations
    │   ├── lubuntu-update_en_US.ts    ←(注目)2
    │   ├── lubuntu-update_es_ES.ts    ←(注目)2
    │   ├── lubuntu-update_ja_JP.ts    ←(注目)2、3(翻訳)
    │   └── lubuntu-update_zh_CN.ts    ←(注目)2
    ├── translations.qrc           ←(注目)5
    ├── upgradedelaywindow.cpp
    ├── upgradedelaywindow.h
    ├── upgradedelaywindow.ui
    ├── windowshowwatcher.cpp
    └── windowshowwatcher.h

7 directories, 48 files

→(注目)の数字は、作業の順番です:

-


2). 「CMakeLists.txt」の修正:

-

(1). 確認:
$ cd ~/Git/lubuntu-update-ubuntu-plucky/
$ cat CMakeLists.txt
cmake_minimum_required(VERSION 3.5)

project(lubuntu-update VERSION 0.1 LANGUAGES CXX)

set(CMAKE_AUTOUIC ON)
set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)

set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

find_package(Qt6 REQUIRED COMPONENTS Widgets DBus LinguistTools)

set(TS_FILES
    src/translations/lubuntu-update_en_US.ts   ←(注目)
    src/translations/lubuntu-update_es_ES.ts   ←(注目)
    src/translations/lubuntu-update_zh_CN.ts   ←(注目)
)

set(PROJECT_SOURCES
        src/main.cpp
        src/mainwindow.cpp
        src/mainwindow.h
        src/mainwindow.ui
        src/orchestrator.h
        src/orchestrator.cpp
        src/aptmanager.h
        src/aptmanager.cpp
        src/conffilewidget.h
        src/conffilewidget.cpp
        src/conffilewidget.ui
        src/diffdisplaydialog.h
        src/diffdisplaydialog.cpp
        src/diffdisplaydialog.ui
        src/conffilehandlerdialog.h
        src/conffilehandlerdialog.cpp
        src/conffilehandlerdialog.ui
        src/releaseupgradewindow.h
        src/releaseupgradewindow.cpp
        src/releaseupgradewindow.ui
        src/upgradedelaywindow.h
        src/upgradedelaywindow.cpp
        src/upgradedelaywindow.ui
        src/windowshowwatcher.h
        src/windowshowwatcher.cpp
        ${TS_FILES}            ←★
)

set(TRANSLATION_RESOURCES "src/translations.qrc")

configure_file(${TRANSLATION_RESOURCES} translations.qrc COPYONLY)
qt6_add_translation(QM_FILES ${TS_FILES})
qt6_add_resources(QM_RESOURCES ${CMAKE_CURRENT_BINARY_DIR}/translations.qrc)

add_custom_target(translations ALL DEPENDS ${QM_FILES})

add_executable(lubuntu-update
    ${PROJECT_SOURCES}
    ${QM_RESOURCES}
    src/resources.qrc
)

add_dependencies(lubuntu-update translations)

target_link_libraries(lubuntu-update PRIVATE
    Qt6::Widgets
    Qt6::DBus)

install(TARGETS lubuntu-update
    BUNDLE DESTINATION .
    LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR}
    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

# Yes, we are hardcoding a path here. Yes, it's ugly. However, the program
# will attempt to run this script as root, and I do NOT want to make it try to
# "find" the script and execute the first thing it finds that has the right
# name, that sounds like a security breach waiting to happen. It will only
# execute lubuntu-update-backend from /usr/libexec, and if something malicious
# has gotten into /usr/libexec you're compromised anyway, so not much to worry
# about. Therefore we always, *always* install this script into /usr/libexec/,
# no matter where the rest of the program goes.
install(FILES src/lubuntu-update-backend DESTINATION /usr/libexec/)   ←★
install(FILES lubuntu-update.desktop DESTINATION ${CMAKE_INSTALL_PREFIX}/share/applications/) ←★

→「Qt 5.15」をインストールしたけど、もしかしたら、「Qt6」のインストールが必要かも。

-

(2). 修正:
$ cd ~/Git/lubuntu-update-ubuntu-plucky/
$ featherpad CMakeLists.txt

14行目:

set(TS_FILES
    src/translations/lubuntu-update_en_US.ts
    src/translations/lubuntu-update_es_ES.ts
    src/translations/lubuntu-update_zh_CN.ts
)

↓ 置き換え:

set(TS_FILES
    src/translations/lubuntu-update_en_US.ts
    src/translations/lubuntu-update_es_ES.ts
    src/translations/lubuntu-update_ja_JP.ts
    src/translations/lubuntu-update_zh_CN.ts
)

→Ctrl+S で保存:

-

(3). 確認:
$ cd ~/Git/lubuntu-update-ubuntu-plucky/
$ cat CMakeLists.txt

-


3). ファイルリソースのリスト「src/translations.qrc」の修正:

-

(1). 確認:
$ cd ~/Git/lubuntu-update-ubuntu-plucky/
$ cat src/translations.qrc
<RCC>
    <qresource prefix="/i18n">
        <file alias="en_US">lubuntu-update_en_US.qm</file>
        <file alias="es_ES">lubuntu-update_es_ES.qm</file>
        <file alias="zh_CN">lubuntu-update_zh_CN.qm</file>
    </qresource>
</RCC>

-

(2). 修正:
$ cd ~/Git/lubuntu-update-ubuntu-plucky/
$ featherpad src/translations.qrc

↓ 5行目「ja_JP」の行を追加:

<RCC>
    <qresource prefix="/i18n">
        <file alias="en_US">lubuntu-update_en_US.qm</file>
        <file alias="es_ES">lubuntu-update_es_ES.qm</file>
        <file alias="ja_JP">lubuntu-update_ja_JP.qm</file>
        <file alias="zh_CN">lubuntu-update_zh_CN.qm</file>
    </qresource>
</RCC>

→Ctrl+S で保存:

-

(3). 確認:
$ cd ~/Git/lubuntu-update-ubuntu-plucky/
$ cat src/translations.qrc

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- -----

10. 参考: 「lubuntu-update」アプリのビルドについての説明:

-

説明なので、「項番 11.」に進んでよいです:

-

翻訳を含めた、「lubuntu-update」アプリのビルドを行う場合の説明です:

今回は、「cmake」、「ビルド」、「インストール」を行います:

-


1). 念の為、こちらを実行する直前に、「Lubuntu 25.04」のクーロンである「オリジナル2」を作成しました:

-


2). 「lubuntu-update-backend」スクリプトを「/usr/libexec/lubuntu-update-backend」にコピー:

「cmake」で自動でコピーされるので、こちらの作業は要らないみたい:

「cmake」だと、自動で(CMAKE_INSTALL_PREFIX= の値で)コピー先が判断されます:

→なので、こちらは行いませんでした。ビルド後にコピーされているか確認する予定です:

-

手動で行う場合は、インストール先を「ホーム」に指定した場合は、コピー先が変わるので注意。

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- -

10-1. 参考:「cmake」の実行、についての説明:

-

説明なので、ここでは作業しません:

-


1). ビルドディレクトリを作成:

移動:
$ cd ~/Git/lubuntu-update-ubuntu-plucky
$ ls -p
:
CMakeLists.txt  debian/    lubuntu-update-autostart.desktop  src/
README.md       gen_ts.sh  lubuntu-update.desktop

-

作成:
$ mkdir build
$ ls -p
:
CMakeLists.txt  build/   gen_ts.sh                         lubuntu-update.desktop
README.md       debian/  lubuntu-update-autostart.desktop  src/

-

移動:
$ cd build

-


2). cmake の実行:

-

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

(2-a). 「~/local」にインストールする場合(任意) ★今回はこちらを採用:

-

「~/local/」フォルダの作成:
$ mkdir -p ~/local/

-

cmake の説明:

(下記は説明なので、まだ実行しません)

$ cmake -DCMAKE_INSTALL_PREFIX=$HOME/local ..

→ホームに落ちるので、インストールの成功率は上がるけど、インストール後にパスを通す必要があります:

-

既存の「lubuntu-update」が動いているので、テストするには停止させる必要がありますが、
こちらであれば、パスを通さなければ良いだけです。

-

作業前:
$ ls -Ap ~/
:
.bash_history              .vboxclient-clipboard-tty2-control.pid       Desktop/
.bash_logout               .vboxclient-clipboard-tty2-service.pid       Git/
.bashrc                    .vboxclient-draganddrop-tty2-control.pid     local/
.cache/                    .vboxclient-draganddrop-tty2-service.pid     snap/
.config/                   .vboxclient-hostversion-tty2-control.pid     ダウンロード/
.frozen-bubble/            .vboxclient-seamless-tty2-control.pid        テンプレート/
.kajonggserver/            .vboxclient-seamless-tty2-service.pid        ドキュメント/
.local/                    .vboxclient-vmsvga-session-tty2-control.pid  ビデオ/
.mozilla/                  .vboxclient-vmsvga-session-tty2-service.pid  ピクチャ/
.profile                   .wget-hsts                                   ミュージック/
.python_history            .xscreensaver                                公開/
.sudo_as_admin_successful  .xsession-errors

→隠しファイルが多いです:

-

作業前:
$ tree -a ~/.local
:
/home/usr/.local
├── share
│   ├── applications
│   │   ├── mimeinfo.cache
│   │   └── userapp-Firefox-8V2QA3.desktop
│   ├── flatpak
│   │   └── db
│   ├── gvfs-metadata
│   │   ├── home
│   │   └── home-af2439d3.log
│   ├── kajongg
│   │   ├── .cache
│   │   ├── kajongg3.db
│   │   └── local3.db
│   ├── mime
│   │   ├── XMLnamespaces
│   │   ├── aliases
│   │   ├── application
│   │   │   ├── x-extension-htm.xml
│   │   │   ├── x-extension-html.xml
│   │   │   ├── x-extension-shtml.xml
│   │   │   ├── x-extension-xht.xml
│   │   │   └── x-extension-xhtml.xml
│   │   ├── generic-icons
│   │   ├── globs
│   │   ├── globs2
│   │   ├── icons
│   │   ├── magic
│   │   ├── mime.cache
│   │   ├── packages
│   │   │   ├── user-extension-htm.xml
│   │   │   ├── user-extension-html.xml
│   │   │   ├── user-extension-shtml.xml
│   │   │   ├── user-extension-xht.xml
│   │   │   └── user-extension-xhtml.xml
│   │   ├── subclasses
│   │   ├── treemagic
│   │   ├── types
│   │   └── version
│   ├── nano
│   ├── qpdfview
│   │   └── qpdfview
│   │       └── database
│   ├── recently-used.xbel
│   ├── sddm
│   │   └── xorg-session.log
│   └── swell-foop
│       └── scores
│           └── small-3
└── state
    ├── discoverstaterc
    ├── kmahjonggstaterc
    ├── kminesstaterc
    ├── kolourpaintstaterc
    ├── kshisenstaterc
    ├── lesshst
    └── wireplumber
        ├── default-routes
        └── stream-properties

19 directories, 40 files

→こちらには、意識してインストールしたアプリはありません:

-

もしくは、

-

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

(2-b). 「/usr/local」にインストールする場合(デフォルト)
$ cmake ..

-

作業前:
$ tree -a /usr/local/
:
/usr/local/
├── bin
│   └── firefox -> /opt/firefox/firefox  ★
├── etc
├── games                                                                                                
├── include                                                                                              
├── lib                                                                                                  
│   └── python3.13                                                                                       
│       └── dist-packages                                                                                
├── libexec                                                                                              
├── man -> share/man                                                                                     
├── sbin                                                                                                 
├── share                                                                                                
│   ├── applications
│   │   ├── firefox.desktop
│   │   └── mimeinfo.cache
│   ├── ca-certificates
│   ├── fonts
│   │   └── SourceHanCodeJP.ttc  ★
│   ├── man
│   ├── sgml
│   │   ├── declaration
│   │   ├── dtd
│   │   ├── entities
│   │   ├── misc
│   │   └── stylesheet
│   └── xml
│       ├── declaration
│       ├── entities
│       ├── misc
│       └── schema
└── src

28 directories, 4 files

→★ インストール先を意識したのは、ESR 版の「firefox」と、
 「SourceHanCodeJP.ttc」フォントぐらいです:

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- --

10-2. 参考:「ビルド」の実行、についての説明:

-

説明なので、ここでは作業しません:

-


ビルド:

make -j$(nproc)

-

参考:

こちらの仮想マシンで確認:

$ echo $(nproc)
8

つまり、下記のように置き換えられます:

make -j8

→並行して動かすプロセッサ数を指定すると、ビルドが速くなります:

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ---

10-3. 参考:「インストール」の実行、についての説明:

-

説明なので、ここでは作業しません:

-

ファイルの配置を行います:

-

「lubuntu-update」のサイトの README の手順には、ビルドまでしか書かれていません:

どのようにファイルを配置するのかわからないので、リスクが高いけど試しました:

-


インストール:

$ make install

→「make install」で失敗する場合、「sudo make install」とやりがちですが、今回は禁止です:

-

(まだ完全ではない)「lubuntu-update」を「sudo make install」でインストールすることは、システムの動作が不安定になるリスクが高いので、禁止されています:

-

なので、「cmake」の時点で、インストール先を「ホーム」にすると、(ファイル書き込みの権限を持つので)インストールの成功率が上がります:

ただし、実行には、パスを通すか、パスを付けて実行する必要があります:

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----

11. 「lubuntu-update」アプリのビルド:

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- -----

11-1. インストール先に「~/local」を指定して「cmake」を実行(成功):

-

「Qt6」の場合です:

-

インストール先は、失敗しても影響が少ないように、「~/local/」フォルダを作成して指定:

-

通常であれば、「cmake」が 1回で成功することは、まずありません:

何度も「cmake」のエラーを解消しながら、「アプリ」をビルドするのに必要な「依存パッケージ」を解決して行きます:

-

その色々とトライした履歴は、「項番 21.」(Qt 5.15) と「項番 22.」(Qt6) を参照:

いつか参考になるかも:

-


1). インストール先の「~/local/」フォルダを作成:

$ mkdir -p ~/local/

-


2). ビルドフォルダを作成:

移動:
$ cd ~/Git/lubuntu-update-ubuntu-plucky
$ ls -p
:
CMakeLists.txt  debian/    lubuntu-update-autostart.desktop  src/
README.md       gen_ts.sh  lubuntu-update.desktop

-

作成:
$ mkdir build
$ ls -p
:
CMakeLists.txt  build/   gen_ts.sh                         lubuntu-update.desktop
README.md       debian/  lubuntu-update-autostart.desktop  src/

-

移動:
$ cd build

-


3). インストール先を指定して「cmake」を実行:

移動:
$ cd ~/Git/lubuntu-update-ubuntu-plucky/build

-

実行:
$ cmake -DCMAKE_INSTALL_PREFIX=$HOME/local ..
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- The CXX compiler identification is GNU 14.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Found WrapAtomic: TRUE
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
-- Found WrapOpenGL: TRUE
-- Found XKB: /usr/lib/x86_64-linux-gnu/libxkbcommon.so (found suitable version "1.7.0", minimum required is "0.5.0")
-- Found WrapVulkanHeaders: /usr/include
-- Configuring done (0.7s)
-- Generating done (0.0s)
-- Build files have been written to: /home/usr/Git/lubuntu-update-ubuntu-plucky/build
usr@usr-PC:~/Git/lubuntu-update-ubuntu-plucky/build$ 
→正常終了:

-

確認:
$ cd ~/Git/lubuntu-update-ubuntu-plucky/build
$ ls -1Ap
:
.qt/
CMakeCache.txt
CMakeFiles/
Makefile
cmake_install.cmake
translations.qrc
translations.qrc.depends

-

ツリーで確認:
$ pwd
/home/usr/Git/lubuntu-update-ubuntu-plucky/build
$ tree -a
.
├── .qt
│   ├── QtDeploySupport.cmake
│   └── QtDeployTargets.cmake
├── CMakeCache.txt
├── CMakeFiles
│   ├── 3.31.6
│   │   ├── CMakeCXXCompiler.cmake
│   │   ├── CMakeDetermineCompilerABI_CXX.bin
│   │   ├── CMakeSystem.cmake
│   │   └── CompilerIdCXX
│   │       ├── CMakeCXXCompilerId.cpp
│   │       ├── a.out
│   │       └── tmp
│   ├── CMakeConfigureLog.yaml
│   ├── CMakeDirectoryInformation.cmake
│   ├── CMakeRuleHashes.txt
│   ├── CMakeScratch
│   ├── Makefile.cmake
│   ├── Makefile2
│   ├── TargetDirectories.txt
│   ├── cmake.check_cache
│   ├── lubuntu-update.dir
│   │   ├── DependInfo.cmake
│   │   ├── build.make
│   │   ├── cmake_clean.cmake
│   │   ├── compiler_depend.make
│   │   ├── compiler_depend.ts
│   │   ├── depend.make
│   │   ├── flags.make
│   │   ├── link.txt
│   │   ├── lubuntu-update_autogen
│   │   │   └── UVLADIE3JM
│   │   ├── progress.make
│   │   └── src
│   ├── lubuntu-update_autogen.dir
│   │   ├── AutoRcc_resources_UVLADIE3JM_Info.json
│   │   ├── AutogenInfo.json
│   │   ├── DependInfo.cmake                                                                             
│   │   ├── build.make                                                                                   
│   │   ├── cmake_clean.cmake                                                                            
│   │   ├── compiler_depend.make                                                                         
│   │   ├── compiler_depend.ts                                                                           
│   │   └── progress.make                                                                                
│   ├── lubuntu-update_autogen_timestamp_deps.dir                                                        
│   │   ├── DependInfo.cmake                                                                             
│   │   ├── build.make                                                                                   
│   │   ├── cmake_clean.cmake
│   │   ├── compiler_depend.make
│   │   ├── compiler_depend.ts
│   │   └── progress.make
│   ├── pkgRedirects
│   ├── progress.marks
│   └── translations.dir
│       ├── DependInfo.cmake
│       ├── build.make
│       ├── cmake_clean.cmake
│       ├── compiler_depend.make
│       ├── compiler_depend.ts
│       └── progress.make
├── Makefile
├── cmake_install.cmake
├── translations.qrc
└── translations.qrc.depends

15 directories, 49 files

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- -

11-2. 「ビルド」を実行:

-


ビルド:

$ cd ~/Git/lubuntu-update-ubuntu-plucky/build
$ make -j$(nproc)
[  3%] Generating lubuntu-update_en_US.qm
[ 11%] Generating lubuntu-update_es_ES.qm
[ 11%] Generating lubuntu-update_ja_JP.qm
Updating '/home/usr/Git/lubuntu-update-ubuntu-plucky/build/lubuntu-update_en_US.qm'...
Updating '/home/usr/Git/lubuntu-update-ubuntu-plucky/build/lubuntu-update_es_ES.qm'...
    Generated 0 translation(s) (0 finished and 0 unfinished)
    Ignored 38 untranslated source text(s)
    Generated 0 translation(s) (0 finished and 0 unfinished)
    Ignored 38 untranslated source text(s)
[ 15%] Generating lubuntu-update_zh_CN.qm
Updating '/home/usr/Git/lubuntu-update-ubuntu-plucky/build/lubuntu-update_ja_JP.qm'...
    Generated 38 translation(s) (38 finished and 0 unfinished) ←(日本語で、38が翻訳完了)
Updating '/home/usr/Git/lubuntu-update-ubuntu-plucky/build/lubuntu-update_zh_CN.qm'...
    Generated 0 translation(s) (0 finished and 0 unfinished)
    Ignored 38 untranslated source text(s)

[ 15%] Built target translations
[ 15%] Built target lubuntu-update_autogen_timestamp_deps
[ 19%] Automatic MOC and UIC for target lubuntu-update
[ 19%] Built target lubuntu-update_autogen
[ 23%] Generating qrc_translations.cpp
[ 26%] Automatic RCC for src/resources.qrc
[ 30%] Building CXX object CMakeFiles/lubuntu-update.dir/src/conffilewidget.cpp.o
[ 34%] Building CXX object CMakeFiles/lubuntu-update.dir/src/mainwindow.cpp.o
[ 38%] Building CXX object CMakeFiles/lubuntu-update.dir/src/main.cpp.o
[ 46%] Building CXX object CMakeFiles/lubuntu-update.dir/src/orchestrator.cpp.o
[ 46%] Building CXX object CMakeFiles/lubuntu-update.dir/src/aptmanager.cpp.o
[ 50%] Building CXX object CMakeFiles/lubuntu-update.dir/src/conffilehandlerdialog.cpp.o
[ 57%] Building CXX object CMakeFiles/lubuntu-update.dir/lubuntu-update_autogen/mocs_compilation.cpp.o
[ 57%] Building CXX object CMakeFiles/lubuntu-update.dir/src/diffdisplaydialog.cpp.o
[ 61%] Building CXX object CMakeFiles/lubuntu-update.dir/src/releaseupgradewindow.cpp.o
[ 65%] Building CXX object CMakeFiles/lubuntu-update.dir/src/upgradedelaywindow.cpp.o
[ 69%] Building CXX object CMakeFiles/lubuntu-update.dir/src/windowshowwatcher.cpp.o
[ 73%] Building CXX object CMakeFiles/lubuntu-update.dir/qrc_translations.cpp.o
[ 76%] Building CXX object CMakeFiles/lubuntu-update.dir/lubuntu-update_autogen/UVLADIE3JM/qrc_resources.cpp.o                                                                                                    
[ 80%] Linking CXX executable lubuntu-update
[100%] Built target lubuntu-update
usr@usr-PC:~/Git/lubuntu-update-ubuntu-plucky/build$ 

→正常終了:

-

「日本語」のファイルだけが翻訳されていたので、「日本語」だけが翻訳されました:

-

「build/」フォルダに、4つの「.qm」ファイルが生成されました:

手動で行ったときと(実行する位置が違うので)落ちるフォルダが違います:

$ ls -l ~/Git/lubuntu-update-ubuntu-plucky/build/ | grep qm
:
-rw-rw-r-- 1 usr usr     33  8月  9 16:48 lubuntu-update_en_US.qm
-rw-rw-r-- 1 usr usr     33  8月  9 16:48 lubuntu-update_es_ES.qm
-rw-rw-r-- 1 usr usr   4863  8月  9 16:48 lubuntu-update_ja_JP.qm
-rw-rw-r-- 1 usr usr     26  8月  9 16:48 lubuntu-update_zh_CN.qm

→「日本語」だけファイルサイズが大きいことに注目:

-

参考1:

翻訳元のテンプレートファイルのサイズを確認:

$ ls -l ~/Git/lubuntu-update-ubuntu-plucky/src/translations/
:
-rw-rw-r-- 1 usr usr  8691  8月  6 17:56 lubuntu-update_en_US.ts
-rw-rw-r-- 1 usr usr  8691  8月  6 17:56 lubuntu-update_es_ES.ts
-rw-rw-r-- 1 usr usr 10088  8月  7 04:20 lubuntu-update_ja_JP.ts
-rw-rw-r-- 1 usr usr  8691  8月  6 17:56 lubuntu-update_zh_CN.ts

→原本の方がサイズが大きいことに注目:

-

「日本語」以外はサイズが同じです:

つまり、3行目の言語コード(5桁)が違うだけで、翻訳もされていません:

-

参考2:

仮想マシンで確認:

$ echo $(nproc)
8

つまり、下記と同じです:

make -j8

→並行してを動かすプロセッサ数を指定すると、ビルド(make)が速くなります:

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- --

11-3. 「インストール」を実行:

-

ファイルの配置を行います:

-

「lubuntu-update」のサイトの README の手順には、ビルドまでしか書かれていません:

ファイルの配置をしたいので、リスクが高いけどトライしました:

-


1). インストール:

「make install」で失敗すると、つい、「sudo make install」とやりがちですが、今回は禁止です:

(まだ完全ではない)「lubuntu-update」を「sudo make install」でインストールすると、システムの動作が不安定になるリスクが高いので、禁止されているようです:

-

$ cd ~/Git/lubuntu-update-ubuntu-plucky/build
$ make install
[ 15%] Built target translations
[ 15%] Built target lubuntu-update_autogen_timestamp_deps
[ 19%] Built target lubuntu-update_autogen
[100%] Built target lubuntu-update
Install the project...
-- Install configuration: ""
-- Installing: /home/usr/local/bin/lubuntu-update
-- Installing: /usr/libexec/lubuntu-update-backend

赤色表示:

CMake Error at cmake_install.cmake:70 (file):
  file INSTALL cannot copy file                                                                          
  "/home/usr/Git/lubuntu-update-ubuntu-plucky/src/lubuntu-update-backend" to                             
  "/usr/libexec/lubuntu-update-backend": Permission denied.                                              

make: *** [Makefile:100: install] エラー 1
usr@usr-PC:~/Git/lubuntu-update-ubuntu-plucky/build$ 

→エラーで停止しました:

-

インストール先を「/usr/local/」に指定してビルドしても、

「lubuntu-update-backend」は、「/usr/libexec/lubuntu-update-backend」にコピーする必要があり、

root 権限が必要なので、エラーしました。

-

つまり、「sudo make install」でないと失敗します。
 だから、README に書かれていなかったのかと納得:

-

ただし、「Lubuntu 25.04」では、すでに「lubuntu-update」は動いており、ファイルは存在しています:

確認:
$ ls /usr/libexec/lubuntu-update-backend
:
/usr/libexec/lubuntu-update-backend ←(スクリプトなので、緑色で表示)

-


2). リスクの高い「sudo make install」を実行する前に、

「lubuntu-update-backend」のインストールをパスできないか、トライしてみました:
$ cd ~/Git/lubuntu-update-ubuntu-plucky/build
$ featherpad cmake_install.cmake

↓ 61 行目〜 71行目:

if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
  list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
   "/usr/libexec/lubuntu-update-backend")
  if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
    message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
  endif()
  file(INSTALL DESTINATION "/usr/libexec" TYPE FILE FILES "/home/usr/Git/lubuntu-update-ubuntu-plucky/src/lubuntu-update-backend")
endif()

↓ コメント化:

# if(CMAKE_INSTALL_COMPONENT STREQUAL "Unspecified" OR NOT CMAKE_INSTALL_COMPONENT)
#   list(APPEND CMAKE_ABSOLUTE_DESTINATION_FILES
#    "/usr/libexec/lubuntu-update-backend")
#   if(CMAKE_WARN_ON_ABSOLUTE_INSTALL_DESTINATION)
#     message(WARNING "ABSOLUTE path INSTALL DESTINATION : ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
#   endif()
#   if(CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION)
#     message(FATAL_ERROR "ABSOLUTE path INSTALL DESTINATION forbidden (by caller): ${CMAKE_ABSOLUTE_DESTINATION_FILES}")
#   endif()
#   file(INSTALL DESTINATION "/usr/libexec" TYPE FILE FILES "/home/usr/Git/lubuntu-update-ubuntu-plucky/src/lubuntu-update-backend")
# endif()

→Ctrl+S で保存:

-


3). インストール2:

$ cd ~/Git/lubuntu-update-ubuntu-plucky/build
$ make install
[ 15%] Built target translations
[ 15%] Built target lubuntu-update_autogen_timestamp_deps
[ 19%] Built target lubuntu-update_autogen
[100%] Built target lubuntu-update
Install the project...
-- Install configuration: ""
-- Up-to-date: /home/usr/local/bin/lubuntu-update
-- Installing: /home/usr/local/share/applications/lubuntu-update.desktop
usr@usr-PC:~/Git/lubuntu-update-ubuntu-plucky/build$ 

→簡単に終了しましたが、コメント化した部分から呼び出されるところがあったかもしれません。

-

確認1:
$ ls /usr/share/lubuntu-update/
:
ls: '/usr/share/lubuntu-update/' にアクセスできません: そのようなファイルやディレクトリはありません

→アプリのフォルダは作られないみたい:

-

確認2:
$ cd ~/local/
$ tree -a
.
├── bin
│   └── lubuntu-update
└── share
    └── applications
        └── lubuntu-update.desktop

4 directories, 2 files

-

$ sudo find / -name *.qm | grep lubuntu
:
/home/usr/Git/lubuntu-update-ubuntu-plucky/build/lubuntu-update_en_US.qm
/home/usr/Git/lubuntu-update-ubuntu-plucky/build/lubuntu-update_ja_JP.qm
/home/usr/Git/lubuntu-update-ubuntu-plucky/build/lubuntu-update_es_ES.qm
/home/usr/Git/lubuntu-update-ubuntu-plucky/build/lubuntu-update_zh_CN.qm

-

再起動:
$ reboot

-

日本語化されたか確認:

起動:

$ ~/local/bin/lubuntu-update

→日本語化されていません:

-


3). 後始末:

「~/local/」フォルダの再作成:

$ sudo rm -R ~/local/
$ mkdir -p ~/local/
$ ls ~/local/
$ 

-

「build」フォルダの再作成:

$ cd ~/Git/lubuntu-update-ubuntu-plucky
$ sudo rm -R build/
$ ls
:
CMakeLists.txt  debian     lubuntu-update-autostart.desktop  src
README.md       gen_ts.sh  lubuntu-update.desktop

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- ---

11-4. 「cmake」、「make」、「sudo make install」を実行:

-

「cmake」からやり直しました:

一部、システムに書き込むファイルがあるので、 README で推奨されていない「sudo make install」を使いました:

-


1). インストール先の「~/local/」フォルダを作成:

$ mkdir -p ~/local/
$ ls ~/local/
$

-


2). ビルドを行う(場所である)フォルダを作成:

$ cd ~/Git/lubuntu-update-ubuntu-plucky
$ mkdir build

-


3). インストール先を指定して「cmake」を実行:

$ cd ~/Git/lubuntu-update-ubuntu-plucky/build
$ cmake -DCMAKE_INSTALL_PREFIX=$HOME/local ..

→行の後ろに「..」があることに注意:

-


4). ビルド:

$ cd ~/Git/lubuntu-update-ubuntu-plucky/build
$ make -j$(nproc)

→ここでは自動で「make -j8」が実行されます:

-


5). 確認:

$ ls -l ~/Git/lubuntu-update-ubuntu-plucky/build/ | grep qm
:
-rw-rw-r-- 1 usr usr     33  8月  9 19:57 lubuntu-update_en_US.qm
-rw-rw-r-- 1 usr usr     33  8月  9 19:57 lubuntu-update_es_ES.qm
-rw-rw-r-- 1 usr usr   4863  8月  9 19:57 lubuntu-update_ja_JP.qm
-rw-rw-r-- 1 usr usr     26  8月  9 19:57 lubuntu-update_zh_CN.qm

-


6). インストール:

README で推奨されていない「sudo make install」を使いました:

$ cd ~/Git/lubuntu-update-ubuntu-plucky/build
$ sudo make install
[ 15%] Built target translations
[ 15%] Built target lubuntu-update_autogen_timestamp_deps
[ 19%] Built target lubuntu-update_autogen
[100%] Built target lubuntu-update
Install the project...
-- Install configuration: ""
-- Installing: /home/usr/local/bin/lubuntu-update
-- Installing: /usr/libexec/lubuntu-update-backend
-- Installing: /home/usr/local/share/applications/lubuntu-update.desktop
→「翻訳ファイル」の配置のメッセージがありません:
$ sudo find / -name *.qm | grep lubuntu
:
/home/usr/Git/lubuntu-update-ubuntu-plucky/build/lubuntu-update_en_US.qm
/home/usr/Git/lubuntu-update-ubuntu-plucky/build/lubuntu-update_ja_JP.qm
/home/usr/Git/lubuntu-update-ubuntu-plucky/build/lubuntu-update_es_ES.qm
/home/usr/Git/lubuntu-update-ubuntu-plucky/build/lubuntu-update_zh_CN.qm

→ヒットするのは、生成された「.qm」ファイルだけで、別の位置にはなし:

-


7). 再起動:

$ reboot

-


8). 日本語化されたか確認:

起動:

$ ~/local/bin/lubuntu-update

-

→日本語化されていません:

-


9). 参考:

「Qt アプリケーションのローカライズ 」を確認すると、

大きなアプリであれば、「.qm」ファイルを QTranslator を使用するローダーコードが見つけられる場所に配置 するけど、小さなアプリの場合は、(cmake で、)Qt リソースに埋め込むことができるとのことです。

Haiku での翻訳と同じですね。埋め込まれると簡単に翻訳を修正とか出来なくなります)

-

つまり、いくら探しても「.qm」ファイルがないこともあるということです:

-

抜粋:

例: 「.qm」ファイルをアプリに埋め込む、指示:

# Automatically embed generated .qm files.
qt_add_translations(myapplication)

-

「~/Git/lubuntu-update-ubuntu-plucky/CMakeLists.txt」の中に、似た構文を見つけました:

qt6_add_translation(QM_FILES ${TS_FILES})
→たぶん、埋め込んでます:
いくらファイルを探しても見つからないわけです:

-


10). 埋め込まれたか確認:

-

(1). 作業前:
$ whereis lubuntu-update
lubuntu-update: /usr/bin/lubuntu-update
$ ls -l /usr/bin/lubuntu-update
:
-rwxr-xr-x 1 root root 167664 12月 25  2024 /usr/bin/lubuntu-update

→サイズは「167664」です:

-

(2). 作業後:
$ ls -l ~/local/bin/lubuntu-update
:
-rwxr-xr-x 1 root root 393480  8月  9 19:57 /home/usr/local/bin/lubuntu-update

→サイズは「393480」です:

-

(3). サイズが増えているので、「.qm」ファイルが「埋め込まれた」と思われます:
→後は、「lubuntu-update」アプリが、埋め込まれた「.qm」ファイルを利用できる作りになれば、「日本語化」されるはず:

-

-

現時点で行えるのは、ここまで。
→「lubuntu-update」の開発が進んで、
 埋め込んだ「.qm」が反映されるようになることを期待:

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- ----

20. 参考: 翻訳する言語に「日本語」を追加、失敗した例:

-

こちらの作業は要りません:

「gen_ts.sh」スクリプトの実行で、2つのエラーがあったときの履歴です:

-


1). 「gen_ts.sh」スクリプトに「日本語」を追加:

-

(1). 作業前の確認:
$ cd ~/Git/lubuntu-update-ubuntu-plucky/
$ cat gen_ts.sh
:
#!/bin/bash
langList=('en_US' 'es_ES' 'zh_CN')
for i in ${langList[@]}; do
    targetFile="translations/lubuntu-update_$i.ts"
    if [ ! -e $targetFile ]; then
        echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>" > $targetFile
        echo "<!DOCTYPE TS>" >> $targetFile
        echo "<TS version=\"2.1\" language=\"$i\"></TS>" >> $targetFile
    fi
done
lupdate *.cpp *.h *.ui -ts translations/*

→英語(en_US)、スペイン語(es_ES)、中国語(zh_CN)が登録されています:

-

(2). 修正:
$ nano gen_ts.sh

↓ 2行目の langList 配列に「'ja_JP'」を追加しました:

#!/bin/bash
langList=('en_US' 'es_ES' 'zh_CN' 'ja_JP')
for i in ${langList[@]}; do
    targetFile="translations/lubuntu-update_$i.ts"
    if [ ! -e $targetFile ]; then
        echo "<?xml version=\"1.0\" encoding=\"utf-8\"?>" > $targetFile
        echo "<!DOCTYPE TS>" >> $targetFile
        echo "<TS version=\"2.1\" language=\"$i\"></TS>" >> $targetFile
    fi
done
lupdate *.cpp *.h *.ui -ts translations/*

Ctrl+O で書き込み先を確認して、Enter
Ctrl+X で終了

-

確認:
$ cat gen_ts.sh

-


2). 「gen_ts.sh」スクリプトを実行:

-

(1). 実行:
$ cd ~/Git/lubuntu-update-ubuntu-plucky/
$ ./gen_ts.sh
./gen_ts.sh: 行 6: translations/lubuntu-update_en_US.ts: そのようなファイルやディレクトリはありません
./gen_ts.sh: 行 7: translations/lubuntu-update_en_US.ts: そのようなファイルやディレクトリはありません
./gen_ts.sh: 行 8: translations/lubuntu-update_en_US.ts: そのようなファイルやディレクトリはありません
./gen_ts.sh: 行 6: translations/lubuntu-update_es_ES.ts: そのようなファイルやディレクトリはありません
./gen_ts.sh: 行 7: translations/lubuntu-update_es_ES.ts: そのようなファイルやディレクトリはありません
./gen_ts.sh: 行 8: translations/lubuntu-update_es_ES.ts: そのようなファイルやディレクトリはありません
./gen_ts.sh: 行 6: translations/lubuntu-update_zh_CN.ts: そのようなファイルやディレクトリはありません
./gen_ts.sh: 行 7: translations/lubuntu-update_zh_CN.ts: そのようなファイルやディレクトリはありません
./gen_ts.sh: 行 8: translations/lubuntu-update_zh_CN.ts: そのようなファイルやディレクトリはありません
./gen_ts.sh: 行 6: translations/lubuntu-update_ja_JP.ts: そのようなファイルやディレクトリはありません
./gen_ts.sh: 行 7: translations/lubuntu-update_ja_JP.ts: そのようなファイルやディレクトリはありません
./gen_ts.sh: 行 8: translations/lubuntu-update_ja_JP.ts: そのようなファイルやディレクトリはありません
lupdate: could not exec '/usr/lib/qt5/bin/lupdate': No such file or directory
エラーが出るので、「lubuntu-update_ja_JP.ts」が作成できません:

-

2つのエラーがありました:

1. 多く出ているエラーは、「src/」に移動して実行することで、解消しました:

-

2. 最終行の「lupdate: could not exec '/usr/lib/qt5/bin/lupdate': No such file or directory」は、
 スクリプトにある「lupdate」が「/usr/lib/qt5/bin/lupdate」のパスでないと実行されないからです:

 参考: [SOLVED] How to lupdate with qt5?

-

「qttools5-dev-tools」をインストール:

$ sudo apt install qttools5-dev-tools

-

$ ls -1 /usr/lib/qt5/bin/ | grep lupdate
:
lupdate
lupdate-pro

→「/usr/lib/qt5/bin/lupdate」にパスが通ることで、解消しました:

-

(2). 「src/」の位置に移動して、「gen_ts.sh」スクリプトを実行:
$ cd ~/Git/lubuntu-update-ubuntu-plucky/src/
$ ../gen_ts.sh

→相対位置が変わり、「../」の点が 2つになったことに注意:

Updating 'translations/lubuntu-update_en_US.ts'...
    Found 38 source text(s) (14 new and 24 already existing)
Updating 'translations/lubuntu-update_es_ES.ts'...
    Found 38 source text(s) (14 new and 24 already existing)
Updating 'translations/lubuntu-update_ja_JP.ts'...
    Found 38 source text(s) (38 new and 0 already existing)
Updating 'translations/lubuntu-update_zh_CN.ts'...
    Found 38 source text(s) (14 new and 24 already existing)

→うまく行きました:

-

(3). 確認:
$ pwd
/home/usr/Git/lubuntu-update-ubuntu-plucky/src
$ tree translations
:
translations
├── lubuntu-update_en_US.ts
├── lubuntu-update_es_ES.ts
├── lubuntu-update_ja_JP.ts   ←(追加)
└── lubuntu-update_zh_CN.ts

1 directory, 4 files

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- -----

21. 参考:「Qt 5.15」の場合に「cmake」を実行、失敗した例:

-

こちらの作業は要りません:

「cmake」で色々とトライした履歴です:

-

「cmake」 でエラーが出たときの参考になるか、わかりませんが、

「cmake」 を実行したら「Qt6」を欲したので、こちらは早々と切り上げて、「Qt6」に移行しました:

-

ソースファイルは「Qt6」に移行していますが、「lubuntu-update」のサイトや、ソースファイルに含まれる README.md ファイルには、依存として「Qt 5.15」が書かれているので注意:

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- ----- -

21-1. 「Qt 5.15」の場合に、「lubuntu-update」の「cmake」に必要な依存パッケージをインストール:

-

参考:

UbuntuにQtをインストール

-


1). 「Qt 5.15」のインストール:

$ sudo apt install qtbase5-dev
:
Installing: 
  qtbase5-dev

Installing dependencies:
  libegl-dev        libqt5concurrent5t64    libqt5sql5t64   libxcb1-dev    qtbase5-dev-tools
  libgl-dev         libqt5opengl5-dev       libqt5test5t64  libxdmcp-dev   qtchooser
  libglu1-mesa-dev  libqt5opengl5t64        libvulkan-dev   libxext-dev    x11proto-dev
  libglx-dev        libqt5printsupport5t64  libx11-dev      qt5-qmake      xorg-sgml-doctools
  libopengl-dev     libqt5sql5-sqlite       libxau-dev      qt5-qmake-bin  xtrans-dev

提案パッケージ:
  libx11-doc  libxext-doc                 firebird-dev  libsqlite3-dev
  libxcb-doc  default-libmysqlclient-dev  libpq-dev     unixodbc-dev

-

確認:
$ apt list qtbase5-dev
:
qtbase5-dev/plucky,now 5.15.15+dfsg-4ubuntu1 amd64 [インストール済み]

-


2). 「clang」のインストール:

C/C++/Objective-C コンパイラ:

$ sudo apt install clang
:
Installing:
  clang

Installing dependencies:
  binutils-gold                   libc6-i386              libllvm20       llvm-20
  binutils-gold-x86-64-linux-gnu  libclang-common-20-dev  libncurses-dev  llvm-20-dev         
  clang-20                        libclang-cpp20          libobjc-14-dev  llvm-20-linker-tools  
  clang-tools-20                  libclang-rt-20-dev      libobjc4        llvm-20-runtime  
  lib32gcc-s1                     libclang1-20            libpfm4         llvm-20-tools   
  lib32stdc++6                    libffi-dev              libxml2-dev 

提案パッケージ:
  clang-20-doc  wasi-libc  ncurses-doc  pkg-config  llvm-20-doc

-

確認:
$ apt list clang
:
clang/plucky,now 1:20.0-63ubuntu1 amd64 [インストール済み]

-


3). 「Qt Creator」のインストール:

$ sudo apt install qtcreator
:
Installing: 
  qtcreator

Installing dependencies:
  assistant-qt6     libqt6designer6                   libyaml-cpp0.8
  clang-tidy        libqt6designercomponents6         linguist-qt6                                       
  clang-tidy-20     libqt6help6                       qdbus-qt6                                          
  clangd            libqt6qmlcompiler6                qdoc-qt6                                           
  clangd-20         libqt6quick3d6                    qml-qt6                                            
  designer-qt6      libqt6quick3dassetimport6         qml6-module-qtquick-timeline                       
  gdb               libqt6quick3dassetutils6          qml6-module-qtquick3d                              
  libbabeltrace1    libqt6quick3druntimerender6       qml6-module-qtquick3d-particles3d                  
  libc6-dbg         libqt6quick3dutils6               qt6-base-dev-tools                                 
  libcares2         libqt6quicktest6                  qt6-declarative-dev-tools                          
  libclang-cpp19    libqt6quickvectorimagegenerator6  qt6-documentation-tools                            
  libgrpc++1.51t64  libqt6serialport6                 qt6-l10n-tools                                     
  libgrpc29t64      libqt6uitools6                    qt6-qmltooling-plugins                             
  libipt2           libre2-11                         qt6-tools-dev-tools                                
  libprotoc32t64    libsource-highlight-common        qtcreator-data                                     
  libqt6charts6     libsource-highlight4t64           qtcreator-doc    
 
提案パッケージ:
  gdb-doc  gdbserver  cmake  clazy  meson  subversion  valgrind  python3-pylsp

-

確認:
$ apt list qtcreator
qtcreator/plucky,now 15.0.1-1build3 amd64 [インストール済み]

-

$ qtcreator -version
:
Qt Creator 15.0.1 based on Qt 6.8.3

  Android 15.0.1 Develop applications for Android devices.
: 省略

-


4). 「qttools5-dev-tools」のインストール:

追記:

翻訳で使う、「gen_ts.sh」スクリプトは、「/usr/lib/qt5/bin/lupdate」のパスが通っていないと実行できませんでした:

→こちらのパッケージをインストールすることでパスが通りました:

依存パッケージを追加でインストール:
$ sudo apt install qttools5-dev-tools
:
Installing:                                                 
  qttools5-dev-tools
                                                                                                         
Installing dependencies:
  libqt5designer5            libqt5help5          qdoc-qt5            qt5-assistant
  libqt5designercomponents5  libqt5quickwidgets5  qhelpgenerator-qt5  qtattributionsscanner-qt5          
                                                                                                         
提案パッケージ:
  qt5-doc
$ whereis lupdate
:
lupdate: /usr/bin/lupdate /usr/share/man/man1/lupdate.1.gz

→変化なし

-

$ ls -1 /usr/lib/qt5/bin/l*
:
/usr/lib/qt5/bin/lconvert
/usr/lib/qt5/bin/linguist
/usr/lib/qt5/bin/lprodump
/usr/lib/qt5/bin/lrelease
/usr/lib/qt5/bin/lrelease-pro
/usr/lib/qt5/bin/lupdate     ←(注目)
/usr/lib/qt5/bin/lupdate-pro

→追加されました:

-


5). 他のツールをインストール:

$ sudo apt install cmake curl
:
curl はすでに最新バージョン (8.12.1-3ubuntu1) です。        
curl は手動でインストールしたと設定されました。

Installing:                 
  cmake
                                                                                                         
Installing dependencies:
  cmake-data  libjsoncpp26  librhash1
                                                                                                         
提案パッケージ:
  cmake-doc  cmake-format  elpa-cmake-mode  ninja-build

-


6). 「diff」のツールをインストール2:

$ apt list diffutils
:
diffutils/plucky,now 1:3.10-3 amd64 [インストール済み]

→「diff」コマンドが使える、「diffutils」パッケージがインストールされていました:

-

$ whereis diff
:
diff: /usr/bin/diff /usr/share/man/man1/diff.1.gz

→「実行ファイル」と「マニュアル」がありました:

-

実行してみる:
$ diff --help
:
使用法: diff [OPTION]... FILES
FILES を行ごとに比較します。
: 省略

→OK

-


7). Qt (Qt Creator) を起動できるか確認:

メニュー→「プログラミング」→「Qt Creator

「Welcome to Qt Creator」画面が表示:

→1/2 画面だと、横幅が足りないみたい:

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- ----- --

21-2. 「Qt 5.15」の場合に、「lubuntu-update」アプリを「~/local」指定で「cmake」を実行1(失敗1):

-

今のところ、「翻訳」ファイルを配置する位置がわからないので、まず、こちらを実行しました:

失敗しても回復しやすいように、インストール先は「~/local/」フォルダを指定:

-


1). 「~/local/」フォルダの作成:

$ mkdir -p ~/local/

-


2). ビルドディレクトリを作成:

移動:
$ cd ~/Git/lubuntu-update-ubuntu-plucky
$ ls -p
:
CMakeLists.txt  debian/    lubuntu-update-autostart.desktop  src/
README.md       gen_ts.sh  lubuntu-update.desktop

-

作成:
$ mkdir build
$ ls -p
:
CMakeLists.txt  build/   gen_ts.sh                         lubuntu-update.desktop
README.md       debian/  lubuntu-update-autostart.desktop  src/

-

移動:
$ cd build

-


3). インストール先を指定しての「cmake」の実行:

移動:
$ cd ~/Git/lubuntu-update-ubuntu-plucky/build

-

実行:
$ cmake -DCMAKE_INSTALL_PREFIX=$HOME/local ..
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- The CXX compiler identification is GNU 14.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
CMake Error at CMakeLists.txt:12 (find_package):
  By not providing "FindQt6.cmake" in CMAKE_MODULE_PATH this project has                                 
  asked CMake to find a package configuration file provided by "Qt6", but                                
  CMake did not find one.                                                                                
                                                                                                         
  Could not find a package configuration file provided by "Qt6" with any of                              
  the following names:                                                                                   
                                                                                                         
    Qt6Config.cmake                                                                                      
    qt6-config.cmake                                                                                     
                                                                                                         
  Add the installation prefix of "Qt6" to CMAKE_PREFIX_PATH or set "Qt6_DIR"                             
  to a directory containing one of the above files.  If "Qt6" provides a                                 
  separate development package or SDK, be sure it has been installed.                                    
                                                                                                         
                                                                                                         
-- Configuring incomplete, errors occurred!
問題: →(薄々は気付いていたけど)やはり、「Qt6」が必要でした:
「lubuntu-update」サイトの README.md の記述が更新されていません。古いです:

今のところ、「lubuntu-update」のサポートはしていない、と書かれていたので、しかたないけど、

ビルドの途中で、依存が「Qt 5.15」でなく「QT6」とわかったときのやり直しは、手間が倍でした:

-

それでも、「Qt5 のインストール」の実行例のひとつ、になったかな:

-


4). 「cmake」の実行前の状態に戻すのは簡単で、「build」フォルダを削除するだけです:

-

「build」フォルダを削除する場合:
$ cd ..
$ rm -R build

-

確認:
$ ls
:
CMakeLists.txt  debian     lubuntu-update-autostart.desktop  src
README.md       gen_ts.sh  lubuntu-update.desktop

ただし、「build」フォルダを削除するよりも、中身を削除した方が、
「build」フォルダを作成する手間が減るので楽です(が、rm コマンドは注意が必要です):

-

「build」フォルダの中身を削除する場合:

rm コマンドの操作は、くれぐれも注意:

$ cd ~/Git/lubuntu-update-ubuntu-plucky/build
$ ls -1Ap
:
CMakeFiles/
CMakeCache.txt
$ rm -R CMakeFiles
$ rm *
$ ls
$

-


5). 「Qt6」とぶつかるといけないので、「Qt5」関連のパッケージの削除が必要です:

次の「項番 21-3」で実行:

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- ----- ---

21-3. 不要になった「Qt 5.15」関連のパッケージを削除:

-

「Qt6」のインストール前に、「Qt5」関連のパッケージを削除しました:

インストールした順と逆の順番で、設定ファイルも含めて削除:

-


1). 「qttools5-dev-tools」を設定ファイルも含めて削除:

$ sudo apt purge qttools5-dev-tools

-


2). 「Qt Creator」を設定ファイルも含めて削除:

$ sudo apt purge qtcreator

-


3). 「clang」を設定ファイルも含めて削除:

$ sudo apt purge clang

-


4). 「Qt 5.15」を設定ファイルも含めて削除:

$ sudo apt purge qtbase5-dev

-


5).残骸のクリア:

$ sudo apt autoremove
:
REMOVING:                                                   
  assistant-qt6              libqt5test5t64                    qdoc-qt5
  clang-tidy                 libqt6charts6                     qdoc-qt6                                  
  clang-tidy-20              libqt6designer6                   qhelpgenerator-qt5                        
  clangd                     libqt6designercomponents6         qml-qt6                                   
  clangd-20                  libqt6help6                       qml6-module-qtquick-timeline              
  designer-qt6               libqt6qmlcompiler6                qml6-module-qtquick3d                     
  libcares2                  libqt6quick3d6                    qml6-module-qtquick3d-particles3d         
  libclang-cpp19             libqt6quick3dassetimport6         qt5-assistant                             
  libegl-dev                 libqt6quick3dassetutils6          qt5-qmake                                 
  libgl-dev                  libqt6quick3druntimerender6       qt5-qmake-bin                             
  libglu1-mesa-dev           libqt6quick3dutils6               qt6-base-dev-tools                        
  libglx-dev                 libqt6quicktest6                  qt6-declarative-dev-tools                 
  libgrpc++1.51t64           libqt6quickvectorimagegenerator6  qt6-documentation-tools                   
  libgrpc29t64               libqt6serialport6                 qt6-l10n-tools                            
  libopengl-dev              libqt6uitools6                    qt6-tools-dev-tools                       
  libprotoc32t64             libre2-11                         qtattributionsscanner-qt5                 
  libqt5concurrent5t64       libvulkan-dev                     qtbase5-dev-tools                         
  libqt5designer5            libx11-dev                        qtchooser                                 
  libqt5designercomponents5  libxau-dev                        qtcreator-data                            
  libqt5help5                libxcb1-dev                       qtcreator-doc                             
  libqt5opengl5t64           libxdmcp-dev                      x11proto-dev                              
  libqt5printsupport5t64     libxext-dev                       xorg-sgml-doctools                        
  libqt5quickwidgets5        libyaml-cpp0.8                    xtrans-dev                                
  libqt5sql5-sqlite          linguist-qt6                                                                
  libqt5sql5t64              qdbus-qt6                                                                   
                                                                                                         
Summary:
  Upgrading: 0, Installing: 0, Removing: 73, Not Upgrading: 0

-


6).再起動:

$ reboot

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- ----- ----

22. 参考:「Qt6」の場合に「cmake」を実行、失敗した例:

-

こちらの作業は要りません:

「cmake」で色々とトライした履歴です:

-

「cmake」 でエラーが出たときの参考になると良いですね

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- ----- -----

22-1. 「Qt6」の場合、「lubuntu-update」の cmake に必要な依存パッケージをインストール:

-


1). 「Qt 6」のインストール:

$ sudo apt install qt6-base-dev
:
Installing:                                                 
  qt6-base-dev

Installing dependencies:
  libgl-dev      libvulkan-dev  libxcb1-dev   qmake6-bin          xorg-sgml-doctools
  libglx-dev     libx11-dev     libxdmcp-dev  qt6-base-dev-tools  xtrans-dev
  libopengl-dev  libxau-dev     qmake6        x11proto-dev

提案パッケージ:
  libx11-doc  libxcb-doc

-

確認:
$ apt list qt6-base-dev
:
qt6-base-dev/plucky,now 6.8.3+dfsg-0ubuntu2 amd64 [インストール済み]

→「Qt5」(qtbase5-dev) と微妙にパッケージ名の付け方が違います:

-


2). 「clang」のインストール:

C/C++/Objective-C コンパイラ:

$ sudo apt install clang
:
Installing:                                                 
  clang

-

確認:
$ apt list clang
:
clang/plucky,now 1:20.0-63ubuntu1 amd64 [インストール済み]

-


3). 「Qt Creator」のインストール:

$ sudo apt install qtcreator
:
Installing:                                                 
  qtcreator
                                                                                                         
Installing dependencies:
  assistant-qt6              libqt6help6                       qdbus-qt6
  clang-tidy                 libqt6qmlcompiler6                qdoc-qt6                                  
  clang-tidy-20              libqt6quick3d6                    qml-qt6                                   
  clangd                     libqt6quick3dassetimport6         qml6-module-qtquick-timeline              
  clangd-20                  libqt6quick3dassetutils6          qml6-module-qtquick3d                     
  designer-qt6               libqt6quick3druntimerender6       qml6-module-qtquick3d-particles3d         
  libcares2                  libqt6quick3dutils6               qt6-declarative-dev-tools                 
  libclang-cpp19             libqt6quicktest6                  qt6-documentation-tools                   
  libgrpc++1.51t64           libqt6quickvectorimagegenerator6  qt6-l10n-tools                            
  libgrpc29t64               libqt6serialport6                 qt6-tools-dev-tools                       
  libprotoc32t64             libqt6uitools6                    qtcreator-data                            
  libqt6charts6              libre2-11                         qtcreator-doc                             
  libqt6designer6            libyaml-cpp0.8                                                              
  libqt6designercomponents6  linguist-qt6                                                                
                                                                                                         
提案パッケージ:
  clazy  meson  subversion  valgrind  python3-pylsp

-

確認:
$ apt list qtcreator
:
qtcreator/plucky,now 15.0.1-1build3 amd64 [インストール済み]

-

$ qtcreator -version
:
Qt Creator 15.0.1 based on Qt 6.8.3

  Android 15.0.1 Develop applications for Android devices.
: 省略

-


4). 「dev-tools」のインストール:

参考:

翻訳で使う、「gen_ts.sh」スクリプトは、「Qt 5」の環境の場合、「/usr/lib/qt5/bin/lupdate」のパスが通っていないと実行できませんでした:

→「qttools5-dev-tools」のパッケージをインストールすることでパスが通りました:

-

「dev-tools」がインストールされているか確認:
$ apt list *dev-tools | grep 済
:
pyqt6-dev-tools/plucky,plucky,now 6.8.1-1build1 all [インストール済み、自動]
qt6-base-dev-tools/plucky,now 6.8.3+dfsg-0ubuntu2 amd64 [インストール済み、自動]
qt6-declarative-dev-tools/plucky,now 6.8.3+dfsg-0ubuntu1 amd64 [インストール済み、自動]
qt6-tools-dev-tools/plucky,now 6.8.3-0ubuntu1 amd64 [インストール済み、自動]

-

確認:
$ ls -1 /usr/lib/qt6/bin/l*
:
/usr/lib/qt6/bin/lconvert
/usr/lib/qt6/bin/linguist
/usr/lib/qt6/bin/lrelease     ←(注目)
/usr/lib/qt6/bin/lupdate     ←(注目)

→これなら使えそう:

-


5). Qt6 開発パッケージのインストール:

これがないと、cmake で「Qt6 リンギスト」が認識されません:

$ sudo apt install qt6-tools-dev
:
Installing:                                                 
  qt6-tools-dev

→メニューに「Qt6 リンギスト」は表示されません:

-

Qt6 リンギストの実行:
$ /usr/lib/qt6/bin/linguist

GUI で「リンギスト」が起動されました:

メニューの「プログラム」に登録されていません:

たぶん、デスクトップファイルが必要と思われます:

-


6). 他のツールをインストール:

$ sudo apt install cmake curl
:
curl はすでに最新バージョン (8.12.1-3ubuntu1) です。        
curl は手動でインストールしたと設定されました。

Installing:                 
  cmake
                                                                                                         
Installing dependencies:
  cmake-data  libjsoncpp26  librhash1
                                                                                                         
提案パッケージ:
  cmake-doc  cmake-format  elpa-cmake-mode  ninja-build

-


7). 「diff」のツールをインストール:

-

$ apt list diffutils
:
diffutils/plucky,now 1:3.10-3 amd64 [インストール済み]

→「diff」コマンドが使える、「diffutils」パッケージがインストールされていました:

-

$ whereis diff
:
diff: /usr/bin/diff /usr/share/man/man1/diff.1.gz

→「実行ファイル」と「マニュアル」がありました:

-

実行してみる:
$ diff --help
:
使用法: diff [OPTION]... FILES
FILES を行ごとに比較します。
: 省略

→OK

-


8). Qt (Qt Creator) を起動できるか確認:

メニュー→「プログラミング」→「Qt Creator

「Welcome to Qt Creator」画面が表示:

→1/2 画面だと、横幅が足りないみたい:

終了ボタンが表示されないので、Alt+F4 で終了:

-

「Qt6」の場合、「Qt5」と違って、メニューに「Qt Creator」しか表示されません:

「Qt リンキング」とかの表示もなし。  ←(これがおかしなことだったみたい)

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- ----- ----- -

22-2. 「Qt6」の場合に、インストール先に「~/local」を指定して「cmake」を実行1(失敗2):

-

今のところ、「翻訳」ファイルを配置する位置がわからないので、まず、こちらを実行しました:

失敗しても回復しやすいように、インストール先は「~/local/」フォルダを指定:

-

「Qt6」をインストールしての再トライです:

-


1). 「~/local/」フォルダの作成:

$ mkdir -p ~/local/

-


2). ビルドディレクトリを作成:

$ cd ~/Git/lubuntu-update-ubuntu-plucky
$ ls -p
:
CMakeLists.txt  debian/    lubuntu-update-autostart.desktop  src/
README.md       gen_ts.sh  lubuntu-update.desktop

-

作成:
$ mkdir build
$ ls -p
:
CMakeLists.txt  build/   gen_ts.sh                         lubuntu-update.desktop
README.md       debian/  lubuntu-update-autostart.desktop  src/

-

移動:
$ cd build

-


3). インストール先を指定して「cmake」を実行:

移動:
$ cd ~/Git/lubuntu-update-ubuntu-plucky/build

-

実行:
$ cmake -DCMAKE_INSTALL_PREFIX=$HOME/local ..
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- The CXX compiler identification is GNU 14.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Found WrapAtomic: TRUE
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
-- Found WrapOpenGL: TRUE
-- Could NOT find XKB (missing: XKB_LIBRARY XKB_INCLUDE_DIR) (Required is at least version "0.5.0")
-- Found WrapVulkanHeaders: /usr/include
-- Could NOT find Qt6LinguistTools (missing: Qt6LinguistTools_DIR)

赤色で表示:

CMake Error at CMakeLists.txt:12 (find_package):
  Found package configuration file: 
                                                                                                         
    /usr/lib/x86_64-linux-gnu/cmake/Qt6/Qt6Config.cmake
                                                                                                         
  but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT                                 
  FOUND.  Reason given by package: 
                                                                                                         
  Failed to find required Qt component "LinguistTools".  
                                                                                                         
  Expected Config file at                                                                                
  "/usr/lib/x86_64-linux-gnu/cmake/Qt6LinguistTools/Qt6LinguistToolsConfig.cmake"                        
  does NOT exist 


  Configuring with --debug-find-pkg=Qt6LinguistTools might reveal details why                            
  the package was not found.                                                                             
                                                                                                         
  Configuring with -DQT_DEBUG_FIND_PACKAGE=ON will print the values of some                              
  of the path variables that find_package uses to try and find the package.                              


-- Configuring incomplete, errors occurred!

→やはり、「Qt6LinguistTools」が見つからないと言ってきました:

-


3). 確認:

$ apt list linguist-qt6
:
linguist-qt6/plucky,now 6.8.3-0ubuntu1 amd64 [インストール済み、自動]

→インストールされているみたいだけど、開発版があるのかな?

-


4). Qt6 開発パッケージのインストール:

$ sudo apt install qt6-tools-dev
:
Installing:                                                 
  qt6-tools-dev

→メニューへの表示はなし:

-

$ sudo find / -name linguist
:
/usr/lib/qt6/bin/linguist
find: ‘/run/user/1000/doc’: 許可がありません
find: ‘/run/user/1000/gvfs’: 許可がありません

-


5). Qt6 リンギストの実行:

$ /usr/lib/qt6/bin/linguist

GUI で「リンギスト」が起動されました:

-


6). 「build」フォルダの中身を削除:

$ cd ~/Git/lubuntu-update-ubuntu-plucky/build
$ ls
CMakeCache.txt  CMakeFiles
$ rm CMakeCache.txt
$ rm -R CMakeFiles
$ ls
$

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- ----- ----- --

22-3. 「Qt6」の場合に、インストール先に「~/local」を指定して「cmake」を実行2(失敗3):

-


1). インストール先を指定して「cmake」を実行:

移動:
$ cd ~/Git/lubuntu-update-ubuntu-plucky/build

-

実行:
$ cmake -DCMAKE_INSTALL_PREFIX=$HOME/local ..
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.

-- The CXX compiler identification is GNU 14.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Found WrapAtomic: TRUE
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
-- Found WrapOpenGL: TRUE
-- Could NOT find XKB (missing: XKB_LIBRARY XKB_INCLUDE_DIR) (Required is at least version "0.5.0")
-- Found WrapVulkanHeaders: /usr/include
-- Configuring done (0.6s)
-- Generating done (0.0s)
-- Build files have been written to: /home/usr/Git/lubuntu-update-ubuntu-plucky/build
usr@usr-PC:~/Git/lubuntu-update-ubuntu-plucky/build$ 
→最後まで終了:
ただし、上記に含まれる、エラーが気になります:
-- Could NOT find XKB (missing: XKB_LIBRARY XKB_INCLUDE_DIR) (Required is at least version "0.5.0")

和訳: XKB が見つかりませんでした(必要なのは、少なくともバージョン「0.5.0」です)

-

「Could NOT find XKB (missing: XKB_LIBRARY XKB_INCLUDE_DIR) (Required is at least version "0.5.0")」で検索:

What are the prerequisites for this package? #42 がヒット:

和訳: (このパッケージの前提条件は何ですか? #42)

-


2). サイトで提示された一覧で、すべてのパッケージのインストールを確認:

$ apt list cmake qt6-base-dev qt6-svg-dev libqt6quickwidgets6 xkb-data  libxkbcommon-dev libxkbfile-dev libqt6svgwidgets6 qt6-svg-dev qtcreator qt6-declarative-dev qt6-base-dev qt6-webchannel-dev libqt6webenginewidgets6 qt6-webengine-dev libkf5wallet-dev sqlite3 libsqlite3-dev pkg-config
cmake/plucky,now 3.31.6-1ubuntu1 amd64 [インストール済み]
cmake/plucky 3.31.6-1ubuntu1 i386
libkf5wallet-dev/plucky 5.116.0-0ubuntu2 amd64
libqt6quickwidgets6/plucky,now 6.8.3+dfsg-0ubuntu1 amd64 [インストール済み、自動]
libqt6svgwidgets6/plucky,now 6.8.3-0ubuntu1 amd64 [インストール済み、自動]
libqt6webenginewidgets6/plucky,now 6.8.3+dfsg-0ubuntu1 amd64 [インストール済み、自動]
libsqlite3-dev/plucky-updates,plucky-security 3.46.1-3ubuntu0.2 amd64
libsqlite3-dev/plucky-updates,plucky-security 3.46.1-3ubuntu0.2 i386
libxkbcommon-dev/plucky 1.7.0-2 amd64
libxkbcommon-dev/plucky 1.7.0-2 i386
libxkbfile-dev/plucky 1:1.1.0-1build4 amd64
libxkbfile-dev/plucky 1:1.1.0-1build4 i386
pkg-config/plucky,now 1.8.1-4 amd64
pkg-config/plucky 1.8.1-4 i386
qt6-base-dev/plucky,now 6.8.3+dfsg-0ubuntu2 amd64 [インストール済み]
qt6-declarative-dev/plucky 6.8.3+dfsg-0ubuntu1 amd64
qt6-svg-dev/plucky 6.8.3-0ubuntu1 amd64
qt6-webchannel-dev/plucky 6.8.3-0ubuntu1 amd64
qt6-webengine-dev/plucky 6.8.3+dfsg-0ubuntu1 amd64
qtcreator/plucky,now 15.0.1-1build3 amd64 [インストール済み]
sqlite3/plucky-updates,plucky-security 3.46.1-3ubuntu0.2 amd64
sqlite3/plucky-updates,plucky-security 3.46.1-3ubuntu0.2 i386
xkb-data/plucky,plucky,now 2.42-1ubuntu1 all [インストール済み、自動]

→この中で、インストールされていないパッケージをインストールします:

たぶん、不要なパッケージも含まれているかも

-


3). 上記から、不足している「依存パッケージ」をインストール:

確認:
$ apt list libkf5wallet-dev libsqlite3-dev libxkbcommon-dev libxkbfile-dev pkg-config qt6-declarative-dev qt6-svg-dev qt6-webchannel-dev qt6-webengine-dev sqlite3
libkf5wallet-dev/plucky 5.116.0-0ubuntu2 amd64
libsqlite3-dev/plucky-updates,plucky-security 3.46.1-3ubuntu0.2 amd64
libsqlite3-dev/plucky-updates,plucky-security 3.46.1-3ubuntu0.2 i386
libxkbcommon-dev/plucky 1.7.0-2 amd64
libxkbcommon-dev/plucky 1.7.0-2 i386
libxkbfile-dev/plucky 1:1.1.0-1build4 amd64
libxkbfile-dev/plucky 1:1.1.0-1build4 i386
pkg-config/plucky 1.8.1-4 amd64
pkg-config/plucky 1.8.1-4 i386
qt6-declarative-dev/plucky 6.8.3+dfsg-0ubuntu1 amd64
qt6-svg-dev/plucky 6.8.3-0ubuntu1 amd64
qt6-webchannel-dev/plucky 6.8.3-0ubuntu1 amd64
qt6-webengine-dev/plucky 6.8.3+dfsg-0ubuntu1 amd64
sqlite3/plucky-updates,plucky-security 3.46.1-3ubuntu0.2 amd64
sqlite3/plucky-updates,plucky-security 3.46.1-3ubuntu0.2 i386

→インストールされていないことを確認:

-

インストール:
$ sudo apt install libkf5wallet-dev libsqlite3-dev libxkbcommon-dev libxkbfile-dev pkg-config qt6-declarative-dev qt6-svg-dev qt6-webchannel-dev qt6-webengine-dev sqlite3
Installing:                                                 
  libkf5wallet-dev  libxkbcommon-dev  pkg-config           qt6-svg-dev         qt6-webengine-dev
  libsqlite3-dev    libxkbfile-dev    qt6-declarative-dev  qt6-webchannel-dev  sqlite3                   
                                                                                                         
Installing dependencies:
  kwayland-integration        libqt6quickvectorimage6
  kwayland5-data              libxext-dev                                                                
  libegl-dev                  qml6-module-assets-downloader                                              
  libglu1-mesa-dev            qml6-module-qml                                                            
  libkf5config-bin            qml6-module-qmltime                                                        
  libkf5config-data           qml6-module-qt-labs-animation                                              
  libkf5config-dev            qml6-module-qt-labs-settings                                               
  libkf5config-dev-bin        qml6-module-qt-labs-sharedimage                                            
  libkf5config-doc            qml6-module-qt-labs-wavefrontmesh                                          
  libkf5configcore5           qml6-module-qtnetwork                                                      
  libkf5configgui5            qml6-module-qtpositioning                                                  
  libkf5configqml5            qml6-module-qtqml-xmllistmodel                                             
  libkf5wallet-data           qml6-module-qtquick-effects                                                
  libkf5wallet-doc            qml6-module-qtquick-localstorage                                           
  libkf5wallet5               qml6-module-qtquick-nativestyle                                            
  libkf5waylandclient5        qml6-module-qtquick-particles                                              
  libkf5windowsystem-data     qml6-module-qtquick-pdf                                                    
  libkf5windowsystem-dev      qml6-module-qtquick-tooling                                                
  libkf5windowsystem-doc      qml6-module-qtquick-vectorimage                                            
  libkf5windowsystem5         qml6-module-qttest                                                         
  libqt5concurrent5t64        qml6-module-qtwebengine-controlsdelegates                                  
  libqt5opengl5-dev           qt5-qmake                                                                  
  libqt5opengl5t64            qt5-qmake-bin                                                              
  libqt5printsupport5t64      qt6-image-formats-plugin-pdf                                               
  libqt5sql5-sqlite           qt6-pdf-dev                                                                
  libqt5sql5t64               qt6-positioning-dev                                                        
  libqt5test5t64              qt6-qmllint-plugins                                                        
  libqt6pdf6                  qt6-qmlls-plugins                                                          
  libqt6pdfquick6             qt6-webengine-dev-tools                                                    
  libqt6pdfwidgets6           qtbase5-dev                                                                
  libqt6positioning6-plugins  qtbase5-dev-tools                                                          
  libqt6positioningquick6     qtchooser                                                                  
  libqt6qmlnetwork6                                                                                      
                                                                                                         
提案パッケージ:
  sqlite3-doc  libxext-doc  default-libmysqlclient-dev  firebird-dev  libpq-dev  unixodbc-dev

Summary:
  Upgrading: 0, Installing: 75, Removing: 0, Not Upgrading: 0

→依存の依存が多いですね:

-

誤って「qt5」のパッケージがインストールされています:

→よく確認してから、Enter すべきでした:

$ apt list libkf5wallet-dev
libkf5wallet-dev/plucky,now 5.116.0-0ubuntu2 amd64 [インストール済み]
$ apt list libkf6wallet-dev
libkf6wallet-dev/plucky 6.12.0-0ubuntu1 amd64
修正するため、削除:
$ sudo apt purge libkf5wallet-dev
:
以下のパッケージが自動でインストールされましたが、もう必要とされていません:
  kwayland-integration  libkf5configcore5        libkf5windowsystem-doc  libxext-dev
  kwayland5-data        libkf5configgui5         libkf5windowsystem5     qt5-qmake
  libegl-dev            libkf5configqml5         libqt5concurrent5t64    qt5-qmake-bin
  libglu1-mesa-dev      libkf5wallet-data        libqt5opengl5-dev       qtbase5-dev
  libkf5config-bin      libkf5wallet-doc         libqt5opengl5t64        qtbase5-dev-tools
  libkf5config-data     libkf5wallet5            libqt5printsupport5t64  qtchooser
  libkf5config-dev      libkf5waylandclient5     libqt5sql5-sqlite
  libkf5config-dev-bin  libkf5windowsystem-data  libqt5sql5t64
  libkf5config-doc      libkf5windowsystem-dev   libqt5test5t64
これを削除するには 'sudo apt autoremove' を利用してください。

REMOVING:
  libkf5wallet-dev*

-

残骸をクリア:
$ sudo apt autoremove
:
REMOVING:                                                   
  kwayland-integration  libkf5configcore5        libkf5windowsystem-doc  libxext-dev
  kwayland5-data        libkf5configgui5         libkf5windowsystem5     qt5-qmake                       
  libegl-dev            libkf5configqml5         libqt5concurrent5t64    qt5-qmake-bin                   
  libglu1-mesa-dev      libkf5wallet-data        libqt5opengl5-dev       qtbase5-dev                     
  libkf5config-bin      libkf5wallet-doc         libqt5opengl5t64        qtbase5-dev-tools               
  libkf5config-data     libkf5wallet5            libqt5printsupport5t64  qtchooser                       
  libkf5config-dev      libkf5waylandclient5     libqt5sql5-sqlite                                       
  libkf5config-dev-bin  libkf5windowsystem-data  libqt5sql5t64                                           
  libkf5config-doc      libkf5windowsystem-dev   libqt5test5t64                                          
                                                                                                         
Summary:
  Upgrading: 0, Installing: 0, Removing: 33, Not Upgrading: 0

-

新しくインストール:
$ sudo apt install libkf6wallet-dev
:
Installing:                                                 
  libkf6wallet-dev
                                                                                                         
Installing dependencies:
  gettext                  libkf6widgetsaddons-doc
  libkf6colorscheme-dev    libkf6windowsystem-dev                                                        
  libkf6colorscheme-doc    libkf6windowsystem-doc                                                        
  libkf6config-dev         libqca-qt6-dev                                                                
  libkf6config-dev-bin     libqt6waylandcompositoriviapplication6                                        
  libkf6config-doc         libqt6waylandcompositorpresentationtime6                                      
  libkf6coreaddons-dev     libqt6waylandcompositorwlshell6                                               
  libkf6coreaddons-doc     libqt6waylandcompositorxdgshell6                                              
  libkf6dbusaddons-dev     libwayland-bin                                                                
  libkf6dbusaddons-doc     libwayland-dev                                                                
  libkf6i18n-dev           qml6-module-org-kde-i18n-localedata                                           
  libkf6i18n-doc           qml6-module-org-kde-kwindowsystem                                             
  libkf6i18nlocaledata6    qml6-module-org-kde-notifications                                             
  libkf6notifications-dev  qml6-module-qtwayland-client-texturesharing                                   
  libkf6notifications-doc  qml6-module-qtwayland-compositor                                              
  libkf6wallet-doc         qt6-wayland-dev                                                               
  libkf6widgetsaddons-dev  qt6-wayland-dev-tools                                                         
                                                                                                         
提案パッケージ:
  autopoint  gettext-doc  libasprintf-dev  libgettextpo-dev  libqca2-doc  libwayland-doc

Summary:
  Upgrading: 0, Installing: 35, Removing: 0, Not Upgrading: 0

-


4). 最終的に、「lubuntu-update」のビルドに必要な依存パッケージを確認: ★

$ apt list cmake qt6-base-dev qt6-svg-dev libqt6quickwidgets6 xkb-data  libxkbcommon-dev libxkbfile-dev libqt6svgwidgets6 qt6-svg-dev qtcreator qt6-declarative-dev qt6-base-dev qt6-webchannel-dev libqt6webenginewidgets6 qt6-webengine-dev libkf6wallet-dev sqlite3 libsqlite3-dev pkg-config
cmake/plucky,now 3.31.6-1ubuntu1 amd64 [インストール済み]
cmake/plucky 3.31.6-1ubuntu1 i386
libkf6wallet-dev/plucky,now 6.12.0-0ubuntu1 amd64 [インストール済み]
libqt6quickwidgets6/plucky,now 6.8.3+dfsg-0ubuntu1 amd64 [インストール済み、自動]
libqt6svgwidgets6/plucky,now 6.8.3-0ubuntu1 amd64 [インストール済み、自動]
libqt6webenginewidgets6/plucky,now 6.8.3+dfsg-0ubuntu1 amd64 [インストール済み、自動]
libsqlite3-dev/plucky-updates,plucky-security,now 3.46.1-3ubuntu0.2 amd64 [インストール済み]
libsqlite3-dev/plucky-updates,plucky-security 3.46.1-3ubuntu0.2 i386
libxkbcommon-dev/plucky,now 1.7.0-2 amd64 [インストール済み]
libxkbcommon-dev/plucky 1.7.0-2 i386
libxkbfile-dev/plucky,now 1:1.1.0-1build4 amd64 [インストール済み]
libxkbfile-dev/plucky 1:1.1.0-1build4 i386
pkg-config/plucky,now 1.8.1-4 amd64 [インストール済み]
pkg-config/plucky 1.8.1-4 i386
qt6-base-dev/plucky,now 6.8.3+dfsg-0ubuntu2 amd64 [インストール済み]
qt6-declarative-dev/plucky,now 6.8.3+dfsg-0ubuntu1 amd64 [インストール済み]
qt6-svg-dev/plucky,now 6.8.3-0ubuntu1 amd64 [インストール済み]
qt6-webchannel-dev/plucky,now 6.8.3-0ubuntu1 amd64 [インストール済み]
qt6-webengine-dev/plucky,now 6.8.3+dfsg-0ubuntu1 amd64 [インストール済み]
qtcreator/plucky,now 15.0.1-1build3 amd64 [インストール済み]
sqlite3/plucky-updates,plucky-security,now 3.46.1-3ubuntu0.2 amd64 [インストール済み]
sqlite3/plucky-updates,plucky-security 3.46.1-3ubuntu0.2 i386
xkb-data/plucky,plucky,now 2.42-1ubuntu1 all [インストール済み、自動]

-


5). 「build」フォルダの中身を削除:

確認:

$ cd ~/Git/lubuntu-update-ubuntu-plucky/build
$ ls -1Ap
:
.qt/
CMakeCache.txt
CMakeFiles/
Makefile
cmake_install.cmake
translations.qrc
translations.qrc.depends

-

削除:

$ rm -R .qt/
$ rm -R CMakeFiles/
$ rm *

-

確認:

$ ls -A
$ 

-


6).再起動:

$ reboot

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- ----- ----- ---

22-4. 「Qt6」の場合に、インストール先に「~/local」を指定して「cmake」を実行3(成功): 

-


1). インストール先を指定しての「cmake」の実行:

移動:

$ cd ~/Git/lubuntu-update-ubuntu-plucky/build

-

実行:

$ cmake -DCMAKE_INSTALL_PREFIX=$HOME/local ..
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- The CXX compiler identification is GNU 14.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Found WrapAtomic: TRUE
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
-- Found WrapOpenGL: TRUE
-- Found XKB: /usr/lib/x86_64-linux-gnu/libxkbcommon.so (found suitable version "1.7.0", minimum required is "0.5.0")
-- Found WrapVulkanHeaders: /usr/include
-- Configuring done (0.7s)
-- Generating done (0.0s)
-- Build files have been written to: /home/usr/Git/lubuntu-update-ubuntu-plucky/build
usr@usr-PC:~/Git/lubuntu-update-ubuntu-plucky/build$ 

→正常終了:

-

確認:

$ ls -1Ap
:
.qt/
CMakeCache.txt
CMakeFiles/
Makefile
cmake_install.cmake
translations.qrc
translations.qrc.depends

-

ツリーで確認:

$ pwd
/home/usr/Git/lubuntu-update-ubuntu-plucky/build
$ tree -a
.
├── .qt
│   ├── QtDeploySupport.cmake
│   └── QtDeployTargets.cmake
├── CMakeCache.txt
├── CMakeFiles
│   ├── 3.31.6
│   │   ├── CMakeCXXCompiler.cmake
│   │   ├── CMakeDetermineCompilerABI_CXX.bin
│   │   ├── CMakeSystem.cmake
│   │   └── CompilerIdCXX
│   │       ├── CMakeCXXCompilerId.cpp
│   │       ├── a.out
│   │       └── tmp
│   ├── CMakeConfigureLog.yaml
│   ├── CMakeDirectoryInformation.cmake
│   ├── CMakeRuleHashes.txt
│   ├── CMakeScratch
│   ├── Makefile.cmake
│   ├── Makefile2
│   ├── TargetDirectories.txt
│   ├── cmake.check_cache
│   ├── lubuntu-update.dir
│   │   ├── DependInfo.cmake
│   │   ├── build.make
│   │   ├── cmake_clean.cmake
│   │   ├── compiler_depend.make
│   │   ├── compiler_depend.ts
│   │   ├── depend.make
│   │   ├── flags.make
│   │   ├── link.txt
│   │   ├── lubuntu-update_autogen
│   │   │   └── UVLADIE3JM
│   │   ├── progress.make
│   │   └── src
│   ├── lubuntu-update_autogen.dir
│   │   ├── AutoRcc_resources_UVLADIE3JM_Info.json
│   │   ├── AutogenInfo.json
│   │   ├── DependInfo.cmake                                                                             
│   │   ├── build.make                                                                                   
│   │   ├── cmake_clean.cmake                                                                            
│   │   ├── compiler_depend.make                                                                         
│   │   ├── compiler_depend.ts                                                                           
│   │   └── progress.make                                                                                
│   ├── lubuntu-update_autogen_timestamp_deps.dir                                                        
│   │   ├── DependInfo.cmake                                                                             
│   │   ├── build.make                                                                                   
│   │   ├── cmake_clean.cmake
│   │   ├── compiler_depend.make
│   │   ├── compiler_depend.ts
│   │   └── progress.make
│   ├── pkgRedirects
│   ├── progress.marks
│   └── translations.dir
│       ├── DependInfo.cmake
│       ├── build.make
│       ├── cmake_clean.cmake
│       ├── compiler_depend.make
│       ├── compiler_depend.ts
│       └── progress.make
├── Makefile
├── cmake_install.cmake
├── translations.qrc
└── translations.qrc.depends

15 directories, 49 files

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- ----- ----- ----

23. 追記: 「lubuntu-update」のプルリクエストがあることに気付きました:

-


1). 「French translation #3」:

2025-02-11

「フランス語」の「翻訳ファイル」と一緒に、下記の修正が「プルリクエスト」されていました:
- 「フランス語」の「翻訳ファイル」の追加:
- それに伴う、設定ファイルの修正:
- README.md の「Qt 5.15」から「Qt6」への修正と、
 「gen_ts.sh」スクリプト実行時の実行位置の修正:
- その他のファイルの修正:

→README.md の修正がマージされていれば、今回のビルドの手間が減らせたかも。

-

ただし、

プルリクエストにある、 「src/mainwindow.cpp」の修正は、男女の別がある(2つの翻訳がある)言語である、フランス語に対応するためのものですが、そのままマージすると、(ひとつの翻訳しかない)日本語で弊害(ゴミが出て翻訳エラー)が出ます:

-

情報は有益です(感謝)が、プルリクエストは、まとめて出すよりも、管理上、「目的別に分けて出す」のが推奨されています。

また、こちらのサイトは「サポートされていない」ので、半年経ってもマージされていません。

-

ちなみに、「.ts」の追加時は、設定ファイル(共通の行)の修正が必要です。 設定ファイルの修正は、マージされないと、次のリクエストで矛盾が生じたり、リバースされます。

混乱を避けるには、「.ts」ファイルだけを提出して、設定はコメントで補足するのがベターかも:

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- ----- ----- -----

24. 「lubuntu-update」を削除後、「cmake」を指定なしで実行したら、日本語化に成功:

-

日本語化はあきらめて、「仮想マシン」を削除するところでしたが、

削除する前に、リスクの高いことを、もうひとつ試してみました:

→そこで、日本語化に成功しました:

-

追記:

2025-08-12

「項番 25」(翻訳を修正してビルド)の実行でわかったことは、

日本語化に成功したのは、(たまたま、)ある条件が重なったからと思われます。
なので、それ以降は、日本語化に失敗しています:

→たぶん、それは「lubuntu-update」アプリの削除時に「パネル」が消えたこと:

パネルの復旧時に、埋め込まれた「.qm」が有効になった(反映された)と思われます:

-

なので、再現(日本語化を成功させるの)は難しいです:

-

-


日本語化に成功したときの手順:

-


1).「lubuntu-update」アプリを削除:

確認:
$ apt search lubuntu-update
:
lubuntu-update-notifier/plucky,now 1.1.1 amd64 [インストール済み、自動]

-

詳細を確認:
$ apt info lubuntu-update-notifier
:
Package: lubuntu-update-notifier
Version: 1.1.1
Priority: optional
Section: universe/admin
Origin: Ubuntu
Maintainer: Lubuntu Developers <lubuntu-devel@lists.ubuntu.com>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 194 kB
Depends: curl, libc6 (>= 2.34), libgcc-s1 (>= 3.3.1), libqt6core6t64 (>= 6.8.0), libqt6dbus6 (>= 6.1.2),>
Task: lubuntu-desktop-minimal, lubuntu-desktop
Download-Size: 54.8 kB
APT-Manual-Installed: no
APT-Sources: http://jp.archive.ubuntu.com/ubuntu plucky/universe amd64 Packages
Description: Lubuntu's update installer
 Lubuntu Update is an enhanced, modern update installer for the Lubuntu
 operating system. It is designed to:
   * Be easy to use,
   * Look nice, and
   * Integrate well with the Lubuntu desktop.

-

「lubuntu-update-notifier」を削除:
$ sudo apt purge lubuntu-update-notifier
:
REMOVING:                         
  lubuntu-desktop-minimal*  lubuntu-update-notifier*

-

残骸をクリア:
$ sudo apt autoremove

-


2). 再起動:

$ reboot

-


3). ログイン画面:

→パスワード入力

-


4). デスクトップ画面

→画面下のパネルが表示されません:

-

削除するパッケージを間違えたか、

依存である「lubuntu-desktop-minimal」削除、もしくは、「設定ファイル」のクリアが問題だったかも:

逆に「設定ファイル」がクリアされるので、良い影響があるかも:

-


5). Windows+Enter で「端末」を起動:

-


6). 前の項番でインストール先に使った「~/local/」フォルダを削除:

$ sudo rm -R ~/local/

-

確認:
$ ls ~/local/
ls: '/home/usr/local/' にアクセスできません: そのようなファイルやディレクトリはありません

-


7). ビルドを行う(場所である)フォルダを削除後、再作成:

$ cd ~/Git/lubuntu-update-ubuntu-plucky
$ sudo rm -R build
$ mkdir build

-


8). インストール先を指定せずに、「cmake」を実行:

$ cd ~/Git/lubuntu-update-ubuntu-plucky/build
$ cmake ..

→行の後ろに「..」があることに注意:

CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- The CXX compiler identification is GNU 14.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Found WrapAtomic: TRUE
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
-- Found WrapOpenGL: TRUE
-- Found XKB: /usr/lib/x86_64-linux-gnu/libxkbcommon.so (found suitable version "1.7.0", minimum required is "0.5.0")
-- Found WrapVulkanHeaders: /usr/include
-- Configuring done (0.7s)
-- Generating done (0.0s)
-- Build files have been written to: /home/usr/Git/lubuntu-update-ubuntu-plucky/build
usr@usr-PC:~/Git/lubuntu-update-ubuntu-plucky/build$ 

-


9). ビルド:

$ cd ~/Git/lubuntu-update-ubuntu-plucky/build
$ make -j$(nproc)

→ここでは自動で「make -j8」が実行されます:

-

[  7%] Generating lubuntu-update_en_US.qm
[  7%] Generating lubuntu-update_es_ES.qm
[ 11%] Generating lubuntu-update_ja_JP.qm
[ 15%] Generating lubuntu-update_zh_CN.qm
Updating '/home/usr/Git/lubuntu-update-ubuntu-plucky/build/lubuntu-update_en_US.qm'...
Updating '/home/usr/Git/lubuntu-update-ubuntu-plucky/build/lubuntu-update_ja_JP.qm'...
    Generated 0 translation(s) (0 finished and 0 unfinished)
    Ignored 38 untranslated source text(s)
Updating '/home/usr/Git/lubuntu-update-ubuntu-plucky/build/lubuntu-update_es_ES.qm'...
    Generated 38 translation(s) (38 finished and 0 unfinished)
    Generated 0 translation(s) (0 finished and 0 unfinished)
    Ignored 38 untranslated source text(s)
Updating '/home/usr/Git/lubuntu-update-ubuntu-plucky/build/lubuntu-update_zh_CN.qm'...
    Generated 0 translation(s) (0 finished and 0 unfinished)
    Ignored 38 untranslated source text(s)
[ 15%] Built target translations
[ 15%] Built target lubuntu-update_autogen_timestamp_deps
[ 19%] Automatic MOC and UIC for target lubuntu-update
[ 19%] Built target lubuntu-update_autogen
[ 23%] Automatic RCC for src/resources.qrc
[ 26%] Generating qrc_translations.cpp
[ 34%] Building CXX object CMakeFiles/lubuntu-update.dir/lubuntu-update_autogen/mocs_compilation.cpp.o
[ 34%] Building CXX object CMakeFiles/lubuntu-update.dir/src/aptmanager.cpp.o
[ 38%] Building CXX object CMakeFiles/lubuntu-update.dir/src/conffilewidget.cpp.o
[ 42%] Building CXX object CMakeFiles/lubuntu-update.dir/src/mainwindow.cpp.o
[ 46%] Building CXX object CMakeFiles/lubuntu-update.dir/src/orchestrator.cpp.o
[ 50%] Building CXX object CMakeFiles/lubuntu-update.dir/src/conffilehandlerdialog.cpp.o
[ 53%] Building CXX object CMakeFiles/lubuntu-update.dir/src/diffdisplaydialog.cpp.o
[ 57%] Building CXX object CMakeFiles/lubuntu-update.dir/src/main.cpp.o
[ 61%] Building CXX object CMakeFiles/lubuntu-update.dir/src/releaseupgradewindow.cpp.o
[ 65%] Building CXX object CMakeFiles/lubuntu-update.dir/src/upgradedelaywindow.cpp.o
[ 69%] Building CXX object CMakeFiles/lubuntu-update.dir/src/windowshowwatcher.cpp.o
[ 73%] Building CXX object CMakeFiles/lubuntu-update.dir/qrc_translations.cpp.o
[ 76%] Building CXX object CMakeFiles/lubuntu-update.dir/lubuntu-update_autogen/UVLADIE3JM/qrc_resources.cpp.o                                                                                                    
[ 80%] Linking CXX executable lubuntu-update
[100%] Built target lubuntu-update
usr@usr-PC:~/Git/lubuntu-update-ubuntu-plucky/build$ 

-

確認:
$ ls -l ~/Git/lubuntu-update-ubuntu-plucky/build/ | grep qm
:
-rw-rw-r-- 1 usr usr     33  8月 11 18:58 lubuntu-update_en_US.qm
-rw-rw-r-- 1 usr usr     33  8月 11 18:58 lubuntu-update_es_ES.qm
-rw-rw-r-- 1 usr usr   4863  8月 11 18:58 lubuntu-update_ja_JP.qm
-rw-rw-r-- 1 usr usr     26  8月 11 18:58 lubuntu-update_zh_CN.qm

-


10). インストール:

README で推奨されていない「sudo make install」を使いました:

$ cd ~/Git/lubuntu-update-ubuntu-plucky/build
$ sudo make install
[ 15%] Built target translations
[ 15%] Built target lubuntu-update_autogen_timestamp_deps
[ 19%] Built target lubuntu-update_autogen
[100%] Built target lubuntu-update
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/bin/lubuntu-update    ←(注目)
-- Installing: /usr/libexec/lubuntu-update-backend
-- Installing: /usr/local/share/applications/lubuntu-update.desktop
usr@usr-PC:~/Git/lubuntu-update-ubuntu-plucky/build$ 

→正常終了:

-

アプリのパスを確認:

$ which lubuntu-update
/usr/local/bin/lubuntu-update

→パスが通っています:

-

その他のパスはないか確認:

$ whereis lubuntu-update
lubuntu-update: /usr/local/bin/lubuntu-update

-


11). 再起動:

$ reboot

-


12). 日本語化されたか確認:

起動:
$ /usr/local/bin/lubuntu-update

→起動されません

「パネル」がないと、ダメみたい:

パネルの機能を介して起動されるのかも:

-


13). 削除した「lubuntu-update-notifier」パッケージをインストール:

$ sudo apt install lubuntu-update-notifier
:
Installing:                                                 
  lubuntu-update-notifier
→インストールしたとたん、画面下にパネルが表示されました。

登録していたパネルのランチャーもクリアされておらず、元通りです:

-


14). パネルのメニュー→「設定」→「Lubuntu Update」

起動:

→「Lubuntu Update」が「日本語化」されました:

-


15). 「Lubuntu Update」画面下の「更新を確認」ボタンをクリック:

パスワード入力画面が表示:

→「閉じる」ボタンをクリック:

-

主な「ボタン」の翻訳はこれで良いみたい:

-


16). 画面上のメッセージは、修正しようかな:

「0 個のパッケージが更新されます。これらの更新の 0 個はセキュリティ関連です。」

↓ 修正:

「0 個のパッケージが更新されます。更新の 0 個はセキュリティ関連です。」

-

その都度、原本に近い語順で、「日本語」として違和感がないように修正すれば、わかりやすい翻訳になります:

-

他のケースも確認してみたいところ:

-


17). コマンドで起動できるか確認:

起動:
$ /usr/local/bin/lubuntu-update

→起動されました。

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- ----- ----- ----- -

25. 追記: 「lubuntu-update」の「日本語」の翻訳の修正にトライ:(工事中)

-

「項番 24」で「lubuntu-update」の「日本語化」に成功したので、

翻訳の修正も簡単にできると思って、行ったところ、

「項番 24」で成功したのは、(たまたま、)ある条件が重なったからだったみたい:

-

→たぶん、それは「lubuntu-update」アプリの削除時にパネルが消えたこと:

なので、再現(日本語化を成功させるの)が難しいです:

-

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

ここで、

たまたまの条件が重ならないと、ビルドしてのインストールで「日本語化」できない(有効にならない、反映されない)のは、おかしなことです:

→「lubuntu-update」アプリは開発中で、まだ不安定ということかな:

ビルド時の「初期化処理」がまずいとか、アプリに漏れた処理があるとか

-

逆に、たまたま、日本語化できたのは「日本語化」の可能性が見えたので、ラッキーでした。

それは、ビルドで「埋め込み」までは成功している?と思われること。

そして、「初期化処理」がうまく行くと「日本語化」されるということ。

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- ----- ----- ----- --

25-1. 「lubuntu-update」の「日本語」の翻訳を修正:

-

まずは、翻訳の修正を行いました:

-


1). 翻訳ファイルの変換先を確認:

$ cd ~/Git/lubuntu-update-ubuntu-plucky/build
$ ls -l *ja_JP*
:
-rw-rw-r-- 1 usr usr 4863  8月 11 18:58 lubuntu-update_ja_JP.qm

→更新日時とサイズを確認:

-


2). 翻訳ファイルの修正:

$ cd ~/Git/lubuntu-update-ubuntu-plucky/src/translations/
$ featherpad lubuntu-update_ja_JP.ts
検索:
個のパッケージが更新されます。これらの更新の

-

置換:
個のパッケージが更新されます。これらの更新の

↓ すべて置換:

個のパッケージが更新されます。更新の

2個が置換されました:

-

Ctrl+S で保存:

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- ----- ----- ----- ---

25-2. 「lubuntu-update」の「日本語」の翻訳を修正してのビルド1:(失敗)

-

「翻訳ファイル」ができたので、「項番 24.」の手順でビルド:

-


1).「lubuntu-update-notifier」を削除:

$ sudo apt purge lubuntu-update-notifier
:
REMOVING:                                                   
  lubuntu-update-notifier*

-

残骸をクリア:
$ sudo apt autoremove

→重要:

-


2). 再起動:

$ reboot

-


3). ログイン画面:

→パスワード入力

-


4). デスクトップ画面

→画面下のパネルが表示されています:
日本語化に成功したときと、条件が違います:

-


5). Windows+Enter で「端末」を起動:

-


6). ビルドを行う(場所である)フォルダを削除後、再作成:

$ cd ~/Git/lubuntu-update-ubuntu-plucky
$ sudo rm -R build
$ mkdir build

-


7). インストール先を指定せずに、「cmake」を実行:

$ cd ~/Git/lubuntu-update-ubuntu-plucky/build
$ cmake ..

→行の後ろに「..」があることに注意:

CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- The CXX compiler identification is GNU 14.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Found WrapAtomic: TRUE
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
-- Found WrapOpenGL: TRUE
-- Found XKB: /usr/lib/x86_64-linux-gnu/libxkbcommon.so (found suitable version "1.7.0", minimum required is "0.5.0")
-- Found WrapVulkanHeaders: /usr/include
-- Configuring done (0.7s)
-- Generating done (0.0s)
-- Build files have been written to: /home/usr/Git/lubuntu-update-ubuntu-plucky/build
usr@usr-PC:~/Git/lubuntu-update-ubuntu-plucky/build$ 

-


8). ビルド:

$ cd ~/Git/lubuntu-update-ubuntu-plucky/build
$ make -j$(nproc)

→ここでは自動で「make -j8」が実行されます:

-

[  7%] Generating lubuntu-update_en_US.qm
[  7%] Generating lubuntu-update_es_ES.qm
[ 11%] Generating lubuntu-update_ja_JP.qm
[ 15%] Generating lubuntu-update_zh_CN.qm
Updating '/home/usr/Git/lubuntu-update-ubuntu-plucky/build/lubuntu-update_en_US.qm'...
Updating '/home/usr/Git/lubuntu-update-ubuntu-plucky/build/lubuntu-update_ja_JP.qm'...
    Generated 0 translation(s) (0 finished and 0 unfinished)
    Ignored 38 untranslated source text(s)
Updating '/home/usr/Git/lubuntu-update-ubuntu-plucky/build/lubuntu-update_es_ES.qm'...
    Generated 38 translation(s) (38 finished and 0 unfinished)
    Generated 0 translation(s) (0 finished and 0 unfinished)
    Ignored 38 untranslated source text(s)
Updating '/home/usr/Git/lubuntu-update-ubuntu-plucky/build/lubuntu-update_zh_CN.qm'...
    Generated 0 translation(s) (0 finished and 0 unfinished)
    Ignored 38 untranslated source text(s)
[ 15%] Built target translations
[ 15%] Built target lubuntu-update_autogen_timestamp_deps
[ 19%] Automatic MOC and UIC for target lubuntu-update
[ 19%] Built target lubuntu-update_autogen
[ 23%] Automatic RCC for src/resources.qrc
[ 26%] Generating qrc_translations.cpp
[ 34%] Building CXX object CMakeFiles/lubuntu-update.dir/lubuntu-update_autogen/mocs_compilation.cpp.o
[ 34%] Building CXX object CMakeFiles/lubuntu-update.dir/src/aptmanager.cpp.o
[ 38%] Building CXX object CMakeFiles/lubuntu-update.dir/src/conffilewidget.cpp.o
[ 42%] Building CXX object CMakeFiles/lubuntu-update.dir/src/mainwindow.cpp.o
[ 46%] Building CXX object CMakeFiles/lubuntu-update.dir/src/orchestrator.cpp.o
[ 50%] Building CXX object CMakeFiles/lubuntu-update.dir/src/conffilehandlerdialog.cpp.o
[ 53%] Building CXX object CMakeFiles/lubuntu-update.dir/src/diffdisplaydialog.cpp.o
[ 57%] Building CXX object CMakeFiles/lubuntu-update.dir/src/main.cpp.o
[ 61%] Building CXX object CMakeFiles/lubuntu-update.dir/src/releaseupgradewindow.cpp.o
[ 65%] Building CXX object CMakeFiles/lubuntu-update.dir/src/upgradedelaywindow.cpp.o
[ 69%] Building CXX object CMakeFiles/lubuntu-update.dir/src/windowshowwatcher.cpp.o
[ 73%] Building CXX object CMakeFiles/lubuntu-update.dir/qrc_translations.cpp.o
[ 76%] Building CXX object CMakeFiles/lubuntu-update.dir/lubuntu-update_autogen/UVLADIE3JM/qrc_resources.cpp.o                                                                                                    
[ 80%] Linking CXX executable lubuntu-update
[100%] Built target lubuntu-update
usr@usr-PC:~/Git/lubuntu-update-ubuntu-plucky/build$ 

-

確認:
$ ls -l ~/Git/lubuntu-update-ubuntu-plucky/build/ | grep qm
:
-rw-rw-r-- 1 usr usr     33  8月 12 03:25 lubuntu-update_en_US.qm
-rw-rw-r-- 1 usr usr     33  8月 12 03:25 lubuntu-update_es_ES.qm
-rw-rw-r-- 1 usr usr   4847  8月 12 03:25 lubuntu-update_ja_JP.qm
-rw-rw-r-- 1 usr usr     26  8月 12 03:25 lubuntu-update_zh_CN.qm

-


9). インストール:

README で推奨されていない「sudo make install」を使いました:

$ cd ~/Git/lubuntu-update-ubuntu-plucky/build
$ sudo make install
[ 15%] Built target translations
[ 15%] Built target lubuntu-update_autogen_timestamp_deps
[ 19%] Built target lubuntu-update_autogen
[100%] Built target lubuntu-update
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/bin/lubuntu-update
-- Installing: /usr/libexec/lubuntu-update-backend
-- Up-to-date: /usr/local/share/applications/lubuntu-update.desktop
usr@usr-PC:~/Git/lubuntu-update-ubuntu-plucky/build$ 

→正常終了:

-

確認:

$ cd ~/Git/lubuntu-update-ubuntu-plucky/build
$ ls -l *ja_JP*
:
-rw-rw-r-- 1 usr usr 4847  8月 12 20:54 lubuntu-update_ja_JP.qm

→更新日時とサイズを確認:

変わっています:

-


10). 再起動:

$ reboot

-


11). 削除した「lubuntu-update-notifier」パッケージをインストール:

$ sudo apt install lubuntu-update-notifier
:
Installing:                                                 
  lubuntu-update-notifier

-


12). パネルのメニュー→「設定」→「Lubuntu Update」

1回めだと、起動せず:

2回めで起動しました:

→日本語で表示されません:

やはり、「パネル」が消えないとダメみたい:

何かしらのやり方がありそう:

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- ----- ----- ----- ----

25-3. 「lubuntu-update」の「日本語」の翻訳を修正してのビルド2:(失敗)

-

日本語化に成功したときの、ビルド前と同じ状態にして、ビルド:

-


1).「作業前に退避した、仮想マシンの「Lubuntu 25.04のオリジナル」を立ち上げて確認:

-

確認:
$ apt list lubuntu-update-notifier lubuntu-desktop-minimal lubuntu-desktop
:
lubuntu-desktop-minimal/plucky,now 25.04.13 amd64 [インストール済み]
lubuntu-desktop/plucky 25.04.13 amd64
lubuntu-update-notifier/plucky,now 1.1.1 amd64 [インストール済み、自動]

→「lubuntu-desktop-minimal」か「lubuntu-desktop」のどちらかのインストールが必要です:

-


2).「仮想マシンの「Lubuntu 25.04」を立ち上げ

-

確認:
$ which lubuntu-update
:
/usr/local/bin/lubuntu-update

-

$ apt list lubuntu-update-notifier lubuntu-desktop-minimal lubuntu-desktop
:
lubuntu-desktop-minimal/plucky,now 25.04.13 amd64
lubuntu-desktop/plucky 25.04.13 amd64
lubuntu-update-notifier/plucky,now 1.1.1 amd64 [インストール済み]

→「lubuntu-desktop-minimal」が足りません:

-

足りないパッケージをインストール:
$ sudo apt install lubuntu-desktop-minimal
:
Installing:                                                 
  lubuntu-desktop-minimal

-

確認:
$ apt list lubuntu-update-notifier lubuntu-desktop-minimal lubuntu-desktop
:
lubuntu-desktop-minimal/plucky,now 25.04.13 amd64 [インストール済み]
lubuntu-desktop/plucky 25.04.13 amd64
lubuntu-update-notifier/plucky,now 1.1.1 amd64 [インストール済み]

→これで、成功時の状態と同じと思われます

-


3).「lubuntu-update-notifier」を削除:

$ sudo apt purge lubuntu-update-notifier
:
REMOVING:                                                   
  lubuntu-desktop-minimal*  lubuntu-update-notifier*

→成功時と同じように、2つが削除されました:

-

残骸をクリア:
$ sudo apt autoremove

→重要:

-


4). 再起動:

$ reboot

-


5). ログイン画面:

→パスワード入力

-


6). デスクトップ画面

→画面下のパネルが表示されています:
日本語化に成功したときと、条件が違います:

-


7). Windows+Enter で「端末」を起動:

$ apt list lubuntu-update-notifier lubuntu-desktop-minimal lubuntu-desktop
:
lubuntu-desktop-minimal/plucky 25.04.13 amd64
lubuntu-desktop/plucky 25.04.13 amd64
lubuntu-update-notifier/plucky 1.1.1 amd64

-


8). ビルドを行う(場所である)フォルダを削除後、再作成:

$ cd ~/Git/lubuntu-update-ubuntu-plucky
$ sudo rm -R build
$ mkdir build

-


9). インストール先を指定せずに、「cmake」を実行:

$ cd ~/Git/lubuntu-update-ubuntu-plucky/build
$ cmake ..

→行の後ろに「..」があることに注意:

CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 3.10 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value.  Or, use the <min>...<max> syntax
  to tell CMake that the project requires at least <min> but has been updated
  to work with policies introduced by <max> or earlier.


-- The CXX compiler identification is GNU 14.2.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Success
-- Found Threads: TRUE
-- Performing Test HAVE_STDATOMIC
-- Performing Test HAVE_STDATOMIC - Success
-- Found WrapAtomic: TRUE
-- Found OpenGL: /usr/lib/x86_64-linux-gnu/libOpenGL.so
-- Found WrapOpenGL: TRUE
-- Found XKB: /usr/lib/x86_64-linux-gnu/libxkbcommon.so (found suitable version "1.7.0", minimum required is "0.5.0")
-- Found WrapVulkanHeaders: /usr/include
-- Configuring done (0.7s)
-- Generating done (0.0s)
-- Build files have been written to: /home/usr/Git/lubuntu-update-ubuntu-plucky/build
usr@usr-PC:~/Git/lubuntu-update-ubuntu-plucky/build$ 

-


10). ビルド:

$ cd ~/Git/lubuntu-update-ubuntu-plucky/build
$ make -j$(nproc)

→ここでは自動で「make -j8」が実行されます:

-

[  7%] Generating lubuntu-update_en_US.qm
[  7%] Generating lubuntu-update_es_ES.qm
[ 11%] Generating lubuntu-update_ja_JP.qm
[ 15%] Generating lubuntu-update_zh_CN.qm
Updating '/home/usr/Git/lubuntu-update-ubuntu-plucky/build/lubuntu-update_en_US.qm'...
Updating '/home/usr/Git/lubuntu-update-ubuntu-plucky/build/lubuntu-update_ja_JP.qm'...
    Generated 0 translation(s) (0 finished and 0 unfinished)
    Ignored 38 untranslated source text(s)
Updating '/home/usr/Git/lubuntu-update-ubuntu-plucky/build/lubuntu-update_es_ES.qm'...
    Generated 38 translation(s) (38 finished and 0 unfinished)
    Generated 0 translation(s) (0 finished and 0 unfinished)
    Ignored 38 untranslated source text(s)
Updating '/home/usr/Git/lubuntu-update-ubuntu-plucky/build/lubuntu-update_zh_CN.qm'...
    Generated 0 translation(s) (0 finished and 0 unfinished)
    Ignored 38 untranslated source text(s)
[ 15%] Built target translations
[ 15%] Built target lubuntu-update_autogen_timestamp_deps
[ 19%] Automatic MOC and UIC for target lubuntu-update
[ 19%] Built target lubuntu-update_autogen
[ 23%] Automatic RCC for src/resources.qrc
[ 26%] Generating qrc_translations.cpp
[ 34%] Building CXX object CMakeFiles/lubuntu-update.dir/lubuntu-update_autogen/mocs_compilation.cpp.o
[ 34%] Building CXX object CMakeFiles/lubuntu-update.dir/src/aptmanager.cpp.o
[ 38%] Building CXX object CMakeFiles/lubuntu-update.dir/src/conffilewidget.cpp.o
[ 42%] Building CXX object CMakeFiles/lubuntu-update.dir/src/mainwindow.cpp.o
[ 46%] Building CXX object CMakeFiles/lubuntu-update.dir/src/orchestrator.cpp.o
[ 50%] Building CXX object CMakeFiles/lubuntu-update.dir/src/conffilehandlerdialog.cpp.o
[ 53%] Building CXX object CMakeFiles/lubuntu-update.dir/src/diffdisplaydialog.cpp.o
[ 57%] Building CXX object CMakeFiles/lubuntu-update.dir/src/main.cpp.o
[ 61%] Building CXX object CMakeFiles/lubuntu-update.dir/src/releaseupgradewindow.cpp.o
[ 65%] Building CXX object CMakeFiles/lubuntu-update.dir/src/upgradedelaywindow.cpp.o
[ 69%] Building CXX object CMakeFiles/lubuntu-update.dir/src/windowshowwatcher.cpp.o
[ 73%] Building CXX object CMakeFiles/lubuntu-update.dir/qrc_translations.cpp.o
[ 76%] Building CXX object CMakeFiles/lubuntu-update.dir/lubuntu-update_autogen/UVLADIE3JM/qrc_resources.cpp.o                                                                                                    
[ 80%] Linking CXX executable lubuntu-update
[100%] Built target lubuntu-update
usr@usr-PC:~/Git/lubuntu-update-ubuntu-plucky/build$ 

-

確認:
$ ls -l ~/Git/lubuntu-update-ubuntu-plucky/build/ | grep qm
:
-rw-rw-r-- 1 usr usr     33  8月 12 03:25 lubuntu-update_en_US.qm
-rw-rw-r-- 1 usr usr     33  8月 12 03:25 lubuntu-update_es_ES.qm
-rw-rw-r-- 1 usr usr   4847  8月 12 03:25 lubuntu-update_ja_JP.qm
-rw-rw-r-- 1 usr usr     26  8月 12 03:25 lubuntu-update_zh_CN.qm

-


11). インストール:

README で推奨されていない「sudo make install」を使いました:

$ cd ~/Git/lubuntu-update-ubuntu-plucky/build
$ sudo make install
[ 15%] Built target translations
[ 15%] Built target lubuntu-update_autogen_timestamp_deps
[ 19%] Built target lubuntu-update_autogen
[100%] Built target lubuntu-update
Install the project...
-- Install configuration: ""
-- Installing: /usr/local/bin/lubuntu-update
-- Installing: /usr/libexec/lubuntu-update-backend
-- Up-to-date: /usr/local/share/applications/lubuntu-update.desktop
usr@usr-PC:~/Git/lubuntu-update-ubuntu-plucky/build$ 

→正常終了:

-

確認:

$ cd ~/Git/lubuntu-update-ubuntu-plucky/build
$ ls -l *ja_JP*
:
-rw-rw-r-- 1 usr usr 4847  8月 12 21:34 lubuntu-update_ja_JP.qm

→更新日時とサイズを確認:

変わっています:

-


12). 再起動:

$ reboot

-


13). 削除した「lubuntu-update-notifier」パッケージをインストール:

$ sudo apt install lubuntu-update-notifier
:
Installing:                                                 
  lubuntu-update-notifier

-


14). パネルのメニュー→「設定」→「Lubuntu Update」

1回めだと、起動せず:

2回めで起動しました:

→日本語で表示されません:

やはり、「パネル」が消えないとダメみたい:

-


15). 足りないパッケージをインストール:

$ sudo apt install lubuntu-desktop-minimal
:
Installing:                                                 
  lubuntu-desktop-minimal

-

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

16). 参考: 各パッケージの情報:

-

詳細1:
$ apt info lubuntu-update-notifier
:
Package: lubuntu-update-notifier
Version: 1.1.1
Priority: optional
Section: universe/admin
Origin: Ubuntu
Maintainer: Lubuntu Developers <lubuntu-devel@lists.ubuntu.com>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 194 kB
Depends: curl, libc6 (>= 2.34), libgcc-s1 (>= 3.3.1), libqt6core6t64 (>= 6.8.0), libqt6dbus6 (>= 6.1.2),>
Task: lubuntu-desktop-minimal, lubuntu-desktop
Download-Size: 54.8 kB
APT-Manual-Installed: yes
APT-Sources: http://jp.archive.ubuntu.com/ubuntu plucky/universe amd64 Packages
Description: Lubuntu's update installer
 Lubuntu Update is an enhanced, modern update installer for the Lubuntu
 operating system. It is designed to:
   * Be easy to use,
   * Look nice, and
   * Integrate well with the Lubuntu desktop.

「Task:」は、「Task:」の項目にあるパッケージの環境のうちの、どちらかでこちらのパッケージが使われるという意味みたい:

つまり、「Task:」にあるパッケージのどちらかが一緒にインストールされているということ:

 今回は「lubuntu-desktop-minimal」がインストールされていました:

-

和訳:

説明:「Lubuntuの更新インストーラー」

Lubuntu Update は、Lubuntu オペレーティングシステムの拡張された最新のアップデート
インストーラーです。

次のように設計されています:
*使いやすく、  
*見栄えが良く、  
* Lubuntu デスクトップとよく統合します。

-

詳細2:
$ apt info lubuntu-desktop-minimal
:
Package: lubuntu-desktop-minimal
Version: 25.04.13
Priority: optional
Section: universe/metapackages
Source: lubuntu-meta                                                                                     
Origin: Ubuntu                                                                                           
Maintainer: Lubuntu Developers <lubuntu-devel@lists.ubuntu.com>                                          
Bugs: https://bugs.launchpad.net/ubuntu/+filebug                                                         
Installed-Size: 12.3 kB                                                                                  
Depends: anacron, avahi-daemon, bind9-dnsutils, bluez, bluez-cups, busybox-static, ca-certificates, cpio>
Recommends: apparmor, aptitude, arc-theme, bash-completion, bc, blueman, breeze-cursor-theme, command-no>
Task: lubuntu-desktop-minimal, lubuntu-desktop                                                           
Download-Size: 6,852 B                                                                                   
APT-Sources: http://jp.archive.ubuntu.com/ubuntu plucky/universe amd64 Packages
Description: Lubuntu Desktop Minimal environment
 This metapackage depends on all components which make up the minimal Lubuntu Desktop.
 .
 It is also used to help ensure proper upgrades, but it can be safely removed
 if you want to remove some applications installed by default.

和訳:

説明:「Lubuntuデスクトップ最小環境 」

このメタパッケージは、最小限のLubuntuデスクトップを構成するすべてのコンポーネントに依存します。
また、適切なアップグレードを確保するためにも使用されますが、デフォルトでインストールされている
アプリケーションを削除する場合は、安全に削除できます。

-

詳細3:
$ apt info lubuntu-desktop
:
Package: lubuntu-desktop
Version: 25.04.13
Priority: optional
Section: universe/metapackages
Source: lubuntu-meta
Origin: Ubuntu
Maintainer: Lubuntu Developers <lubuntu-devel@lists.ubuntu.com>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 12.3 kB
Depends: lubuntu-desktop-minimal, alsa-base, alsa-utils, anacron, avahi-daemon, bc, bluez, bluez-cups, c>
Recommends: 2048-qt, aptitude, arc-theme, blueman, breeze-cursor-theme, cups, cups-bsd, cups-client, cup>
Download-Size: 2,560 B
APT-Sources: http://jp.archive.ubuntu.com/ubuntu plucky/universe amd64 Packages
Description: Lubuntu Desktop environment
 This metapackage depends on all components which make up the Lubuntu Desktop.
 .
 It is also used to help ensure proper upgrades, but it can be safely removed
 if you want to remove some applications installed by default.

和訳:

説明:「Lubuntuデスクトップ環境」

このメタパッケージは、Lubuntuデスクトップを構成するすべてのコンポーネントに依存します。
また、適切なアップグレードを確保するためにも使用されますが、デフォルトでインストールされている
アプリケーションを削除する場合は、安全に削除できます。

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- ----- ----- ----- -----

25-4. 「lubuntu-update」アプリの実行ファイルに、「.qm」が埋め込まれたかの確認:

-

こちらを確認するのを忘れていました:

「.qm」がちゃんと埋め込まれたかは判断できませんが、何かしらが埋め込まれたかは確認できます:

-


1). 実行ファイルが置かれている場所:

$ whereis lubuntu-update
:
lubuntu-update: /usr/bin/lubuntu-update /usr/local/bin/lubuntu-update

→ 2つヒット:

-


2). 現在有効な実行ファイル:

$ which lubuntu-update
:
/usr/local/bin/lubuntu-update

-


3). 「Lubuntu」インストール直後の実行ファイル:

$ ls -l /usr/bin/lubuntu-update
:
-rwxr-xr-x 1 root root 167664 12月 25  2024 /usr/bin/lubuntu-update

→サイズと更新日時を確認:

-


4). 「Lubuntu」をビルドしてインストールした後の実行ファイル:

$ ls -l /usr/local/bin/lubuntu-update
:
-rwxr-xr-x 1 root root 393480  8月 12 21:34 /usr/local/bin/lubuntu-update

→サイズと更新日時を確認:

変わっています:

-

-


- --- - --- - --- - --- - --- - --- - --- - ----- ----- ----- ----- ----- ----- ----- ----- ------

25-5. 「lubuntu-update」の「日本語」の翻訳を修正してのビルド3:(工事中)

-

「パネル」の設定ファイル関連をさわることになりそうなので、

まずは、「パネル」の設定ファイルを退避しました:

-

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

参考: 「Lubuntu」にて、デスクトップの「パネル」が消えた場合の対応:

(今は操作しません:)

-

(1). LXQt 「パネル」の設定ファイルを移動:
$ mv ~/.config/lxqt/panel.conf ~/.config/lxqt/panel.conf-ORG

→つまり、退避しての削除なので、「削除」したのと同じです:

おかしくなったときの ORG は、使えるかわからないので、
事前に「退避」(別の名前でコピー)しておくのがベター

-

(2). 再起動:
$ reboot

→新しいパネル(初期値の設定ファイル)が自動で作成されます:

 うまく退避できていないと、今までの苦労が水の泡。再設定です。

-

-


1). LXQt 「パネル」の設定ファイルを事前に退避:

$ cp ~/.config/lxqt/panel.conf ~/.config/lxqt/panel.conf-ORG-20250812

-

確認:
$ ls -1 ~/.config/lxqt/
:
filedialog.conf
globalkeyshortcuts.conf
lxqt-config-appearance.conf
lxqt-config-file-associations.conf
lxqt-config-input.conf
lxqt-config-monitor.conf
lxqt-config.conf
lxqt-powermanagement.conf
lxqt-runner.conf
lxqt.conf
notifications.conf
panel.conf          ←(注目)
panel.conf-ORG-20250812  ←(注目)
power.conf
session.conf
windowmanagers.conf

→おもしろそうなファイルがたくさんあります:

-

「~/.config/lxqt/panel.conf」の内容:
$ cat ~/.config/lxqt/panel.conf

→ブログで「Lubuntu」の設定について紹介するとき、設定ファイルの内容を表示した方が楽に設定できるかも:

-

-


2). 何をするか、「検討中」

-

日本語化されると使いやすくなりますが、 個人的には、逐次、コマンドで「システム更新」する方なので、支障ありません:

-

なので、ちゃんとサポートされる(プルリクエストを受け付けてもらえる)バージョンまで待つのもアリかな:

-

-


まとめ

今回は、「Lubuntu 25.04」にて、システム更新の通知とシステム更新を行う「lubuntu-update」の翻訳にトライしました:

-

やったこと:

1. 翻訳言語に、「日本語」を追加:
2. 「日本語」のテンプレートファイル「.ts」を自動で生成:
3. 「日本語」のテンプレートファイル「.ts」を手動で翻訳:
4. ビルドで、「.qm」ファイルを自動で生成:
5. ビルドで、「.qm」ファイルをQt リソースに埋め込み
6. アプリが Qt リソースに埋め込まれた「.qm」ファイルを利用(できているか不明)?

→アプリのビルドは正常終了しましたが、「日本語」の翻訳はされません。失敗です:

-

次に、

「lubuntu-update」のビルドにて、「lubuntu-update-notifier」を削除して、
 インストール先を指定せずに「cmake」して、ビルドしたところ、

→日本語化に成功しました:

-

後は、色々なケースで試して、わかりやすい翻訳に修正していけば OK です:

-

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

追記:

日本語化が成功するには、一度、「パネル」が消えないとダメかも:

なかなか消えないので、「項番 25.」で試行中:

-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 

「lubuntu-update」アプリは開発中で、

(今のところ)ビルドで日本語化される確率は低いみたい:

-

たぶん、「.qm」をリソースに埋め込むよりも、ファイルを配置した方が日本語化の安定度は増すかも。 ちゃんと埋め込まれたかはわからないけど、ファイルが配置されたかはすぐに確認できます:

-

-


-

-

    目次

-

「投稿の先頭 へ」

-

-


-

「この目次 の先頭へ」

「本編の目次 に戻る」

-