Bug 407942

Summary: Kdenlive: Text entered in Add Template Title dialog does not show up in the clip
Product: [Applications] kdenlive Reporter: Andrei Rybak <rybak.a.v>
Component: Title Clips & SubtitlesAssignee: Jean-Baptiste Mardelle <jb>
Status: RESOLVED FIXED    
Severity: minor CC: berndmj, julius.kuenzel
Priority: NOR Keywords: triaged
Version First Reported In: 24.12.0   
Target Milestone: ---   
Platform: Kubuntu   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: "Add Template Title" window (after step 4)

Description Andrei Rybak 2019-05-25 14:43:09 UTC
Created attachment 120308 [details]
"Add Template Title" window (after step 4)

SUMMARY
The text you enter in the "Add Template Title" dialog in the text input does not appear in the clip created by clicking OK.

STEPS TO REPRODUCE
1. Click "Add clip ()" dropdown
2. Click "Add Template Title"
3. Select "simple.kdenlive" in the "Template" combobox
4. Type "foobar" in the input on the left under "Text" label
5. Click "OK"
6. Double click (or context menu > "Edit clip") new "Template title clip" in the "Project Bin"
7. Observe the text in the opened window

OBSERVED RESULT
After step #4, the text in the preview on the right is "Text here"
In step #7, the text inside the edit window is "Text here"

EXPECTED RESULT
After step #4, the text in the preview on the right is "foobar"
In step #7, the text inside the edit window is "foobar"

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Kubuntu 18.10 64-bit
(available in About System)
KDE Plasma Version: 5.13.5
KDE Frameworks Version: 5.50.0
Qt Version: 5.11.1
Comment 1 Julius Künzel 2021-03-24 15:38:41 UTC
The template title needs to contain "%s" as text. This will then be replaced. However I can confirm that the templates delivered with kdenlive doesn't fulfill this requirements, which is confusing should be changed in my opinion
Comment 2 Bernd 2024-12-23 22:02:51 UTC
Hi and thank you for your patience.

Can you please check whether this issue still exists in the latest version 24.12.0?

If yes, please update this report to reflect the new version.

If it works now like you expect it would, you may change the status of this report to RESOLVED - FIXED.

At any rate, this report will be closed if there is no activity for the next 30 days.
Comment 3 Andrei Rybak 2024-12-28 11:14:17 UTC
Checked steps to reproduce in Version 24.12.0. The issue still persists. No matter what I type into the "Add Template Title..." dialog, the created clips always have the text "Text here" instead.
Comment 4 Bernd 2024-12-28 16:26:16 UTC
(In reply to Andrei Rybak from comment #3)

Thanks for your new test and reply.

> Checked steps to reproduce in Version 24.12.0. The issue still persists. No
> matter what I type into the "Add Template Title..." dialog, the created
> clips always have the text "Text here" instead.
The Template Title works such that any text you type in the dialog window replaces "%s" in the template. So, if there is no "%s" in the template but "Text here", only "Text here" is displayed regardless of what you type in the dialog window. This is the case for the default templates that ship with Kdenlive. There are more meant to be used as templates to use for Title Clips to be created with the Title Editor.

In testing I found a few other inconsistencies that need fixing. I set your report to CONFIRMED and changed the version to 24.12.0
Comment 5 Bernd 2024-12-28 16:52:00 UTC
Additional issues identified during testing:

1) All default templates should have "%s" instead of "Text here"
2) The text formatting in the default templates should be plain (e.g. no outline) as any font attributes be be overlooked
3) Closing the Title Editor wipes the project monitor (nothing is displayed), only moving the playhead brings the display back (maybe the case only for title clips)
4) There should be a Clip Name field in the dialog window. All title clips created using a template have the same name, and if the name is not changed right away it may become difficult to identify them properly. Same goes for Title Clip creation.
Comment 6 Andrei Rybak 2024-12-29 13:18:38 UTC
> The Template Title works such that any text you type in the dialog window
> replaces "%s" in the template. So, if there is no "%s" in the template but
> "Text here", only "Text here" is displayed regardless of what you type in
> the dialog window. This is the case for the default templates that ship with
> Kdenlive. There are more meant to be used as templates to use for Title Clips
> to be created with the Title Editor.

Ohhh. So I guess, the real bug is that it's impossible to figure out the "%s" part from the dialog.

Can some kind of help button or message be put into the lower left corner, for example?
Or replace "Text" at the top with "Text with placeholder %s" or something?
Or a tooltip on the main text field input?
Comment 7 Bernd 2024-12-29 17:08:24 UTC
(In reply to Andrei Rybak from comment #6)
> Ohhh. So I guess, the real bug is that it's impossible to figure out the
> "%s" part from the dialog.
> 
> Can some kind of help button or message be put into the lower left corner,
> for example?
> Or replace "Text" at the top with "Text with placeholder %s" or something?
> Or a tooltip on the main text field input?
I know it's confusing but the templates are dual use: 1) To serve as a true template for creating new title clips. Technically, any title clip you create and SAVE AS can be used as a template for both use cases; 2) For a Template Title, where you can have additional text or shapes besides the %s placeholder, where the variable text is entered in the text field in the Template Title dialog window

Title Templates and Template Titles are different, albeit similar, concepts, and to increase the confusion work off the same files. Let's see how we can give users better guidance with that feature ...
Comment 8 Jean-Baptiste Mardelle 2025-05-20 08:16:01 UTC
Git commit 016366d6bb08125b5abc63e508cf8412ba773ffc by Jean-Baptiste Mardelle.
Committed on 20/05/2025 at 08:15.
Pushed by mardelle into branch 'master'.

Template clips: add informative text to make user aware of the %s requirement, use typed text as clip name, update preview live as we type

M  +12   -1    src/dialogs/clipcreationdialog.cpp
M  +31   -2    src/dialogs/titletemplatedialog.cpp
M  +2    -0    src/dialogs/titletemplatedialog.h
M  +14   -1    src/doc/kthumb.cpp
M  +3    -1    src/doc/kthumb.h
M  +3    -0    src/titler/titlewidget.cpp
M  +35   -12   src/ui/templateclip_ui.ui

https://invent.kde.org/multimedia/kdenlive/-/commit/016366d6bb08125b5abc63e508cf8412ba773ffc
Comment 9 Andrei Rybak 2025-06-04 03:06:10 UTC
Thank you!