• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Fixed Invert button not work in Russian

Jeremy

Well-known member
#2
I can confirm that this si the case in v1.1. Translated to anything other than "Invert" fails here. I'm bored so I'm looking into a fix. I'm assuming its in the JS... Can't be sure on that tho.

I know why this isn't working, and I can have a hot-fix posted. The class picks up the translated phrase so instead of "ColorInvert" you got "ColorFrançais" (I used Français cause I knew that).

In debug, update your "style_properties_list_color_palette" template to:
HTML:
<xen:require css="style_property_list_color_palette.css" />

<div class="styleProperty" id="colorPalette">

	<fieldset class="colorPalette">
		<div class="pickers"><!-- space for cool stuff here! --></div>
		<div class="colorAdjust">
			<input type="text" name="hue" min="0" max="360" step="1" value="180" class="HueShift OptOut" data-target="#colorPalette" title="{xen:phrase adjust_color_hues_for_entire_palette}" />
			<input type="button" class="button Color{xen:phrase invert}" value="{xen:phrase invert}" data-target="#colorPalette" title="{xen:phrase invert_colors_for_entire_palette}" />
			<xen:if is="{$group.customized}"><label class="revertAll">{xen:phrase revert_all} <input type="checkbox" class="CheckAll" data-target="#colorPalette" /></label></xen:if>
		</div>
	</fieldset>
	
	<xen:foreach loop="$scalars" key="$scalarGroupId" value="$scalarGroup" i="$i">
		<fieldset class="colorPalette" id="cp{$i}">
			<ul class="pickers">
				<xen:foreach loop="$scalarGroup.properties" value="$property">
					<li>
						<xen:textbox name="properties[{$property.property_definition_id}]" value="{$property.propertyValueScalar}"
							inputclass="ColorPicker DisablePalette" id="ctrl_{$property.property_definition_id}" />
						<label for="ctrl_{$property.property_definition_id}" class="propertyTitle">{$property.title}</label>
						<div class="meta">
							<span class="muted">@{$property.property_name}</span>
							<xen:include template="style_property_unit_extra" />
						</div>
					</li>
				</xen:foreach>
			</ul>
			<div class="colorAdjust">
				<input type="text" name="hue" min="0" max="360" step="1" value="180" class="HueShift OptOut" data-target="#cp{$i}" title="{xen:phrase adjust_color_hues_for_this_group}" />
				<input type="button" class="button ColorInvert" value="{xen:phrase invert}" data-target="#cp{$i}" title="{xen:phrase invert_colors_in_this_group}" />
				<xen:if is="{$scalarGroup.customized}"><label class="revertAll">{xen:phrase revert_all} <input type="checkbox" class="CheckAll" data-target="#cp{$i}" /></label></xen:if>
			</div>
		</fieldset>
	</xen:foreach>

</div>
(change: seven lines from the bottom, Color{xen:phrase invert} to ColorInvert, since it always binds on that.)