add svg attributes in pot

This commit is contained in:
abakkk 2019-03-28 15:26:10 +01:00
parent 82c45f4cc1
commit 14205295fc
2 changed files with 56 additions and 7 deletions

15
draw.js
View File

@ -453,17 +453,17 @@ var DrawingArea = new Lang.Class({
incrementLineWidth: function(increment) { incrementLineWidth: function(increment) {
this.currentLineWidth = Math.max(this.currentLineWidth + increment, 1); this.currentLineWidth = Math.max(this.currentLineWidth + increment, 1);
this.emitter.emit('show-osd', this.currentLineWidth + "px", this.currentLineWidth); this.emitter.emit('show-osd', this.currentLineWidth + " " + _("px"), this.currentLineWidth);
}, },
toggleLineJoin: function() { toggleLineJoin: function() {
this.currentLineJoin = this.currentLineJoin == 2 ? 0 : this.currentLineJoin + 1; this.currentLineJoin = this.currentLineJoin == 2 ? 0 : this.currentLineJoin + 1;
this.emitter.emit('show-osd', LineJoinNames[this.currentLineJoin], null); this.emitter.emit('show-osd', _(LineJoinNames[this.currentLineJoin]), null);
}, },
toggleLineCap: function() { toggleLineCap: function() {
this.currentLineCap = this.currentLineCap == 2 ? 0 : this.currentLineCap + 1; this.currentLineCap = this.currentLineCap == 2 ? 0 : this.currentLineCap + 1;
this.emitter.emit('show-osd', LineCapNames[this.currentLineCap], null); this.emitter.emit('show-osd', _(LineCapNames[this.currentLineCap]), null);
}, },
toggleFontWeight: function() { toggleFontWeight: function() {
@ -472,7 +472,7 @@ var DrawingArea = new Lang.Class({
this.currentElement.font.weight = this.currentFontWeight; this.currentElement.font.weight = this.currentFontWeight;
this._redisplay(); this._redisplay();
} }
this.emitter.emit('show-osd', `<span font_weight="${FontWeightNames[this.currentFontWeight].toLowerCase()}">${FontWeightNames[this.currentFontWeight]}</span>`, null); this.emitter.emit('show-osd', `<span font_weight="${FontWeightNames[this.currentFontWeight].toLowerCase()}">${_(FontWeightNames[this.currentFontWeight])}</span>`, null);
}, },
toggleFontStyle: function() { toggleFontStyle: function() {
@ -481,7 +481,7 @@ var DrawingArea = new Lang.Class({
this.currentElement.font.style = this.currentFontStyle; this.currentElement.font.style = this.currentFontStyle;
this._redisplay(); this._redisplay();
} }
this.emitter.emit('show-osd', `<span font_style="${FontStyleNames[this.currentFontStyle].toLowerCase()}">${FontStyleNames[this.currentFontStyle]}</span>`, null); this.emitter.emit('show-osd', `<span font_style="${FontStyleNames[this.currentFontStyle].toLowerCase()}">${_(FontStyleNames[this.currentFontStyle])}</span>`, null);
}, },
toggleFontFamily: function() { toggleFontFamily: function() {
@ -491,7 +491,7 @@ var DrawingArea = new Lang.Class({
this.currentElement.font.family = currentFontFamily; this.currentElement.font.family = currentFontFamily;
this._redisplay(); this._redisplay();
} }
this.emitter.emit('show-osd', `<span font_family="${currentFontFamily}">${currentFontFamily}</span>`, null); this.emitter.emit('show-osd', `<span font_family="${currentFontFamily}">${_(currentFontFamily)}</span>`, null);
}, },
toggleHelp: function() { toggleHelp: function() {
@ -1075,6 +1075,7 @@ var DrawingMenu = new Lang.Class({
this._addSwitchItem(lineSection, _("Dashed"), dashedLineIcon, this.area, 'dashedLine'); this._addSwitchItem(lineSection, _("Dashed"), dashedLineIcon, this.area, 'dashedLine');
this._addSeparator(lineSection); this._addSeparator(lineSection);
this.menu.addMenuItem(lineSection); this.menu.addMenuItem(lineSection);
lineSection.itemActivated = () => {};
this.lineSection = lineSection; this.lineSection = lineSection;
let fontSection = new PopupMenu.PopupMenuSection(); let fontSection = new PopupMenu.PopupMenuSection();
@ -1140,7 +1141,7 @@ var DrawingMenu = new Lang.Class({
_addSliderItem: function(menu, target, targetProperty) { _addSliderItem: function(menu, target, targetProperty) {
let item = new PopupMenu.PopupBaseMenuItem({ activate: false }); let item = new PopupMenu.PopupBaseMenuItem({ activate: false });
let label = new St.Label({ text: target[targetProperty] + " px", style_class: 'draw-on-your-screen-menu-slider-label' }); let label = new St.Label({ text: target[targetProperty] + " " + _("px"), style_class: 'draw-on-your-screen-menu-slider-label' });
let slider = new Slider.Slider(target[targetProperty] / 50); let slider = new Slider.Slider(target[targetProperty] / 50);
slider.connect('value-changed', (slider, value, property) => { slider.connect('value-changed', (slider, value, property) => {

View File

@ -309,3 +309,51 @@ msgid ""
msgstr "" msgstr ""
# The following words refer to SVG attributes.
# You have the choice to translate or not
#msgid "Butt"
#msgstr ""
#msgid "Round"
#msgstr ""
#msgid "Square"
#msgstr ""
#msgid "Miter"
#msgstr ""
#msgid "Bevel"
#msgstr ""
#msgid "Normal"
#msgstr ""
#msgid "Bold"
#msgstr ""
#msgid "Italic"
#msgstr ""
#msgid "Oblique"
#msgstr ""
#msgid "Sans-Serif"
#msgstr ""
#msgid "Serif"
#msgstr ""
#msgid "Monospace"
#msgstr ""
#msgid "Cursive"
#msgstr ""
#msgid "Fantasy"
#msgstr ""
#msgid "px"
#msgstr ""