diff --git a/rtdata/languages/default b/rtdata/languages/default
index 4129bf314..ee08b0ba7 100644
--- a/rtdata/languages/default
+++ b/rtdata/languages/default
@@ -2106,7 +2106,6 @@ QUEUE_DESTPREVIEW_TOOLTIP;Destination path for the first selected image appears
QUEUE_FORMAT_TITLE;File Format
QUEUE_LOCATION_FOLDER;Save to folder
QUEUE_LOCATION_TEMPLATE;Use template
-REMOVE_ME_OLD___QUEUE_LOCATION_TEMPLATE_TOOLTIP;Specify the output location based on the source photo's location, rank, trash status or position in the queue.\n\n%dN, %d-N, %pN, %p-N, %PN and %P-N (N = 1..9) will be replaced by elements of the image file's directory path (not including the file name):\n%dN = Nth directory from the end of the path\n%d-N = Nth directory from the start of the path\n%pN = all directories up to the Nth from the end of the path\n%p-N = the first N directories in the path\n%PN = the last N directories in the path\n%P-N = all directories from the Nth to the end of the path\n%f = base filename (no extension)\nFor Windows paths, %d-1 is the drive letter and colon, and %d-2 is the base directory on that drive.\n\nUsing the following pathname as an example:\n/home/tom/photos/2010-10-31/photo1.raw\nthe meaning of the formatting strings follows:\n%d4 = %d-1 = home\n%d3 = %d-2 = tom\n%d2 = %d-3 = photos\n%d1 = %d-4 = 2010-10-31\n%p1 = %p-4 = /home/tom/photos/2010-10-31/\n%p2 = %p-3 = /home/tom/photos/\n%p3 = %p-2 = /home/tom/\n%p4 = %p-1 = /home/\n%P1 = %P-4 = 2010-10-31/\n%P2 = %P-3 = photos/2010-10-31/\n%P3 = %P-2 = tom/photos/2010-10-31/\n%P4 = %P-1 = /home/tom/photos/2010-10-31/\n%f = photo1\n\n%r will be replaced by the photo's rank. If the photo is unranked, '0' is used. If the photo is in the trash, 'x' is used.\n\n%s1, ..., %s9 will be replaced by the photo's initial position in the queue at the time the queue is started. The number specifies the padding, e.g. %s3 results in '001'.\n\nIf you want to save the output image alongside the source image, write:\n%p1/%f\n\nIf you want to save the output image in a folder named 'converted' located in the source photo's folder, write:\n%p1/converted/%f\n\nIf you want to save the output image in\n'/home/tom/photos/converted/2010-10-31', write:\n%p-3/converted/%P-4/%f
QUEUE_LOCATION_TEMPLATE_TOOLTIP;Specify the output location based on characteristics such as the source photo's location, rank, trash status or position in the queue.\n\nThe output template field value can include specifiers beginning with %, which are replaced by those characteristics in the actual destination path.\n\nPress the ? button for full instructions.
QUEUE_LOCATION_TEMPLATE_HELP_TITLE;Creating an output template
QUEUE_LOCATION_TEMPLATE_HELP_INTRO;The output template field allows you to to dynamically customize the destination folder and filename. When you include certain specifiers, which begin with %, they are replaced by the program when each file is being saved.\n\nThe sections below describe each type of specifier.
@@ -2118,7 +2117,12 @@ QUEUE_LOCATION_TEMPLATE_HELP_PATHS_EXAMPLE_LINUX;/home/tom/photos/2010-10-31/pho
QUEUE_LOCATION_TEMPLATE_HELP_PATHS_EXAMPLE_WINDOWS;C:\users\tom\photos\2010-10-31\photo1.raw
QUEUE_LOCATION_TEMPLATE_HELP_PATHS_BODY_2;The meanings of the formatting strings are:
QUEUE_LOCATION_TEMPLATE_HELP_RESULT_MISMATCH;ERROR: 2nd result is different:
-
+QUEUE_LOCATION_TEMPLATE_HELP_RANK_TITLE;Rank
+QUEUE_LOCATION_TEMPLATE_HELP_RANK_BODY;%r will be replaced by the photo's rank. If the photo is unranked, '0' is used. If the photo is in the trash, 'x' is used.
+QUEUE_LOCATION_TEMPLATE_HELP_SEQUENCE_TITLE;Position/sequence in queue
+QUEUE_LOCATION_TEMPLATE_HELP_SEQUENCE_BODY;%s1, ..., %s9 will be replaced by the photo's initial position in the queue at the time the queue is started. The number specifies the padding, e.g. %s3 results in '001'.
+QUEUE_LOCATION_TEMPLATE_HELP_EXAMPLES_TITLE;Common examples
+QUEUE_LOCATION_TEMPLATE_HELP_EXAMPLES_BODY;If you want to save the output image alongside the source image, write:\n%p1/%f\n\nIf you want to save the output image in a folder named 'converted' located in the source photo's folder, write:\n%p1/converted/%f\n\nIf you want to save the output image in\n'/home/tom/photos/converted/2010-10-31', write:\n%p-3/converted/%P-4/%f
QUEUE_LOCATION_TITLE;Output Location
QUEUE_STARTSTOP_TOOLTIP;Start or stop processing the images in the queue.\n\nShortcut: Ctrl+s
SAMPLEFORMAT_0;Unknown data format
diff --git a/rtgui/batchqueuepanel.cc b/rtgui/batchqueuepanel.cc
index f4e97689b..a0587d442 100644
--- a/rtgui/batchqueuepanel.cc
+++ b/rtgui/batchqueuepanel.cc
@@ -356,15 +356,16 @@ void BatchQueuePanel::templateHelpButtonToggled()
void BatchQueuePanel::populateTemplateHelpBuffer(Glib::RefPtr buffer)
{
auto pos = buffer->begin();
- auto insertHeading1 = [&pos, buffer](const Glib::ustring& text) {
- pos = buffer->insert_markup(pos, Glib::ustring::format("", text, "\n"));
- };
- auto insertHeading2 = [&pos, buffer](const Glib::ustring& text) {
+ auto insertTopicHeading = [&pos, buffer](const Glib::ustring& text) {
pos = buffer->insert_markup(pos, Glib::ustring::format("\n\n", text, "\n"));
};
- insertHeading1(M("QUEUE_LOCATION_TEMPLATE_HELP_TITLE"));
+ auto insertTopicBody = [&pos, buffer](const Glib::ustring& text) {
+ pos = buffer->insert_markup(pos, Glib::ustring::format("\n", text, "\n"));
+ };
+ auto mainTitle = M("QUEUE_LOCATION_TEMPLATE_HELP_TITLE");
+ pos = buffer->insert_markup(pos, Glib::ustring::format("", mainTitle, "\n"));
pos = buffer->insert_markup(pos, M("QUEUE_LOCATION_TEMPLATE_HELP_INTRO"));
- insertHeading2(M("QUEUE_LOCATION_TEMPLATE_HELP_PATHS_TITLE"));
+ insertTopicHeading(M("QUEUE_LOCATION_TEMPLATE_HELP_PATHS_TITLE"));
pos = buffer->insert_markup(pos, M("QUEUE_LOCATION_TEMPLATE_HELP_PATHS_INTRO"));
pos = buffer->insert(pos, "\n");
#ifdef _WIN32
@@ -409,8 +410,6 @@ void BatchQueuePanel::populateTemplateHelpBuffer(Glib::RefPtr b
buildpos = buildBuffer->insert(buildpos, startMonospace);
for (int n=0; n%d4 = %d-1 = home
auto path1 = Glib::ustring::format("%",letter,offset1+n*mult1);
auto path2 = Glib::ustring::format("%",letter,offset2+n*mult2);
options.savePathTemplate = path1;
@@ -420,6 +419,8 @@ void BatchQueuePanel::populateTemplateHelpBuffer(Glib::RefPtr b
buildpos = buildBuffer->insert (buildpos, Glib::ustring::format("\n ", path1, " = ", path2, " = ", result1, ""));
if (result1 != result2)
{
+ // If this error appears, it indicates a coding error in either BatchQueue::calcAutoFileNameBase
+ // or BatchQueuePanel::populateTemplateHelpBuffer.
buildpos = buildBuffer->insert(buildpos, Glib::ustring::format(" ", M("QUEUE_LOCATION_TEMPLATE_HELP_RESULT_MISMATCH"), " ", result2));
}
}
@@ -434,11 +435,16 @@ void BatchQueuePanel::populateTemplateHelpBuffer(Glib::RefPtr b
// %P1 = %P-4 = 2010-10-31/
insertPathExamples('P', 1, 1, -pathElementCount, 1);
+ insertTopicHeading(M("QUEUE_LOCATION_TEMPLATE_HELP_RANK_TITLE"));
+ pos = buffer->insert_markup(pos, M("QUEUE_LOCATION_TEMPLATE_HELP_RANK_BODY"));
+
+ insertTopicHeading(M("QUEUE_LOCATION_TEMPLATE_HELP_SEQUENCE_TITLE"));
+ pos = buffer->insert_markup(pos, M("QUEUE_LOCATION_TEMPLATE_HELP_SEQUENCE_BODY"));
+
+ insertTopicHeading(M("QUEUE_LOCATION_TEMPLATE_HELP_EXAMPLES_TITLE"));
+ pos = buffer->insert_markup(pos, M("QUEUE_LOCATION_TEMPLATE_HELP_EXAMPLES_BODY"));
/* FIXME: Still to do here:
- Insert sections for the remaining specifiers:
- %r = rank
- %s# = queue position, with padding
- Insert an examples section
+ Insert section for time/date specifiers
*/
options = savedOptions;
}