NotepadNext icon indicating copy to clipboard operation
NotepadNext copied to clipboard

Application translation files are not included in AppImage

Open dail8859 opened this issue 3 years ago • 5 comments
trafficstars

As discovered in #152 it looks like the AppImage has never included the Notepad Next translation files. Seems to be fine for Windows.

cc @eson57

dail8859 avatar Jun 22 '22 12:06 dail8859

I think the translation files need listed as an install target here:

https://github.com/dail8859/NotepadNext/blob/356eebee6054f4a0999b2f7e5d9ee6523ff53544/src/NotepadNext/NotepadNext.pro#L204-L219

dail8859 avatar Jun 23 '22 18:06 dail8859

For reference, QOwnNotes installs the translation files with the INSTALLS target:

https://github.com/pbek/QOwnNotes/blob/9b2df420d4c7060651f730172b2a0efca8eeb833/src/QOwnNotes.pro#L378-L408

dail8859 avatar Jun 27 '22 13:06 dail8859

@eson57

I think I finally have a fix for this. You can download a zip of the AppImage to try here.

dail8859 avatar Jul 04 '22 22:07 dail8859

Sorry, I cant make translations work.

$ ./NotepadNext-x86_64.AppImage qt5ct: using qt5ct plugin

(AppImageLauncher:17567): GLib-CRITICAL : 08:03:45.767: g_file_test: assertion 'filename != NULL' failed [ 0.161] I: ============================= [ 0.161] I: NotepadNext v0.5.2 [ 0.161] I: Build Date/Time: Jul 4 2022 21:47:45 [ 0.161] I: Qt: 5.15.2 [ 0.161] I: OS: Linux Mint 20.3 [ 0.161] I: Locale: sv_SE [ 0.161] I: CPU: x86_64 [ 0.161] I: File Path: /tmp/.mount_NotepalRgLRM/usr/bin/NotepadNext [ 0.161] I: Arguments: /tmp/.mount_NotepalRgLRM/AppRun.wrapped [ 0.161] I: ============================= [ 0.161] I: bool NotepadNextApplication::init() [ 0.161] I: void NotepadNextApplication::processArguments(const QStringList&) [ 0.162] I: void NotepadNextApplication::loadTranslation(QLocale) [ 0.162] I: sv_SE translation not found for Notepad Next [ 0.162] I: sv_SE translation not found for Qt components [ 0.162] I: LuaState::LuaState() [ 0.180] I: MainWindow::MainWindow(NotepadNextApplication) [ 0.216] I: setupUi Completed [ 0.256] I: void MainWindow::setupLanguageMenu() [ 0.262] I: void MainWindow::restoreSettings() [ 0.262] I: void NotepadNextApplication::openFilesFromCommandLine() [ 0.262] I: void MainWindow::newFile() [ 0.262] I: void EditorManager::setupEditor(ScintillaNext) [ 0.264] I: void MainWindow::addEditor(ScintillaNext*) [ 0.264] I: void MainWindow::detectLanguage(ScintillaNext*) [ 0.264] I: void MainWindow::setLanguage(ScintillaNext*, const QString&) [ 0.264] I: Language Name: Text [ 0.264] I: void DockedEditor::addEditor(ScintillaNext*) [ 0.313] I: void MainWindow::activateEditor(ScintillaNext*) [ 0.313] I: bool MainWindow::checkFileForModification(ScintillaNext*) [ 0.313] I: void MainWindow::updateGui(ScintillaNext*) [ 0.313] I: void MainWindow::updateFileStatusBasedUi(ScintillaNext*) [ 0.313] I: void MainWindow::updateSaveStatusBasedUi(ScintillaNext*) [ 0.313] I: void MainWindow::updateEOLBasedUi(ScintillaNext*) [ 0.313] I: void MainWindow::updateLanguageBasedUi(ScintillaNext*)

eson57 avatar Jul 05 '22 06:07 eson57

@eson57 Ok, thanks for trying it out. I'll see if I can find the root cause.

dail8859 avatar Jul 05 '22 12:07 dail8859

I believe this is a problem with make install.

https://github.com/dail8859/NotepadNext/blob/efedc0adb408af52bc4edb72a3d254684843f807/.github/workflows/build.yml#L52-L61

According to my test, make install will ignore all files except the binary program. That means, even if you installed the translation files to the compile output directory via make, they still won't be copied to the AppDir directory.

If there is no other way to fix make install, I think we should manually copy the i18n after make install.

NichtsHsu avatar Nov 08 '22 09:11 NichtsHsu

Personally I am not overly familiar with application development on Linux. I was just going off some other Qt projects in an attempt to fix this in #161, but it is quite possible you are correct that deploying the AppImage would need those files copied explicitly.

dail8859 avatar Nov 08 '22 12:11 dail8859