I am contemplating the translation of my website (in French) into English and Norwegian bokm?l.
However, Norwegian bokm?l is not proposed with Polylang, so I had to manually create the language.
Upon registering my new language, WP tells me that there is no language file for nb_NO.
I couldn’t find how to download and install manually the file. Can someone help me ?
Best regards,
Jean Barbey
Can you please fix this, so I can set my page to Bokm?l as it should be?
]]>I am trying to update the translations for the RSVP form in Norwegian.
I have followed directions here: https://theeventscalendar.com/knowledgebase/k/how-to-override-plugin-language-files/
It has worked great for the text eg. “Please submit your RSVP information, including the total number of guests and RSVP Here.”
However I can’t find the strings to edit the form fields eg. “Name” and “Number of Guests” as well as button “Finish”. I also tried with a Find and Replace plugin but the changes won’t stick to the second page / form perhaps Ajax?
Is there another .po file I should be using? Or a trick for finding form fields in the event-tickets-nb_NO.po file?
The currently the form came half translated on install, so it looks very strange.
Any help would be greatly appreciated
I have few features to request, specially one, I believe is one of the most important (maybe its already here but I missed it?):
– Auto stock management, if customer buys the last key off of the product, it will automatically mark this product as out of stock, it is a big problem now, as some of my customers bought x2 keys while I had only one in stock…
Other feature:
– Put your own Expiration date for pre-set keys (I mean those that you upload yourself to database), also for bulk, use a separator for expiration date, example: key_code|exp_date useful if each key has different exp dates…
– String editor, useful if your website is not in english, its kind of weird for customers to receive a mail with non-english language and see suddenly “Your licensed key is”.
Thank you again!
]]>The $heading variable text (default ‘Your license key(s)’) appears in the order details and in the email even if no licensed product is present in the order.
Probably there is a more elegant solution to solve the problem, but the one I was using was to change the template files as shown below.
The indent has not been modified to keep the minimum difference from the original shape.
1. order-view-license-keys.php.patch content is:
diff U3Bb license-manager-for-woocommerce/templates/order-view-license-keys.php trunk/templates/order-view-license-keys.php
--- license-manager-for-woocommerce/templates/order-view-license-keys.php Tue May 7 18:32:27 2019
+++ trunk/templates/order-view-license-keys.php Tue May 7 18:50:31 2019
@@ -1,5 +1,15 @@
<?php defined('ABSPATH') || exit; ?>
+<?php $counter = 0;
+foreach ( $data as $product_id => $row ) {
+ foreach ( $row['keys'] as $entry ) {
+ if ( $entry->license_key ) {
+ $counter = $counter + 1;
+ }
+ }
+} ?>
+
+<?php if ( $counter ): ?>
<h2><?php esc_html_e($heading);?></h2>
<?php foreach ($data as $product_id => $row): ?>
@@ -28,4 +38,4 @@
</tbody>
</table>
<?php endforeach; ?>
-
+<?php endif; ?>
2. email-order-license-keys.patch content is:
diff U3Bb license-manager-for-woocommerce/templates/emails/email-order-license-keys.php trunk/templates/emails/email-order-license-keys.php
--- license-manager-for-woocommerce/templates/emails/email-order-license-keys.php Tue May 7 18:32:28 2019
+++ trunk/templates/emails/email-order-license-keys.php Tue May 7 20:14:38 2019
@@ -1,5 +1,15 @@
<?php defined('ABSPATH') || exit; ?>
+<?php $counter = 0;
+foreach ( $data as $product_id => $row ) {
+ foreach ( $row['keys'] as $entry ) {
+ if ( $entry->license_key ) {
+ $counter = $counter + 1;
+ }
+ }
+} ?>
+
+<?php if ( $counter ): ?>
<h2><?php esc_html_e($heading);?></h2>
<div style="margin-bottom: 40px;">
@@ -33,3 +43,4 @@
</table>
<?php endforeach; ?>
</div>
+<?php endif; ?>
]]>In the product end(which is a plugin itself) I need to validate the license key and activate it. I used the following lines of code for the same.
//To Validate
$cmd='curl --location --request GET "https://mysite.com/wp-json/lmfwc/v1/licenses/validate/2?consumer_key=ck_5f3e6a4418ea9e02fbd121182676f7720&consumer_secret=cs_2db507222ecfdc7e68b3de594a99dff86c7c" \
--header "Content-Type: application/json" \
--data "{
\"order_id\": null,
\"product_id\": null,
\"license_key\": \"EDITED_API_KEY_AGAIN\",
\"valid_for\": null,
\"status\": \"active\"
}"';
exec($cmd,$result);
//To Activate
$cmd1='curl --location --request PUT "https://mysite.com/wp-json/lmfwc/v1/licenses/activate/2?order_id=48&product_id=42&updated_by=2&consumer_key=ck_5f3e6a49e02bcad6d2fbd121182676f7720&consumer_secret=cs_2db5060ab7222ecfdc7e68b94a99dff86c7c" \
--header "Content-Type: application/json" \
--data "{
\"order_id\": null,
\"product_id\": null,
\"license_key\": \"EDITED_API_KEY_AGAIN\",
\"valid_for\": null,
\"status\": \"active\"
}"';
exec($cmd1,$result1);
Validation code is working fine. But the Activation part throws error. Could you please let me know the parameters should I pass with this query?
Why I am getting this error?
Array ( [0] => {“code”:”lmfwc_rest_data_error”,”message”:”Updated by User ID is invalid”,”data”:{“status”:404}} )
Waiting for your reply
]]>first of all, thank you for your contribution regarding the translation of my plugin into Norwegian.
Could I interest you into completing the plugin translation? Once 95% or more of the the the plugin is translated the language pack will become officially available for anyone to use.
Please let me know in any case.
EDIT: The Norwegian language team found your translation to be “excellent” and already added you as a “Project Translation Editor”, or PTE for short, for this plugin. This means that you can now not just suggest, but also approve translations for the plugin.
]]>