- This topic has 21 replies, 6 voices, and was last updated Dec 5-6:08 pm by BobC.
-
AuthorPosts
-
October 26, 2022 at 10:12 am #91540Member
augusteBurin
Hello, I’ve learned that the “Recent files” entry in the antiX menu is kind of “unofficial”. I like it, but I would love if it could handle our french specialities like é,è,à and so on. (eg. the letter “é” displays “%C3%A9”)
would love thatHave a nice day, always
aBOctober 26, 2022 at 12:24 pm #91545Member
marcelocripe
::Hello augusteBurin.
Please join our team of volunteer antiX translators ( antiX and antiX Application Program Translation Platforms).
Currently, Wallon translates to “fr” and “fr_BE”, but this is a lot of work for one person to do alone. The ideal is to have at least one translator for each language and preferably one who is native to the respective language.The Recent Files in the antiX menu program is on Transifex Contribs, this is not the official place for antiX translations, but it has the translation that was made by Wallon. Once you decide to become a volunteer antiX translator, you can take care of the “fr” language translations.
– – – – –
Olá augusteBurin.
Por favor, venha fazer parte da nossa equipe de tradutores voluntários do antiX (antiX and antiX Application Program Translation Platforms).
Atualmente, o Wallon traduz para “fr” e “fr_BE”, mas isso é muito trabalho para uma pessoa fazer sozinho. O ideal é termos, no mínimo, um tradutor para cada idioma e de preferência que seja nativo do respectivo idioma.O programa Recent Files in the antiX menu questão está no Transifex Contribs, este não é o local oficial das traduções do antiX, mas possui a tradução que foi feita pelo Wallon. Uma vez que você decida se tornar um tradutor voluntários do antiX, você poderá cuidar das traduções do idioma “fr”.
October 26, 2022 at 1:09 pm #91548MemberPPC
::Hi Marcelo – I realize that the scripts used here need to be localized (I just finished my translation in transifex) but the problem aB mentioned is that accentend characters appear in the list as a combination of % and several other characters- there is a work around that- I used it in my much simpler “Recent Files” menu, used in FT10 (that displays correctly all special characters)…
In case BobC can addapt my script… here it is:
#!/bin/bash #Parse the file that stores the recent used files, send output to recent0.txt awk -F"file://|\" " '/file:\/\// {print $2}' ~/.local/share/recently-used.xbel > /tmp/recent0.txt #reverse contents order, so last file comes first, and so on... tac /tmp/recent0.txt > /tmp/recent00.txt head -18 /tmp/recent00.txt > /tmp/recent.txt #process list of files, so they can be launched from jgmenu with the default launchers while read p; do urldecode() { local url_encoded="${1//+/ }" printf '%b' "${url_encoded//%/\\x}" } decoded=$(urldecode $p) echo $decoded , xdg-open \"$decoded\" #echo "$p" , xdg-open \"$decoded\" done </tmp/recent.txt > /tmp/recent-jgmenu.txt #Display menu with recent files cat /tmp/recent-jgmenu.txtOctober 26, 2022 at 3:03 pm #91550MemberPPC
::Good news! I’m feeling a bit better, so I hacked Bob’s original script to enable it to display accented characters…
It was just a matter of finding out where to change the script, to enable it to use the “urldecode” subroutine that I found somewhere on-line (I did not create it, I just adapted it, after searching high and low all over the web for some routine that did just that, for my FT10 recent files menu… It never even came to me, that it could be adapated to Icewm’s default menu… Please try it out anc check if the addapted script works for you…
P.
Edit: I PM’ed BobC, sending him my proposed changes- I’ve been testing the script and it works fine…
Here is how to test it:
1-Download my script and unzip it
2. Menu > Control Centre > Icewm… > “Menu” tab
3- Find the line that says something like (The “Recent Files” text depends on your locale, the importante part is the script, on the end of the line, that ends with .sh):menuprog “Recent Files” /usr/share/icons/papirus-antix/48×48/places/folder-blue-recent.png /usr/local/bin/icewm-menu-recentfiles.sh
and replace “/usr/local/bin/icewm-menu-recentfiles.sh” with the full path for my script (ex, if you saced it to your home folder: ~/icewm-menu-recentfiles.sh)
4- Save the change
5- test the “Recent Files” menu and see if it correctly displays files with accented characters and allows you to correctly open them…
6- buy me a coffee (optional step 🙂 )P.
- This reply was modified 6 months, 1 week ago by PPC.
- This reply was modified 6 months, 1 week ago by PPC.
Attachments:
October 26, 2022 at 5:31 pm #91572Member
Wallon
::Dear augusteBurin,
I am surprised because I do not have this problem.
When you type the command “locale” in a terminal, what do you get?Best regards,
Wallon
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Cher augusteBurin,Je suis surpris car je n’ai pas ce problème.
Quand tu tapes la commande “locale” dans un terminal, tu as quoi ?Cordialement
WallonOctober 26, 2022 at 5:44 pm #91575MemberPPC
::I am surprised because I do not have this problem.
Are you sure? I helped Bob develop the script used to display recent files in icewm and it never displayed correctly any special characters… I just tested it in antiX 19 and 21 (I never tested it in antiX 21 until now).
How to replicate this “bug”: launch geany and save a text file called “coração.txt”, for example (or anything with accent). Close it and, just to make sure it pops up in recent files, open it from your file manager. Go to menu > Recent Files > does the file name display correctly? If it does then maybe pt-pt systems and AB’s systens work differently from yours, Wallon, I would like to know how…
Edit: just in case you are used to FT10’s menu, the Recent Files there always displayed correctly, unlike in IceWM’s Recent Files menu…
P.
- This reply was modified 6 months, 1 week ago by PPC.
October 26, 2022 at 6:44 pm #91583Member
Wallon
::Dear PPC,
Test done with IceWM and LibreOffice.
augusteBurin is right. The characters éèàù… are translated with cigles %C3%A9%B5….I also noticed that if I did a test with creating a *.txt file (with letters éèùàïô) with the zzzFM, the file does not appear in the list of recent documents. Apparently, it does not find all the documents created or used.
Sorry, I thought this was related to the installation of the UTF-8…. language and it is not.
Best regards,
WallonOctober 27, 2022 at 7:54 am #91595MemberRantanplan
::Hello PPC,
TU for the script.
I followed your how-to, but i have commented the original line in the icewm menu and added a line with the path to new …recentfiles.sh.
I tested it and it works…very fine 🙂 : bravo !If i’m a final user, i would like to understand what makes it possible to display accented characters in your script.
Is it the “sed” command ?I just noticed a very tiny error :
the true name of the file is “pépé_mémé_à_noël.txt”.
In the recent files, it is displayed without “_” between “pépé” and “mémé”.
However, it opens normally.Many thanks again.
Best to you
- This reply was modified 6 months, 1 week ago by Rantanplan.
- This reply was modified 6 months, 1 week ago by Rantanplan.
Attachments:
Vive antiX !
Vive le Groland !October 27, 2022 at 9:58 am #91607MemberPPC
::i would like to understand what makes it possible to display accented characters in your script.
Is it the “sed” command ?Nope. I searched for a very long time on-line (while creating FT10 Transformation Package’s Recent Files Menu)
and I found the small “urldecode” routine that converts accented file names the way linux usually processes to the regular accented characters we can read- I do not take credit for creating it, and I do not even fully understant how it works…
The routine basicaly is used just like a command, inside the script and it converts the text included in a variable (the file name) to human readable format.
From the screenshot I assume that the problem with the first “_” (please notice that it shows up under the “m”) is due to the way icewm processes menu entries – probably is assumes that the first letter following a “_” should be underlined…You can test the way the routine works running the following text script in the terminal and noticing that it correctly prints the text (keeping the “_”):
urldecode() { local url_encoded="${1//+/ }" printf '%b' "${url_encoded//%/\\x}" } text="pépé_mémé_à_noël.txt" decodedtext=$(urldecode $text) echo $decodedtext- This reply was modified 6 months, 1 week ago by PPC.
- This reply was modified 6 months, 1 week ago by PPC.
October 27, 2022 at 10:46 am #91615MemberRantanplan
::@PPC
Well and very well 🙂
I tested and it’s ok.
Thank you for the explanation.
I’ll fall asleep smarter tonight. 🙂
Friendly.
Vive antiX !
Vive le Groland !October 31, 2022 at 9:55 pm #91961Member
augusteBurin
::Hello
That’ a lot better, just one problem with the “‘” (apostrophe) like in “Jeanne d’Arc” it shows: “'”
So it’s almost perfect,Thanks a lot
aBNovember 1, 2022 at 7:16 am #91975ModeratorBobC
::All, I’m sorry if my code didn’t work right for other character sets. I don’t have any way to test that, and nobody had said it wasn’t working right.
PPC, feel free to take care of the fix with anticapitalista. I was just trying to provide a dynamic desktop folder view that I could use on the old Pentium II without needing to load a filemanager or more memory intensive desktop because the machine only has 768 mb of memory, and runs at 300 mhz.
November 3, 2022 at 4:09 pm #92174MemberPPC
::@BobC – thanks! I was thinking about doing that- I’m just taking my time because Marcelo reported the new script did not work for him (and I’ve yet to talk to him about that I’m betting he had some kind of problem following my “how to”).
@all- I used the magic of the sed command and now I expect that all underscores ( “_” ) will be correctly shown… So the file “pépé_mémé_à_noël.txt” should display just fine in the recent files menu (including the first underscore)
I’m a bit reluctant to applying sed to apostrophes, but I’ll give a try…
My current code is attached (with the fix for underscores)
Edit: I created a text file in geany and saved it as “Jeanne d’Arc.txt” – it came up perfectly fine in the recent files list of my current script… So I can’t replicate the problem with apostrophes (hence I can’t try to solve it).
Please, users that are testing my script, try to create a file with that name, using geany and please check if it comes up fine or not in the Recent files menu…Edit2: since, at least in my system (I’m running antiX 19, I’ve not tested in antiX 21/22), the script works without any bugs that I can detect, and it greatly increases the usability of the recent files menu for non english speakers, I’ll wait for about a week or so, for people to test this version of the script and then contact anticapitalista, so see if he is interested in including my small tweaks to Bob’s script in the version that is available in the repos…
P.
- This reply was modified 6 months ago by PPC.
- This reply was modified 6 months ago by PPC.
Attachments:
November 3, 2022 at 4:49 pm #92190MemberRantanplan
::Hi @PPC,
thank you, very sincerly.
I tried your new script and stressed it out a bit.
The result below.An underscore persists under the first letter of “où_pépé-fête-noël.à-part.txt”, but for me it isn’t a problem and I think it’s normal (The letter “O” is linked, is a shortcut to open the file, isn’t it ?).
For the “jeanne d’Arc.txt” file, the apostrophe is not processed.
Good evening.
Friendly.
- This reply was modified 6 months ago by Rantanplan.
Attachments:
Vive antiX !
Vive le Groland !November 3, 2022 at 5:01 pm #92196MemberPPC
::An underscore persists under the first letter of “où_pépé-fête-noël.à-part.txt”, but for me it isn’t a problem.
🙂 If you pay attention to your screenshot, every single menu entry has the first letter in “underscore”- it’s how icewm’s menu works- since I noticed that icewm tried to switch the lighted character to the one after the first underscore, I tricked, using the sed command to insert an underscore on the start of every menu entry – not very tidy, for efficient.
I can see the problem with the apostrophe, just like you reported- but since that does not come up in my pt_PT antiX, I’m betting it’s something related to the character format that the fr locale uses… as far as I can figure out, even if I use a sed command to replace “d'” with an apostrophe, the problem could remain… For now I have no fix for it.
Even so, I’ll try to tweak the script that way and attach it here… Wait a bit…P.
-
AuthorPosts
- You must be logged in to reply to this topic.

