Author view customisation -oxy-placeholder-content and i18n

Having trouble installing <oXygen/>? Got a bug to report? Post it all here.
bwbohl
Posts: 17

Author view customisation -oxy-placeholder-content and i18n

Tue Nov 14, 2017 12:22 pm

I configured a custom framework and customised the corresponding author view to show the data as a table. As I have some element that initially get inserted empty (rendered as empty cells) and the schema requires child elements that will be inserted by the users I would like to visualise this error more prominently in the table.

My idea was to use the

Code: Select all

-oxy-placeholder-content:"SOMEVALUE";


This works fine as long as I do not want to pull a i18n value from the translation.xml. When I use internatinalization, e.g.:

Code: Select all

-oxy-placeholder-content:"${i18n(bazga.kb.error.empty.placeholder)} ";


the resulting output is "${i18n(bazga.kb.error.empty.placeholder)}" though. Restarting oXygen XML Editor didn't bring up any change. I'm using oXygen 18.1 on macOS Sierra 10.12.6

Any ideas what's going wrong?
=====
oXygen XML Editor v18.1
macOS Sierra 10.12.6
Radu
Posts: 5131

Re: Author view customisation -oxy-placeholder-content and i18n

Tue Nov 14, 2017 3:15 pm

Hi,

Indeed the i18n editor variable did not properly expand in the -oxy-placeholder-content in Oxygen 18.1 and older.
We made it work in Oxygen 19.0 (and newer). So you should consider upgrading the used Oxygen installation.
Or you can try to avoid using the placeholder-content property and instead do something like:

Code: Select all

p:empty{
    content:"${i18n(subscript_description)}";
    background-color:gray;
}


because the i18n editor variable was properly expanded in static "content" properties even in 18.1.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
bwbohl
Posts: 17

Re: Author view customisation -oxy-placeholder-content and i18n

Tue Nov 21, 2017 12:34 pm

This is just a great alternative that I wasn't aware of!
Always great to learn some standard CSS on the fly!!

Please excuse my late reply, other issues of my custom framework had me more distracted ;-)
=====
oXygen XML Editor v18.1
macOS Sierra 10.12.6

Return to “Common Problems”

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest