Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 17 Nov 2017, 16:01
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects » Localization Project
Rox and desktop files: how to display Comment[fr]
Moderators: Lobster, MU, raffy
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 6 [86 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6 Next
Author Message
musher0


Joined: 04 Jan 2009
Posts: 11131
Location: Gatineau (Qc), Canada

PostPosted: Fri 03 Apr 2015, 13:38    Post subject:  

Hello again, mikeb.

On the French thread about this subject I posted some ROX-Filer related
URL's that you may find useful as starting points.
http://murga-linux.com/puppy/viewtopic.php?p=838075&sort=lastpost#838075

BFN.

musher0

_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 11071

PostPosted: Fri 03 Apr 2015, 13:43    Post subject:  

ok getting onto the same page now and I am terrible at drawing...

Well Lucid quick test gave no locale error after I changed to fr_FR starting Rox ...it did without.... but the same lack of french comment of desktop.files.
To confuse that picture that is with my glib build but I doubt thats relevant..more likely Rox simply not handling desktop files that well as IIRC it was not included until later anyway.
Plus if gllb was the problem then my build would have cured it.

A play with the sources should confirm that.


mike

edit thanks for the link

edit 2...tested in slax...same behavoiur..and if memory serves rox was from debian not puppy.
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 11131
Location: Gatineau (Qc), Canada

PostPosted: Fri 03 Apr 2015, 15:31    Post subject:  

Hi, mike.

Many thanks for testing.

Well, that narrows it down quite a bit, doesn't it?

if your own compile of glibc didn't cure it and we have the same behavior
in slax with a Debian-flavoured ROX, then the problem is in the "innards"
of ROX-Filer, not its packaging, not the libC basis.

What does IIRC mean, please? Thanks.

BFN.

musher0

_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 11131
Location: Gatineau (Qc), Canada

PostPosted: Fri 03 Apr 2015, 15:31    Post subject:  

Double. Sorry.
_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
SFR


Joined: 26 Oct 2011
Posts: 1640

PostPosted: Fri 03 Apr 2015, 15:44    Post subject:  

musher0 wrote:
What does IIRC mean, please? Thanks.

If I recall correctly it means if I recall correctly. Wink

And Find'N'Run rulez, he he!
Greetings!

_________________
[O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource
Omnia mea mecum porto.
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 11071

PostPosted: Fri 03 Apr 2015, 16:00    Post subject:  

you have recalled correctly.... its a long phrase and i needed the loo Very Happy

mike
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 11071

PostPosted: Fri 03 Apr 2015, 16:45    Post subject:  

Ok odd build system...even thats a rox like bunny... Smile
stopped at
checking that shared-mime-info (version >= 0.14) is installed... no
configure: error: Package is not installed
but sources told me what I needed to know...

Ok the line is in filer.c

comment = get_value_from_desktop_file(full_path,
"Desktop Entry", "Comment", &error);

The called function does as it says.....

Basically it looks for the pattern 'Comment' to get the tooltip... no LANG anywhere near that section ......
It does not seem too hard to add it ie the pattern modified by the LANG value.
If other language support is there in general so the resultant tooltips will show I see little problem adding this... though I am not a great C coder others may breeze through it.

mike
Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 11131
Location: Gatineau (Qc), Canada

PostPosted: Fri 03 Apr 2015, 18:47    Post subject:  

mikeb wrote:
Ok odd build system...even thats a rox like bunny... Smile
stopped at
checking that shared-mime-info (version >= 0.14) is installed... no
configure: error: Package is not installed
but sources told me what I needed to know...

Ok the line is in filer.c

comment = get_value_from_desktop_file(full_path,
"Desktop Entry", "Comment", &error);

The called function does as it says.....

Basically it looks for the pattern 'Comment' to get the tooltip... no LANG anywhere near that section ......
It does not seem too hard to add it ie the pattern modified by the LANG value.
If other language support is there in general so the resultant tooltips will show I see little problem adding this... though I am not a great C coder others may breeze through it.

mike


Wow. Great! Many thanks! You have a falcon's eye!

Now can we expand that filer.c line so it does the same as the bash-awk script here:
http://murga-linux.com/puppy/viewtopic.php?p=837979&sort=lastpost#837979

Can it be done? Many thanks in advance.

BFN.

musher0

_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 11071

PostPosted: Sat 04 Apr 2015, 02:56    Post subject:  

Quote:
Wow. Great! Many thanks! You have a falcon's eye!

actually it took a few seconds using searchmonkey...wonder why I recommend that tool??!! Very Happy

Can it be done...don't see why not if I can get the weird thing to build...

Again c is not my strong point..its an ancient primative language thats still in common use... why is beyond me but ours is not to reason why...bit like why people love DOS.

I would assume one needs to find how to read a system variablie ie $LANG and then insert that info into the function with the [] added....a conditional statement to have just 'Comment' as a fallback. With pointers, ints, chars and all that crap thrown in there..

Escaping from this world for 2 days so watch this space unless someone else has an urge (puppy seems to lack c programmers I noticed hence all those slow scripts)

mike

ps yes lots of sarcasm in there Very Happy
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 11071

PostPosted: Sat 04 Apr 2015, 05:38    Post subject:  

ok got shared mime info....
thanks to debian for changing their debs to xz which needs dpkg-deb that want glibc 2.11 even though the resultant debs do not...

ok it builds but fails as the configure says gtk 2.12 is ok but it actually needs 2.14 for the gui builder (the replacement for glade)... ah the joys of linux.

Ok time ran out so will revisit later..

MIke
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 11071

PostPosted: Mon 06 Apr 2015, 06:32    Post subject:  

Back from the land of mud and floating.....

Ok one to test.

Works here to show comment according to LANG and use the fallback plain Comment if nothing found.

Also removed running as user message but there may be other puppyisms that I am unaware of...plus had trouble getting Rox menus etc in a language...might have been my compiling steup problem though...INTL IS enabled.

Built and tried on lucid..older pups probably lack library versions needed for ROX 2.11 .

Just attached the main binary for a drop in test.

mike
Back to top
View user's profile Send private message 
L18L

Joined: 19 Jun 2010
Posts: 3431
Location: www.eussenheim.de/

PostPosted: Mon 06 Apr 2015, 09:32    Post subject: Rox and desktop files: how to display translated Comment  

mikeb wrote:
Ok one to test.

Works here to show comment according to LANG and use the fallback plain Comment if nothing found.

Tested.
Works as intended by you.

Fallback should have 2 steps.

example for French language:
If not found in Comment[fr_FR] use Comment[fr]
If not found in Comment[fr] use Comment.

Thanks.
rox_Comments_translated.png
 Description   
 Filesize   28.88 KB
 Viewed   139 Time(s)

rox_Comments_translated.png

Back to top
View user's profile Send private message 
musher0


Joined: 04 Jan 2009
Posts: 11131
Location: Gatineau (Qc), Canada

PostPosted: Mon 06 Apr 2015, 13:23    Post subject:  

Hi, mikeb.

Thanks much for your time. However, drop-in replacement fails here. No
difference. EN comments only, same as before.

Or maybe I have to re-initialize ROX somehow? I went to black initial
console and came back to wm, but was that enough? Do I have to do
anything in addition to that?

BFN.

musher0

_________________
musher0
~~~~~~~~~~
"Logical entities must not be multiplied beyond necessity." | |
« Il ne faut pas multiplier les entités logiques sans nécessité. » (Ockham)
Back to top
View user's profile Send private message 
LazY Puppy


Joined: 21 Nov 2014
Posts: 2007
Location: Germany

PostPosted: Mon 06 Apr 2015, 13:35    Post subject:  

Quote:
drop-in replacement fails here. No
difference. EN comments only, same as before.

Me too.

_________________
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) Laughing

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! Wink
Back to top
View user's profile Send private message 
mikeb


Joined: 23 Nov 2006
Posts: 11071

PostPosted: Mon 06 Apr 2015, 13:44    Post subject:  

Did you replace the existing rox-filer in /usr/local/apps/ROX-filer .

If its truly stopped including pinboard and LANG is set which it sounds like then hmmmm

well the previous post about extra fallbacks may apply. IE your specific LANG variable may not be in there ... utf8 should be ok but fr_FR will not find fr as it stands... editing a desktop file would be the test...echo $LANG and ensure there is an entry to match.
Every desktop file seems to have a different set of languages or none.

I used rox's own extraction and handling of LANG

I can fix but in any other language its a 20 second job but in the obtuse bitch known as c it will be half an hour for multiple rebuilds and tests. Very Happy

mike
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 6 [86 Posts]   Goto page: Previous 1, 2, 3, 4, 5, 6 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Puppy Projects » Localization Project
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0523s ][ Queries: 12 (0.0049s) ][ GZIP on ]