I'm using Dijit.dialog widget. I've set the "lang" attibute's value to en-US. But still when I hover on the Cancel button I see the tool tip in some other language. Can someone please help to change the default language of the widget? Thanks in advance.
Thanks,
Steve
Try setting djConfig.locale when you load dojo.js. Otherwise, the browser's default will be used to load localizations (navigator.language) Make sure to use all lowercase and treat it as a quoted string (e.g. "en-us") The 'lang' attribute on Widgets is only for edge cases where you want to specify something other than the declared locale for the page, and even then you'd need to specify it at load time using djConfig.extraLocale.
HTH
Related
I'm developing a Vue app using UI Kit which implies using various custom attributes like uk-grid, uk-icon, uk-navbar etc (in Vue single file components' templates). For each one, IntelliJ gives me a warning like
Warning:(7, 52) Attribute uk-icon is not allowed here
How can I tell IntelliJ not to do this? Googling the warning haven't brought any sane results which makes me think there's no ready-to-use package for this (for this particular UI Kit), so the question is: how to make Idea not to warn about a custom list of attributes? But I'll be glad to be wrong and if there is a better solution, please let me know.
Update: like lena has suggested, pressing alt+enter suggests helpful options, including adding attribute to the list of custom attributes. However, wildcard suggestion didn't work for me: the below screenshot illustrates settings that make v-localize attrbute be recognized, but uk--prefixed attribute are still highlighted with warning:
You can add uk-* attributes to Custom HTML tag attributes list in HTML | Unknown HTML tag attribute inspection; the easiest way to do this is using Add to custom HTML attributes quickfix available on Alt+Enter:
Note that IDEA recognizes Vuikit components and directives out of the box - did you consider using it instead of pure UIKit?
I need to provide a language option (en/de) in just one of my components, currently for the captions in my app we use i18n and it works great, but this it content not captions. I am also aware of the option of lazy loading languages, the thing is that here I want the captions to remain in English but the content to have the option to be in German. What might be a good approach to achieving this?
To be clear, the German content will only be loaded later and it is only relevant for a single component and not the entire app, it also does not apply to captions.
With vue-i18n, you can provide a locale explicitly in your component in german:
https://kazupon.github.io/vue-i18n/api/#vue-injected-methods
$t('yourKey', 'de')
It also works with the directive: https://kazupon.github.io/vue-i18n/api/#v-t
You can load both languages, set english as the default language, and explicitly use german in your special component.
When I use this in Textarea (template String)
`data-dojo-props='intermediateChanges:true' data-dojo-attach-event='onChange : update'`
The onChange event - fires on blur event to Textarea. My requirement is detect the changes once it was made from textarea.
Thanks a lot!
I am not sure how you are creating the Textarea. But, one thing you could try is to make sure the parseOnLoad is set to true or you are using parser.parse();
UPDATE: If the templateString is what you have mentioned in the comments then it wont work. Textarea is a HTML node and not a dijit, so the property intermediateChanges does not apply to it.
Also, dojoAttachPoint and dojoAttachEvent should be data-dojo-attach-point and data-dojo-attach-event. I am surprised that its working for you, may be due to backward compatibility.
The events are case-sensitive for dijits, so you need to make sure it matchs in the template string.
I have working JsBin with TextArea dijit used within a templateString.
https://jsbin.com/cuyigizuji/edit?html,console,output
Hope this was helpful.
I am using mark t hughes view picklist custom control from open NTF.
Link to control on openNTF
I have set all the paramenters etc, however when I load the page with the control on, I get my custom error page, and the error below in my error logging database
Error on dialog1button5999 null property/event:
1:
Script interpreter error, line=1, col=35: [ReferenceError]
'compositeData' not found
compositeData.picklistButtonClass + " domfindmebutton5999"
This is trying to set the styleClass of a button in the custom control here:
<xp:this.styleClass><![CDATA[#{javascript:compositeData.picklistButtonClass + " domfindmebutton5999"}]]></xp:this.styleClass>
I am also definately passing this parameter is with the default code:
picklistButtonClass="button2"
I also followed the video Here to the letter, and still get exactly the same issue.
Has anyone come across this before or have any pointers as to where I should be looking to resolve it? Im not sure where to start, as all the instructions and video's explain how to complete the custom properties of the control, but there is never any mention of a need to actually modify any code WITHIN the custom control....
Thanks
(as a side note, I am using bootstrap, should this make any difference)
This is because of the theme definition. Look at the Mark Leusink's blog entry here. http://linqed.eu/2014/08/28/xpages-gotcha-modeconcat-in-your-themes/
If a theme has a "concat" definition, that will be computed at a very early phase. To concat values, it needs to compute the initial value. However, in some cases (e.g. Repeat, Custom control, etc.), the initial value cannot be computed at the page-load section.
For such cases, you can override the theme with a special themeId, as Mark suggested.
Safari/Chrome Developer Tools indicate that a CSS rule is overridden by something else by striking it through, as shown in the image.
Sometimes I find myself in a situation where I can not figure out from the CSS files what causes this rule to be ignored. But surely Safari itself must know as it strikes it through.
Is there a way to know what overrides such a rule?
Look at the one which isn't striked out, higher up on the list.
Alternatively, view the computed styles. They will be the definitive applied styles.
When you inspect an element, you can show the 'box'. Just bottom of that, you have a 'filter' which should show you every properties being applied to your element.
If you click on a property, it will give you the file and the line number.
Developer Tools will list all rules for an element. Just read through all the CSS rules that apply, and check for a non-struck-through one with the same name.
Go to Elements >> Computed and you'll get the stylesheet that defines the rule you're looking for.
Go to the Computed tab of Chrome Developer tools. Find wanted property and expand details.