diff --git a/languages/wooplatnica-croatia-hr.po b/languages/wooplatnica-croatia-hr.po index b7a2cd2..f3699fb 100644 --- a/languages/wooplatnica-croatia-hr.po +++ b/languages/wooplatnica-croatia-hr.po @@ -2,8 +2,8 @@ msgid "" msgstr "" "Project-Id-Version: Croatian payment slip generator for WooCommerce 1.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-03 20:39+0000\n" -"PO-Revision-Date: 2020-05-03 20:58+0000\n" +"POT-Creation-Date: 2020-10-11 14:41+0000\n" +"PO-Revision-Date: 2020-10-11 14:48+0000\n" "Last-Translator: zeko868\n" "Language-Team: Hrvatski\n" "Language: hr\n" @@ -13,7 +13,7 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "X-Generator: Loco https://localise.biz/\n" -"X-Loco-Version: 2.3.1; wp-5.2.6" +"X-Loco-Version: 2.3.1; wp-5.4.2" #: src/WC_Gateway_Wooplatnica.php:16 msgid "[CRO] Payment slip or mobile banking" @@ -157,7 +157,7 @@ msgid "Intent code" msgstr "Svrha plaćanja" #: src/WC_Gateway_Wooplatnica.php:121 src/WC_Gateway_Wooplatnica.php:319 -#: src/WC_Gateway_Wooplatnica.php:334 src/WC_Gateway_Wooplatnica.php:427 +#: src/WC_Gateway_Wooplatnica.php:334 src/WC_Gateway_Wooplatnica.php:435 msgid "(undefined)" msgstr "(nedefinirano)" @@ -234,18 +234,39 @@ msgid "Type of the image with the generated payment slip" msgstr "Format slike s generiranom općom uplatnicom" #: src/WC_Gateway_Wooplatnica.php:375 +msgid "Width of the inline image in e-mail message" +msgstr "Širina slike u tijelu e-mail poruke" + +#: src/WC_Gateway_Wooplatnica.php:376 +msgid "" +"Height is being scaled to width proportionally. Leave empty if you don't " +"want to specify dimensions of inline image. Not recommended since in some e-" +"mail clients like Windows 10 Mail UWP app the image would be shown in its " +"original size instead of maximum available space thus often causing the need " +"for using horizontal slider in order to see complete content of the e-mail " +"message." +msgstr "" +"Visina slike se proporcionalno prilagođava navedenoj širini. Ostavite ovo " +"polje praznim ukoliko ne želite specificirati dimenzije ugrađene slike. No " +"to se baš ne preporuča budući neki e-mail klijenti poput aplikacije Pošta iz " +"Windows 10 bi prikazali sliku u originalnim dimenzijama umjesto da ju " +"prilagode raspoloživom prostoru zbog čega bi korisnik trebao koristiti " +"horizontalne klizače kako bi bio u mogućnosti vidjeti sav sadržaj e-mail " +"poruke." + +#: src/WC_Gateway_Wooplatnica.php:383 msgid "Display confirmation part" msgstr "Prikaži potvrdni listić" -#: src/WC_Gateway_Wooplatnica.php:377 +#: src/WC_Gateway_Wooplatnica.php:385 msgid "Display confirmation part of the payment slip" msgstr "Prikaži potvrdni listić (desni dio) na općoj uplatnici" -#: src/WC_Gateway_Wooplatnica.php:381 +#: src/WC_Gateway_Wooplatnica.php:389 msgid "Main font" msgstr "Glavni font" -#: src/WC_Gateway_Wooplatnica.php:382 +#: src/WC_Gateway_Wooplatnica.php:390 msgid "" "Font being used for the text that won't be displayed in fields with cells " "for each character" @@ -253,27 +274,27 @@ msgstr "" "Font koji će se primijeniti na tekst koji neće biti prikazan u poljima s " "ćelijama za svaki pojedini znak" -#: src/WC_Gateway_Wooplatnica.php:387 +#: src/WC_Gateway_Wooplatnica.php:395 msgid "proportional" msgstr "proporcionalni" -#: src/WC_Gateway_Wooplatnica.php:388 +#: src/WC_Gateway_Wooplatnica.php:396 msgid "monospaced" msgstr "neproporcionalni" -#: src/Wooplatnica.php:60 +#: src/Wooplatnica.php:64 msgid "payment-slip" msgstr "uplatnica" -#: src/Wooplatnica.php:66 +#: src/Wooplatnica.php:68 msgid "Problem loading image of payment slip" msgstr "Problem kod učitavanja slike uplatnice" -#: src/Wooplatnica.php:78 +#: src/Wooplatnica.php:86 msgid "Payment slip image" msgstr "slika opće uplatnice" -#: src/Wooplatnica.php:79 +#: src/Wooplatnica.php:87 msgid "Download payment slip" msgstr "Preuzmi uplatnicu" diff --git a/languages/wooplatnica-croatia.pot b/languages/wooplatnica-croatia.pot index 3cab1d6..8ab7a13 100644 --- a/languages/wooplatnica-croatia.pot +++ b/languages/wooplatnica-croatia.pot @@ -3,7 +3,7 @@ msgid "" msgstr "" "Project-Id-Version: Croatian payment slip generator for WooCommerce 1.1\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2020-05-03 20:43+0000\n" +"POT-Creation-Date: 2020-10-11 14:49+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: \n" @@ -148,7 +148,7 @@ msgid "Intent code" msgstr "" #: src/WC_Gateway_Wooplatnica.php:121 src/WC_Gateway_Wooplatnica.php:319 -#: src/WC_Gateway_Wooplatnica.php:334 src/WC_Gateway_Wooplatnica.php:427 +#: src/WC_Gateway_Wooplatnica.php:334 src/WC_Gateway_Wooplatnica.php:435 msgid "(undefined)" msgstr "" @@ -223,44 +223,58 @@ msgid "Type of the image with the generated payment slip" msgstr "" #: src/WC_Gateway_Wooplatnica.php:375 +msgid "Width of the inline image in e-mail message" +msgstr "" + +#: src/WC_Gateway_Wooplatnica.php:376 +msgid "" +"Height is being scaled to width proportionally. Leave empty if you don't " +"want to specify dimensions of inline image. Not recommended since in some e-" +"mail clients like Windows 10 Mail UWP app the image would be shown in its " +"original size instead of maximum available space thus often causing the need " +"for using horizontal slider in order to see complete content of the e-mail " +"message." +msgstr "" + +#: src/WC_Gateway_Wooplatnica.php:383 msgid "Display confirmation part" msgstr "" -#: src/WC_Gateway_Wooplatnica.php:377 +#: src/WC_Gateway_Wooplatnica.php:385 msgid "Display confirmation part of the payment slip" msgstr "" -#: src/WC_Gateway_Wooplatnica.php:381 +#: src/WC_Gateway_Wooplatnica.php:389 msgid "Main font" msgstr "" -#: src/WC_Gateway_Wooplatnica.php:382 +#: src/WC_Gateway_Wooplatnica.php:390 msgid "" "Font being used for the text that won't be displayed in fields with cells " "for each character" msgstr "" -#: src/WC_Gateway_Wooplatnica.php:387 +#: src/WC_Gateway_Wooplatnica.php:395 msgid "proportional" msgstr "" -#: src/WC_Gateway_Wooplatnica.php:388 +#: src/WC_Gateway_Wooplatnica.php:396 msgid "monospaced" msgstr "" -#: src/Wooplatnica.php:60 +#: src/Wooplatnica.php:64 msgid "payment-slip" msgstr "" -#: src/Wooplatnica.php:66 +#: src/Wooplatnica.php:68 msgid "Problem loading image of payment slip" msgstr "" -#: src/Wooplatnica.php:78 +#: src/Wooplatnica.php:86 msgid "Payment slip image" msgstr "" -#: src/Wooplatnica.php:79 +#: src/Wooplatnica.php:87 msgid "Download payment slip" msgstr "" diff --git a/src/WC_Gateway_Wooplatnica.php b/src/WC_Gateway_Wooplatnica.php index c9b7db1..20e4c7d 100644 --- a/src/WC_Gateway_Wooplatnica.php +++ b/src/WC_Gateway_Wooplatnica.php @@ -370,8 +370,16 @@ public function init_form_fields() 'gif' => 'gif', 'bmp' => 'bmp' ), - 'desc_type' => true + 'desc_tip' => true ), + 'payment_slip_email_width' => array( + 'title' => __( 'Width of the inline image in e-mail message', $this->id ), + 'description' => __( 'Height is being scaled to width proportionally. Leave empty if you don\'t want to specify dimensions of inline image. Not recommended since in some e-mail clients like Windows 10 Mail UWP app the image would be shown in its original size instead of maximum available space thus often causing the need for using horizontal slider in order to see complete content of the e-mail message.', $this->id ), + 'type' => 'text', + 'css' => 'width: 3em;', + 'default' => '640', + 'desc_tip' => true + ), 'display_confirmation_part' => array( 'title' => __( 'Display confirmation part', $this->id ), 'type' => 'checkbox', diff --git a/src/Wooplatnica.php b/src/Wooplatnica.php index ef8bf6f..adc8d42 100644 --- a/src/Wooplatnica.php +++ b/src/Wooplatnica.php @@ -44,7 +44,8 @@ private function display_payment_slip($order, $is_for_sending) { 'display_confirmation_part' => 'yes', 'payment_slip_type' => 'national', 'main_font' => 'proportional', - 'output_image_type' => 'png' + 'output_image_type' => 'png', + 'payment_slip_email_width' => '640' ); $this->options = array_merge($default_options, $this->options); // this is useful because after updating plugin, options that didn't exist in previous version of plugin are not yet stored in the database, i.e. when those options would be fetched, their values would be null even if those newly defined options have defined default values in WC_Gateway_Wooplatnica.php, what resulted in unexcepted aad buggy behavior @@ -65,7 +66,13 @@ private function display_payment_slip($order, $is_for_sending) { if ($is_for_sending) { $image_identifier = 'payment-slip'; $img_element_alt = __('Problem loading image of payment slip', $this->domain); - echo "\"$img_element_alt\"/"; + if (!empty($this->options['payment_slip_email_width'])) { + $width_attribute = "width=\"{$this->options['payment_slip_email_width']}\""; + } + else { + $width_attribute = ''; + } + echo "\"$img_element_alt\""; add_action( 'phpmailer_init', function() use ($payment_slip_blob, $image_identifier, $file_name, $image_type) { global $phpmailer;