Page 2 of 2

MultiRename v1.6

Posted: Sun 25 Oct 2015, 16:11
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.

Posted: Sun 25 Oct 2015, 20:10
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!

gtk-quit

Posted: Mon 26 Oct 2015, 10:28
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.

gettext

Posted: Mon 26 Oct 2015, 10:30
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.

Posted: Mon 26 Oct 2015, 11:36
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!

Posted: Mon 26 Oct 2015, 12:33
by ASRI éducation
I just found this interesting discussion. I subscribe...

shortcuts

Posted: Mon 26 Oct 2015, 16:58
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!

Posted: Tue 27 Oct 2015, 08:43
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 .

Posted: Tue 27 Oct 2015, 14:10
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!

Posted: Mon 13 Jun 2016, 14:19
by SFR
Version 1.8 uploaded.
See 2nd post for changelog.

Greetings!

Posted: Tue 24 Jan 2017, 04:54
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.

Posted: Fri 27 Jan 2017, 23:14
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!

Posted: Sat 23 Dec 2017, 23:31
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 :)