×

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

Bi-monthly release with minor bug fixes and improvements

Analyse/Analyze - how is it spelled?

  • Posts: 326
  • Thank you received: 50
I noticed in KStars 3.6.0 and now in 3.6.2 that in the Analyse [sic] Tab, the Input: drop-down list option Read from File offers to look for Files of type: Analyse Log (*.analyse) whereas the files are created with the file type .analyze and hence are not found. Searching for All Files (*) finds them!
The following user(s) said Thank You: Hy Murveit
1 year 2 months ago #90905

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

  • Posts: 326
  • Thank you received: 50
Here’s an explanation of the differences in spelling found after a quick Google search:
1 year 2 months ago #90931
Attachments:

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

  • Posts: 1224
  • Thank you received: 566
Thanks for the report. I've never noticed this issue, and, in fact, couldn't reproduce it now (but, see below, I'm in the US).
I looked at the source code and the line that sets up the file picker clearly says "analyze"

invent.kde.org/education/kstars/-/blob/m...yze/analyze.cpp#L498


Perhaps it is that i18n (internationalization) getting a little too smart and translating "analyze" to "analyse" for you? Do you live in the UK?

Honestly I'm not sure how to fix that, but luckily you can just work around it with "All Files".
Happy to take suggestions.

Hy
The following user(s) said Thank You: Avocette
1 year 2 months ago #90938
Attachments:

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

  • Posts: 326
  • Thank you received: 50
Many thanks for picking this up and trying to figure out what’s happening! If I understand you well, this may be an internationalisation/internationalization issue. I live in French-speaking Switzerland, but being British, I have set the default language as English (GB) in my RPi OS. I’m shocked to think that there may be an error introduced effectively due to a kind of an overruling spell-checker. It would be horrific if such an error could creep into some critical software such as in an ESA/NASA collaborative project! I’ll follow up and see if setting the RPi default language to English (US) sorts out my issue.
1 year 2 months ago #90939

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

  • Posts: 1224
  • Thank you received: 566
I suppose I should break up that line, pulling the file extension out of the i18n call.
Obviously the code that starts writing the file doesn't (and shouldn't) call i18n on the file extension.

Let me know how the test with English US goes,
Hy
The following user(s) said Thank You: Jasem Mutlaq, Avocette
1 year 2 months ago #90940

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

  • Posts: 326
  • Thank you received: 50
So the quick answer is Yes - changing the one setting in Raspberry Pi Configuration Locale in the Localisation Tab from GB to US made the files visible again filtered by the drop-down list choice as .analyze files.

I did also go through the l-o-n-g process of building a new image of KStars 3.6.3 /Indi 2.0.0 on a Raspberry Pi OS 64-bit with every choice set to give a full US profile. And of course the file types were all labelled .analyze, so like in your case, the Read from File option showed all existing files. I then experimented with modifying this new build, by changing the Locale choices in Raspberry Pi Configuration Localisation Tab to GB rather than US, and sure enough the file drop-down filter was spelled .analyse and so no files were visible until I selected All files.

There are three other elements under the RPi OS Localisation Tab: 'Timezone', 'Keyboard' and 'WiFi Country' and I tried changing them variously to European and US options without noticeably affecting the Read from File choices.
So I now have two available workarounds!

During the build process, I did notice that there were two lines with the word 'analyze' and one with the word 'analyse' so this spelling difference may benefit from being sorted once and for all!




Anyway, glad that we got to the bottom of this, and thanks, Hy, for developing the Analyze module, which I find very useful!
Ed
Last edit: 1 year 2 months ago by Avocette. Reason: Clarity
1 year 2 months ago #90957
Attachments:

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

  • Posts: 1224
  • Thank you received: 566
Ed,

The files sep/analyse.c (and it's compiled version sep/analyse.c.o) are not part of the analyze tab. They are old C files in the SEP (star detection) library that have been copied over to StellarSolver and really should be removed from Ekos. In any case, they are not relevant. The only one that's relevant to the Analyze tab is analyze.cpp. So, I don't see any issues there.

I put together a merge request to fix the issue in future releases. See invent.kde.org/education/kstars/-/merge_requests/845
It is already submitted.

If you want to apply this change to some previous code you're compiling, it's easy.
In the file kstars/ekos/analyze/analyze.cpp around line 498
invent.kde.org/education/kstars/-/blob/m...yze/analyze.cpp#L498
replace the 2-line statement that starts with "QUrl inputURL = " with the following:

QUrl inputURL = QFileDialog::getOpenFileUrl(this, i18nc("@title:window", "Select input file"), dirPath,
QString("Analyze %1 (*.analyze);;%2").arg(i18n("Log")).arg(i18n("All Files (*)")));

All I did was pull the words "analyze" outside of the i18n() internationalization call.

Hy

PS Note to self: Never use real words as file extensions again!
The following user(s) said Thank You: Avocette
1 year 2 months ago #90974

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

Time to create page: 0.239 seconds