Customizing the .tasklabel text in a shared project

Post here questions and problems related to editing and publishing DITA content.
Bas10R
Posts: 34
Joined: Thu May 25, 2023 4:08 pm

Customizing the .tasklabel text in a shared project

Post by Bas10R »

Hey,

For context, I'm using the Startup DITA project to create a "template" project that would act as a starting point for other projects.
In the WebHelp Responsive transformation scenario, I'm using args.gen.task.lbl=YES to automatically generate labels for elements such as <prereq> or <context>. I assume the labels are pulled from a default location in the Oxygen XML installation folder:
Oxygen XML Editor 25/frameworks/dita/DITA-OT3.x/plugins/org.dita.base/xsl/common/strings-en-us.xml

I have to 1) change some of the text on those labels and 2) include the file that controls the labels' text in the shared project instead of the Oxygen XML installation folder. Is there a best practice as to how to do this?

I was planning to include the DITA OT folder (along with the strings-en-us.xml file) in my project's ${pd}/custom-settings/frameworks/dita folder, and then adjust the custom location of the DITA OT used in Options > Preferences > DITA.

I can't "cheat" here by modifying the project's CSS with the below snippet, because the label must be readable text (accessibility concerns for screen readers).

Code: Select all

div.section.prereq.p::before {
    content: "<changed label text>";
}
Kind regards,
Konrad
Costin
Posts: 833
Joined: Mon Dec 05, 2011 6:04 pm

Re: Customizing the .tasklabel text in a shared project

Post by Costin »

Hi Konrad,

Please note that it is recommended to avoid at all costs editing the files from the DITA OT directly, because this could trigger issues which could be very hard to debug at a later time.

Instead, Oxygen comes with support for localizing the output interface and there is a dedicated section in the Oxygen XML WebHelp User-Guide which describes how to translate existing strings or create a new translation from scratch, so that should help you start localizing the labels as you want.

Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
Bas10R
Posts: 34
Joined: Thu May 25, 2023 4:08 pm

Re: Customizing the .tasklabel text in a shared project

Post by Bas10R »

Hey Costin,

Thanks for your reply. So for my scenario — changing the text of automatically generated labels in tasks — the solutions described in the article you linked are the recommended approach?

Kind regards,
Konrad
Costin
Posts: 833
Joined: Mon Dec 05, 2011 6:04 pm

Re: Customizing the .tasklabel text in a shared project

Post by Costin »

Hi Konrad,
Yes, it should be the recommended approach.
We created that section in our user-guide, even to come to the help of the users that need to change the translations or create their own ones.

Kind Regards,
Costin
Costin Sandoi
oXygen XML Editor and Author Support
Post Reply