MultiRename v1.8

Filemanagers, partitioning tools, etc.
Message
Author
User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

MultiRename v1.6

#21 Post by L18L »

MochiMoppel wrote:As for the show stopper: Sorry for that, the show can go on.
Here we go.

Used recent momanager to create a 1st translation.

2 small changes made by me in the script:
my multirename line 777 wrote: <text><label>"'$(gettext "\-digit sequence")'"</label></text>
... and it can be translated
and
my multirename line 840 wrote: <button use-stock="true" label="gtk-quit">
<action>exit:exit</action>
</button>
... and 1 (one) message less to translate.
Attachments
multirename-1.6.png
(12.26 KiB) Downloaded 368 times
multirename.mo.gz
German translation
save to
/usr/share/locale/de/LC_MESSAGES/multirename.mo
(remove fake .gz)
(2.76 KiB) Downloaded 321 times

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#22 Post by SFR »

@Mochi: Well, I think uselessness/redundancy is only when you use 'cat single-file | ...' rather than 'cat single-file' alone.
Your version seems to work fine with f#cked up filenames, too, however I'll keep mine, since it appears to look more explicit and consistent, at least to me. Hope you don't mind. ;)

@L18L:

Code: Select all

<text><label>"'$(gettext "\-digit sequence")'"</label></text>
Hmm, I thought that $(gettext -- "-digit sequence") will be ok...
Anyway, fixed in v1.7.

Code: Select all

<button use-stock="true" label="gtk-quit">
This does not translate if I use 'LANGUAGE=de multirename', so I have left it as it was, for consistency.

And thanks for the translation - added to NLS pet.

Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

gtk-quit

#23 Post by L18L »

SFR wrote:

Code: Select all

<button use-stock="true" label="gtk-quit">
This does not translate if I use 'LANGUAGE=de multirename', so I have left it as it was, for consistency.
consistency is good.

Code: Select all

LANGUAGE=pl multirename
works OK (Zakoncz) here, fd64_nls.sfs loaded.

Code: Select all

# cd /usr/share/locale/pl/LC_MESSAGES
# msgunfmt gtk20.mo  | grep -A1 Quit
msgid "_Quit"
msgstr "Za_kończ"
#
Strange thing this. :roll:

---
EDIT
It is not strange. Without gtk20.mo no translation.
Last edited by L18L on Mon 26 Oct 2015, 16:48, edited 1 time in total.

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

gettext

#24 Post by L18L »

SFR wrote:I thought that $(gettext -- "-digit sequence") will be ok...
Anyway, fixed in v1.7.
Thinking is good, trying is better. 8)
If you had been using momanager you would have this strange pair:

msgid: "--"
msgstr ""

If you don't like to use momanager here is how to check it directly in console:

Code: Select all

# LANGUAGE=pl xgettext -L Shell -o - -

 $(gettext -- "-digit sequence")
# SOME DESCRIPTIVE TITLE.
# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER
# This file is distributed under the same license as the PACKAGE package.
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
#
#, fuzzy
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2015-10-26 10:54+0100\n"
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
"Language-Team: LANGUAGE <LL@li.org>\n"
"Language: \n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=CHARSET\n"
"Content-Transfer-Encoding: 8bit\n"

#: standardowe wejście:2
msgid "--"
msgstr ""
# 
Note,
LANGUAGE=pl is used here just to produce "standardowe wejście".
Parameters see: xgettext --help.

if gettext uses 2 parameters, the 1st is textdomain.
But xgettext always takes the first parameter of gettext.

Thanks to your -digit sequence I found that - has to be escaped by backslash. Result:

Code: Select all

#: standardowe wejście:1
msgid "\\-digit sequence"
msgstr ""
# 
---
Note about momanager for this 1st translation test,
if using momanager and changing something in the script then simply rm /tmp/monager/script.pot and it will be re-created from the actual changed script.

---
EDIT another note,
If you don't like to check just open a thread in Localization Project where some checkers always lurk around.

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#25 Post by SFR »

L18L wrote:works OK (Zakoncz) here, fd64_nls.sfs loaded.
Oh, I don't have NLS loaded (my OSes have always been English-only with exception of keyboard layout.
L18L wrote:

Code: Select all

msgstr "Za_kończ" 
Perhaps 'k' is the standard shortcut for this label in Polish..?
L18L wrote:If you had been using momanager
I used to, but I don't do translations anymore - I never liked it and I suck at it. :lol:
Although I still do i18n my apps, so thanks for explaining the momanager/(x)gettext stuff.

Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
ASRI éducation
Posts: 3197
Joined: Sat 09 May 2009, 12:10
Location: France
Contact:

#26 Post by ASRI éducation »

I just found this interesting discussion. I subscribe...
Projet ASRI éducation => [url=http://asri-education.org/]Association[/url] | [url=http://forum.asri-education.org/]Forum[/url] | [url=http://dl01.asri-education.org/]Dépôt[/url] | [url=http://kids.asri-education.org/]Espace kids[/url]

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

shortcuts

#27 Post by L18L »

SFR wrote:

Code: Select all

msgstr "Za_kończ" 
Perhaps 'k' is the standard shortcut for this label in Polish..?
Yes it is, translator has to choose the shortcuts.

And thank you for continuing to do i18n in your highest appreciated apps!

jplt

#28 Post by jplt »

Hi all,

i have thousands of files in a directory and i want the rename them all,
by selecting (and not go inside it !) the directory i imagine a select box that tell me :
rename this directory or rename all the files in this directory ?

I don't if is it possible ?



By the way thanks SFR for all your scripts .

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#29 Post by SFR »

jplt wrote:i have thousands of files in a directory and i want the rename them all,
by selecting (and not go inside it !) the directory i imagine a select box that tell me :
rename this directory or rename all the files in this directory ?

I don't if is it possible ?
Hi Jplt

It is possible in general, but MR wasn't designed to act like this.
IMO recursive renaming would be too messy and too many things could go wrong.

If you need to rename all files in a directory, just go into that dir and select all of them (Ctrl+A).

Btw, processing 1000+ files may take a while, so if you're impatient, perhaps an alternative written in compiled language (like gFnRename) would do better in such cases...
L18L wrote:And thank you for continuing to do i18n in your highest appreciated apps!
jplt wrote:By the way thanks SFR for all your scripts .
You're welcome! :)

Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#30 Post by SFR »

Version 1.8 uploaded.
See 2nd post for changelog.

Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#31 Post by disciple »

Hi, I hadn't seen this before. Is it possible to enable "refresh" of the preview?
i.e. configure some options, click preview, change the options, click preview again, and the preview updates...

Thanks.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
SFR
Posts: 1800
Joined: Wed 26 Oct 2011, 21:52

#32 Post by SFR »

Only when you re-select manually the items you're working on.
Refreshing the list erases the previous selection and AFAIK there's no way in Gtkdialog to programatically select some subset (or all) of items in tree.

Greetings!
[color=red][size=75][O]bdurate [R]ules [D]estroy [E]nthusiastic [R]ebels => [C]reative [H]umans [A]lways [O]pen [S]ource[/size][/color]
[b][color=green]Omnia mea mecum porto.[/color][/b]

Puppyt
Posts: 907
Joined: Fri 09 May 2008, 23:37
Location: Moorooka, Queensland
Contact:

#33 Post by Puppyt »

sfr you are a lifesaver!
I'm using this in a version of TahrPup32 (6.05), after having *again* having problems with JWM's "bulk rename file" options - which I can never seem to get working as intended.
My task is to rename music files with an extra '0' to give 3-digit filename headers, so that my car audio header will play the album tracks in correct sequence. Apparently, the 2-digit filename headers that Asunder currently provides isn't sufficient to get around the problem. Will test and report back - otherwise it might be an ID3tag issue that prevents playback in the correct sequence (which is absolutely maddening),
Cheers!

UPDATE: Stunning success! A 7-hour Boxing Day road trip with the kids will be much more bearable now :)
Search engines for Puppy
[url]http://puppylinux.us/psearch.html[/url]; [url=https://cse.google.com/cse?cx=015995643981050743583%3Aabvzbibgzxo&q=#gsc.tab=0]Google Custom Search[/url]; [url]http://wellminded.net63.net/[/url] others TBA...

Post Reply