Skip to content

Commit

Permalink
update translations
Browse files Browse the repository at this point in the history
  • Loading branch information
Nico-Duduf committed Jul 14, 2024
1 parent c47f6ca commit 53f38fb
Show file tree
Hide file tree
Showing 14 changed files with 113 additions and 44 deletions.
94 changes: 68 additions & 26 deletions dist/libs/DuAEF.jsxinc
Original file line number Diff line number Diff line change
Expand Up @@ -2501,6 +2501,40 @@ DuColor.prototype.lighter = function( ratio )
]);
}

/**
* Creates a new color lighter or darker depending on the difference between the APP_TEXT_COLOR (foreground color) and the APP_BACKGROUND_COLOR
* @param {int} [ratio=200] Pull ratio
* @returns {DuColor} The new color
*/
DuColor.prototype.pull = function( ratio )
{
ratio = def(ratio,200);

if (DuColor.isUsingDarkMode()) {
return this.lighter(ratio);
}
else {
return this.darker(ratio);
}
}

/**
* Creates a new color lighter or darker depending on the difference between the APP_TEXT_COLOR (foreground color) and the APP_BACKGROUND_COLOR
* @param {int} [ratio=200] Push ratio
* @returns {DuColor} The new color
*/
DuColor.prototype.push = function( ratio )
{
ratio = def(ratio,200);

if (DuColor.isUsingDarkMode()) {
return this.darker(ratio);
}
else {
return this.lighter(ratio);
}
}

/**
* Compares two colors
* @param {Boolean} [ignoreAlpha=false] Set to true to consider colors to be equal if they differ only by their alpha.
Expand Down Expand Up @@ -2658,6 +2692,13 @@ DuColor.init = function()
}
DuESF.initMethods.push(DuColor.init);

/**
* Checks if the app is in "dark mode", i.e. the APP_TEXT_COLOR is lighter than the APP_BACKGROUND_COLOR
*/
DuColor.isUsingDarkMode = function() {
return DuColor.Color.APP_TEXT_COLOR.floatHSL()[2] > DuColor.Color.APP_BACKGROUND_COLOR.floatHSL()[2]
}

/**
* Creates a new DuColor from a hex code/array
* @static
Expand Down Expand Up @@ -10234,7 +10275,7 @@ DuScriptUI.titleBar = function( container, title, closeButton, pinButton ) {
titleBar.spacing = 0;
titleBar.orientation = 'row';
titleBar.alignment = ['fill','top'];
DuScriptUI.setBackgroundColor( titleBar, DuColor.Color.APP_BACKGROUND_COLOR.lighter() );
DuScriptUI.setBackgroundColor( titleBar, DuColor.Color.APP_BACKGROUND_COLOR.pull(130) );

titleBar.onClose = function() {};
titleBar.onPin = function(p) {};
Expand Down Expand Up @@ -10471,7 +10512,7 @@ DuScriptUI.popUp = function( title, alignment, modal )
borderless: true
} );

DuScriptUI.setBackgroundColor(popup, DuColor.Color.APP_BACKGROUND_COLOR.darker());
DuScriptUI.setBackgroundColor(popup, DuColor.Color.APP_BACKGROUND_COLOR.push());

popup.margins = 0;
popup.spacing = 0;
Expand Down Expand Up @@ -11771,7 +11812,7 @@ DuScriptUI.button = function(container, text, image, helpTip, addOptionsPanel, o
DuScriptUI.setTextColor(duButton.label, DuColor.Color.APP_HIGHLIGHT_COLOR);
}
else {
DuScriptUI.setBackgroundColor(mainGroup, DuColor.Color.APP_HIGHLIGHT_COLOR.darker());
DuScriptUI.setBackgroundColor(mainGroup, DuColor.Color.APP_HIGHLIGHT_COLOR.push());
}

DuScriptUI.highlightedControls.push(duButton);
Expand Down Expand Up @@ -11915,7 +11956,7 @@ DuScriptUI.smallbutton = function(container, text, helpTip, value) {
DuScriptUI.dimControls();

if (smallButton.label) DuScriptUI.setTextColor(smallButton.label, DuColor.Color.VERY_DARK_GREY);
DuScriptUI.setBackgroundColor(smallButton, DuColor.Color.APP_TEXT_COLOR.darker());
DuScriptUI.setBackgroundColor(smallButton, DuColor.Color.APP_TEXT_COLOR.push());

DuScriptUI.highlightedControls.push(smallButton);
}
Expand Down Expand Up @@ -12297,12 +12338,12 @@ DuScriptUI.checkUpdate = function ( callback, ui, showAlert )

var titleGroup = DuScriptUI.group( ui_updateGroup );
titleGroup.alignment = ['fill', 'top'];
DuScriptUI.setBackgroundColor( titleGroup, DuColor.Color.APP_BACKGROUND_COLOR.darker() );
DuScriptUI.setBackgroundColor( titleGroup, DuColor.Color.APP_BACKGROUND_COLOR.push() );

DuScriptUI.staticText(
titleGroup,
DuString.args( "New {#}!", [ DuESF.scriptName ] ),
DuColor.Color.APP_TEXT_COLOR.lighter(130)
DuColor.Color.APP_TEXT_COLOR.pull(150)
).alignment = ['center','top'];

var newVersionGroup = DuScriptUI.group( ui_updateGroup );
Expand All @@ -12317,7 +12358,7 @@ DuScriptUI.checkUpdate = function ( callback, ui, showAlert )
DuScriptUI.staticText(
newVersionGroup,
update.version,
DuColor.Color.APP_TEXT_COLOR.lighter(115)
DuColor.Color.APP_TEXT_COLOR.pull(130)
);

var descriptionGroup = DuScriptUI.group( ui_updateGroup );
Expand All @@ -12328,12 +12369,12 @@ DuScriptUI.checkUpdate = function ( callback, ui, showAlert )
var descriptionText = descriptionGroup.add("edittext", undefined, update.description, {multiline:true});
descriptionText.alignment = ['fill','fill'];
descriptionText.minimumSize = [-1,100];
DuScriptUI.setBackgroundColor( descriptionText, DuColor.Color.APP_BACKGROUND_COLOR.darker() );
DuScriptUI.setBackgroundColor( descriptionText, DuColor.Color.APP_BACKGROUND_COLOR.push() );

DuScriptUI.staticText(
ui_updateGroup,
"Current version: " + DuESF.scriptVersion.fullVersion,
DuColor.Color.APP_TEXT_COLOR.darker(160)
DuColor.Color.APP_TEXT_COLOR.push(160)
).alignment = ['fill', 'bottom'];

if (update.downloadURL)
Expand Down Expand Up @@ -12576,11 +12617,11 @@ DuScriptUI.separator = function( container, name, checkable, drawLine )
if ( checkable ) separator.label = separator.add( 'checkbox', undefined, name );
else separator.label = separator.add( 'statictext', undefined, name );
separator.label.alignment = [ 'center', 'bottom' ];
if ( drawLine ) DuScriptUI.setBackgroundColor( separator, DuColor.Color.APP_BACKGROUND_COLOR.lighter() );
if ( drawLine ) DuScriptUI.setBackgroundColor( separator, DuColor.Color.APP_BACKGROUND_COLOR.pull(130) );
}
else if ( drawLine )
{
DuScriptUI.setBackgroundColor( separator, DuColor.Color.APP_BACKGROUND_COLOR.darker(300) );
DuScriptUI.setBackgroundColor( separator, DuColor.Color.APP_BACKGROUND_COLOR.push() );
var size = 1;
if (DuESF.host == DuESF.HostApplication.AFTER_EFFECTS) size = 2;
if (container.orientation == 'row')
Expand Down Expand Up @@ -12836,7 +12877,7 @@ DuScriptUI.checkBox = function( container, text, image, helpTip, textChecked, im
duCheckBox.image.visible = false;
if (duCheckBox.imageOnly)
{
DuScriptUI.setBackgroundColor( duCheckBox.imageGroup, DuColor.Color.APP_HIGHLIGHT_COLOR.darker() );
DuScriptUI.setBackgroundColor( duCheckBox.imageGroup, DuColor.Color.APP_HIGHLIGHT_COLOR.push() );
}
}

Expand Down Expand Up @@ -12913,7 +12954,7 @@ DuScriptUI.checkBox = function( container, text, image, helpTip, textChecked, im
{
if (!options.isTab) {
if (duCheckBox.hasLabel)
DuScriptUI.setTextColor( duCheckBox.labelChecked, DuColor.Color.APP_HIGHLIGHT_COLOR.lighter(150) );
DuScriptUI.setTextColor( duCheckBox.labelChecked, DuColor.Color.APP_HIGHLIGHT_COLOR.pull() );
else
DuScriptUI.setBackgroundColor( duCheckBox.buttonGroup, DuColor.Color.APP_HIGHLIGHT_COLOR );
}
Expand All @@ -12930,7 +12971,7 @@ DuScriptUI.checkBox = function( container, text, image, helpTip, textChecked, im
if (duCheckBox.hasLabel)
DuScriptUI.setTextColor( duCheckBox.label, DuColor.Color.APP_HIGHLIGHT_COLOR );
else
DuScriptUI.setBackgroundColor( duCheckBox.buttonGroup, DuColor.Color.APP_HIGHLIGHT_COLOR.darker() );
DuScriptUI.setBackgroundColor( duCheckBox.buttonGroup, DuColor.Color.APP_HIGHLIGHT_COLOR.push() );
}
//outline
else
Expand All @@ -12952,7 +12993,7 @@ DuScriptUI.checkBox = function( container, text, image, helpTip, textChecked, im
if (duCheckBox.hasLabel)
DuScriptUI.setTextColor( duCheckBox.labelChecked, DuColor.Color.APP_HIGHLIGHT_COLOR );
else
DuScriptUI.setBackgroundColor( duCheckBox.buttonGroup, DuColor.Color.APP_HIGHLIGHT_COLOR.darker() );
DuScriptUI.setBackgroundColor( duCheckBox.buttonGroup, DuColor.Color.APP_HIGHLIGHT_COLOR.push() );
}
//outline
else
Expand Down Expand Up @@ -13538,7 +13579,7 @@ DuScriptUI.editText = function( container, text, prefix, suffix, placeHolder, he
niceEditText.static = niceEditText.add( 'statictext', undefined, options.prefix + staticText + options.suffix );
niceEditText.static.alignment = [ 'fill', 'center' ];
niceEditText.static.helpTip = options.helpTip;
if ( options.text == "" && options.placeHolder != "" ) DuScriptUI.setTextColor( niceEditText.static, DuColor.Color.APP_HIGHLIGHT_COLOR.darker(150) );
if ( options.text == "" && options.placeHolder != "" ) DuScriptUI.setTextColor( niceEditText.static, DuColor.Color.APP_HIGHLIGHT_COLOR.push(150) );
else DuScriptUI.setTextColor( niceEditText.static, DuColor.Color.APP_HIGHLIGHT_COLOR );
niceEditText.edit = niceEditText.add( 'edittext', undefined, options.text );
niceEditText.edit.visible = false;
Expand Down Expand Up @@ -13583,7 +13624,7 @@ DuScriptUI.editText = function( container, text, prefix, suffix, placeHolder, he
var staticText = '';
if ( niceEditText.edit.text == '' && niceEditText.placeHolder != '' )
{
DuScriptUI.setTextColor( niceEditText.static, niceEditText.textColor.darker(200) );
DuScriptUI.setTextColor( niceEditText.static, niceEditText.textColor.push(150) );
staticText = niceEditText.placeHolder;
}
else
Expand Down Expand Up @@ -13713,7 +13754,7 @@ DuScriptUI.staticText = function( container, text, color, multiLine )
options.text = def(options.text, text);

multiLine = def(multiLine, options.text.indexOf("\n") >= 0 )
color = def(color, DuColor.Color.APP_TEXT_COLOR.darker(130) );
color = def(color, DuColor.Color.APP_TEXT_COLOR.push(130) );

options.color = def(options.color, color);
options.multiLine = def(options.multiLine, multiLine);
Expand Down Expand Up @@ -14808,7 +14849,7 @@ DuScriptUI.multiButton = function( container, text, image, helpTip, ignoreUIMode
}
else
{
DuScriptUI.setBackgroundColor( multiButton, DuColor.Color.APP_HIGHLIGHT_COLOR.darker() );
DuScriptUI.setBackgroundColor( multiButton, DuColor.Color.APP_HIGHLIGHT_COLOR.push() );
}

DuScriptUI.highlightedControls.push( multiButton );
Expand Down Expand Up @@ -15059,6 +15100,7 @@ DuESF.initMethods.push( DuProgressBar.init );
/**
* @class
* @name DuToolBar
* @augments Group
* @classdesc For use with {@link DuScriptUI}.<br />
* A Tool Bar.<br />
* This is not a real class, and cannot be instanciated.<br />
Expand Down Expand Up @@ -15098,7 +15140,7 @@ DuScriptUI.toolBar = function( container, numCols )
var toolsGroup = DuScriptUI.group( container, 'row' );
toolsGroup.spacing = 3;
toolsGroup.margins = 3;
DuScriptUI.setBackgroundColor(toolsGroup , DuColor.Color.APP_BACKGROUND_COLOR.darker() );
DuScriptUI.setBackgroundColor(toolsGroup , DuColor.Color.APP_BACKGROUND_COLOR.push() );

toolsGroup.columns = [];

Expand Down Expand Up @@ -26857,22 +26899,22 @@ DuAEExpression.Library["limit"].expression = ['function limit(val, min, max, sof
'if (typeof min === \'undefined\') min = null;',
'if (typeof max === \'undefined\') max = null;',
'if (typeof softness === \'undefined\') softness = 0;',
'if (min == null && max == null) return val;',
'if (min === null && max === null) return val;',
'if (typeof val.length !== \'undefined\') {',
'var n = 0;',
'var n = val.length;',
'if (min !== null) {',
'if (typeof min.length === \'undefined\') {',
'min = [min];',
'while(min.length < val.length) min.push(min[0]);',
'}',
'n = Math.max(val.length, min.length);',
'n = Math.min(n, min.length);',
'}',
'else if (max !== null) {',
'if (typeof max.length === \'undefined\') {',
'max = [max];',
'while(max.length < val.length) max.push(max[0]);',
'}',
'n = Math.max(val.length, max.length);',
'n = Math.min(n, max.length);',
'}',
'for (var i = 0; i < n; i++) {',
'if (min !== null && max !== null) val[i] = limit(val[i], min[i], max[i], softness);',
Expand All @@ -26881,15 +26923,15 @@ DuAEExpression.Library["limit"].expression = ['function limit(val, min, max, sof
'}',
'return val;',
'}',
'if (max != null) {',
'if (max !== null) {',
'if (typeof max.length !== \'undefined\') max = max[0];',
'max = max - softness;',
'if ( val > max ) {',
'if (softness == 0) return max;',
'return max + softness - softness / ( 1 + (val - max)/softness);',
'}',
'}',
'if (min != null) {',
'if (min !== null) {',
'if (typeof min.length !== \'undefined\') min = min[0];',
'min = min + softness;',
'if (val < min && min != null) {',
Expand Down
5 changes: 5 additions & 0 deletions dist/libs/DuGR_api.jsxinc
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,10 @@ DuGR.Group = {
* Camera layers
*/
CAMERA: 'DuGR.type.camera',
/**
* 3D Model layers
*/
THREED_MODEL: 'DuGR.type.threeDModel',
/**
* Visible layers
*/
Expand Down Expand Up @@ -455,6 +459,7 @@ DuGR.inGroups = function ( layer, groups, tag, and )
else if (group == DuGR.Group.ADJUSTMENT ) ok = DuAELayer.isAdjustment( layer );
else if (group == DuGR.Group.LIGHT ) ok = layer instanceof LightLayer;
else if (group == DuGR.Group.CAMERA ) ok = layer instanceof CameraLayer;
else if (group == DuGR.Group.THREED_MODEL ) ok = layer instanceof ThreeDModelLayer;
else if (group == DuGR.Group.VISIBLE ) ok = layer.enabled;
else if (group == DuGR.Group.SOUND ) ok = layer.hasAudio;
else if (group == DuGR.Group.SOLO ) ok = layer.solo;
Expand Down
36 changes: 29 additions & 7 deletions dist/libs/api3.jsxinc

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Scripts/ScriptUI Panels/inc/tr/Duik_eo_UY.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Scripts/ScriptUI Panels/inc/tr/Duik_eo_UY.json.jsxinc

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Scripts/ScriptUI Panels/inc/tr/Duik_es_ES.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Scripts/ScriptUI Panels/inc/tr/Duik_es_ES.json.jsxinc

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Scripts/ScriptUI Panels/inc/tr/Duik_fr_FR.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Scripts/ScriptUI Panels/inc/tr/Duik_fr_FR.json.jsxinc

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Scripts/ScriptUI Panels/inc/tr/Duik_zh_CN.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Scripts/ScriptUI Panels/inc/tr/Duik_zh_CN.json.jsxinc

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Scripts/ScriptUI Panels/inc/tr/Duik_zh_TW.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/Scripts/ScriptUI Panels/inc/tr/Duik_zh_TW.json.jsxinc

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion tools/assets/environment.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"jsdoc_conf": "./tools/assets"
},
"meta": {
"version": "17.1.15",
"version": "17.1.16",
"prerelease": "false"
},
"dependencies": [
Expand Down

0 comments on commit 53f38fb

Please sign in to comment.