JS Help Desk is the best helpdesk and support plugin. JS Help Desk is a professional, simple, easy to use and complete customer support system. JS Help Desk comes packed with lot features than most of the expensive(and complex) support ticket system on market. The best part is, It completely free.
Now for scripts that use live chat as well as support tickets: Support Board is a powerful and simple-to-use support desk and chat script that provides a great dual solution for communicating with clients. The plugin has full Slack integration for sending and receiving user messages directly from Slack. It also has full bot integration with Dialogflow to reply automatically to your customers!
js support ticket pro nulled scripts
DOWNLOAD: https://jinyurl.com/2vKMYf
BeDesk enables business owners to reduce support ticket volume by creating articles based on frequently asked questions and setting up the software to automatically suggest an article when customers create a new ticket with the relevant topic.
HelpDesk 3 also offers clients support via live chats and tickets, but has taken things a step further by allowing clients to email their queries. Not only is it easy to install, but you can set up automated answers for the chat feature, set up standard responses for the chat and tickets, and your client history is saved and can be viewed at any time.
AH Ticket is a PHP help desk and support ticket system. In addition to sending tickets by email, other things you can do with this system include adding estimated times for resolving tickets, allowing users to log in with their social media accounts and to rate replies from admin and staff, and the ability to integrate with Mailchimp.
This script focuses on support tickets. To access support for a product or service via the PHP SupportDesk script, your clients simply need to go to a dedicated support page on your website, enter their name and email address, select the department they need help from, and write their message. This opens up a ticket with a special ID number, and your customer service staff will get an email notification that a ticket has been opened. You can also integrate SupportDesk with Slack.
Ultimate Desk is a support system with a knowledge base and FAQs. It allows you to create and manage unlimited tickets, knowledge base articles, and FAQs. You can have unlimited agents, users, and other staff members.
HelpDeskZ is a free PHP-based application that allows you to manage your site's support with a web-based support ticket system. Features include the ability to create groups, canned responses, custom fields, a knowledge base, news, template customization, and email piping.
Faveo has a free open-source version and a paid version. The free version does not come with support for installation, configuration, and maintenance. Apart from that, it has everything you need to create a help-desk ticketing system!
Your site might support users with their own logins as well as general readers outside of the community. A good WordPress ticketing system can allow you to differentiate between these audiences. Perhaps users with accounts can access different FAQ material than users without an account. Or, one group could see more fields on a ticket form than the other. It can take a bit of research to choose the right system for your goals.
There are many ticket systems for WordPress sites out there, and some are better than others. Below are our top eight recommendations. At the time of this review, all of these plugins maintain current developer support for WordPress.
You can also define how you want to receive email notifications during the life of a ticket. The WATS plugin accepts tickets through a frontend form on your website, a backend WordPress admin form, and through email. However, there is no support for direct ticketing from live chat, social media, or blog comments (admins can turn comments into tickets manually). If you have a simple customer service operation with one or two channels, this system could do the trick.
Standard ticketing works from front or back end forms on your site as well as through email. SupportCandy also comes with a canned reply feature that lets you set up pre-written answers for common support requests. Higher plans include time tracking, FAQ and knowledge base integration, SLAs, and WooCommerce integration.
JS Help Desk is a freemium WordPress support program with a good number of features, and most of them require a subscription. The WordPress help desk plugin has over 4,000 active users. One of the nice things about JS Help Desk is that it comes with a well-designed dashboard that makes it easy to track tickets with different sorting options. The program also has a useful search feature to locate tickets by a variety of metrics.
The JS Help Desk plugin supports ticketing on the front and back ends as well as through a web widget and email. Advanced features are available as separate add-ons or altogether through different plan levels. These include knowledge base integration, time tracking, desktop notifications, and eCommerce integration.
The KB Support plugin includes ticketing from web forms and email. The support system offers good functionality with canned replies, WooCommerce integration, and custom ticket statuses. Plus, it integrates with other apps through Zapier to offer more flexibility.
If when using this minimal configuration you are still seeing a JavaScript exception in the SDK script, create a new support ticket as this will require the faulty build to be rolled back as it's probably an issue with a newly deployed version.
If your configuration was previously deployed and working but just started reporting this exception, then it may be an issue with a newly deployed version, check whether it is affecting only a small set of your users / browser and either file an issue on GitHub or create a new support ticket.
Hulu used Backbone.js to build its next generation online video experience. With Backbone as a foundation, the web interface was rewritten from scratch so that all page content can be loaded dynamically with smooth transitions as you navigate. Backbone makes it easy to move through the app quickly without the reloading of scripts and embedded videos, while also offering models and collections for additional data manipulation support.
The most notable case is probably when using an AMD-aware version of Backbone, but using shim config for scripts that depend on Backbone. If this is your use case, then setting wrapShim: true in the optimizer config will likely fix any post-build problem you might see. More details in the bug ticket.Full list of changes:
For years, internationalization (i18n) has been a thing that has been pretty well supported in WordPress when it comes to PHP development. For PHP, WordPress already provides all the tools necessary to make it as easy as possible to localize WordPress core, themes and plugins to any language. Today we are bringing the same capabilities to JavaScript development for WordPress. \n\n\n\nHow does it work?\n\n\n\nWhen registering your scripts you can add wp-i18n as a dependency to allow you to add translatable strings as you would in PHP:\n\n\n\nwp_register_script( 'my-handle', plugins_url( '\/js\/my-file.js', MY_PLUGIN ), array( 'wp-i18n' ) );\n\n\n\nInside your scripts you will then be able to use wp-18n as follows:\n\n\n\nconst __, _x, _n, _nx = wp.i18n;\n\n__( '__', 'my-domain' );\n_x( '_x', '_x_context', 'my-domain' );\n_n( '_n_single', '_n_plural', number, 'my-domain' );\n_nx( '_nx_single', '_nx_plural', number, '_nx_context', 'my-domain' );\n\n\n\nThese functions mirror their PHP counterparts and can be used in exactly the same manner.\u00a0\n\n\n\nThe final step is to tell WordPress your script contains translations and of which domain, this is to allow WordPress to selectively load only the necessary translations to ensure everything is as fast as can be:\n\n\n\nwp_set_script_translations( 'my-handle', 'my-domain' );\n\n\n\nMake sure to also specify the\u00a0Text Domain\u00a0for your translations in the header of your plugin file. Otherwise the translations will not be picked up by translate.wordpress.org.\u00a0\n\n\n\nAdvanced usage\n\n\n\nRight now it\u2019s already possible to ship your own translations using the load_textdomain function and passing your own MO file. This is also possible using wp_set_script_translations which accepts an optional third path argument that allows you to tell WordPress to first look elsewhere for translations:\n\n\n\nwp_set_script_translations( 'my-handle', 'my-domain', plugin_dir_path( MY_PLUGIN ) . 'languages' );\n\n\n\nIf passed WordPress will first check if a file in the format of $domain-$locale-$handle.json exists in the given path and use it as the source of translations if so. Alternatively it will also first check the given path for the md5 filename before defaulting to the WordPress languages directory.\n\n\n\nIf you want to ship your own translation files these should be in the JED 1.x ( .json ) format. GlotPress is able to create these along with other tools such as po2json. Ideally these files should only contain translations that occur within their respective JS files. With po2json you can generate these files as follows:\n\n\n\npo2json translation.po translation.json -f jed\n\n\n\nThis will generate a JSON in the following format:\n\n\n\n\n \"translation-revision-date\": \"+0000\",\n \"generator\": \"GlotPress\/2.3.0-alpha\",\n \"domain\": \"messages\",\n \"locale_data\": \n \"messages\": \n \"\": \n \"domain\": \"messages\",\n \"plural-forms\": \"n != 1\",\n \"lang\": \"en-gb\"\n ,\n \"This file is too big. Files must be less than %d KB in size.\": [\n \"This file is too big. Files must be less than %d KB in size.\"\n ],\n \"%d Theme Update\": [\n \"%d Theme Update\",\n \"%d Theme Updates\"\n ],\n \"password strength\\u0004Medium\": [\n \"Medium\"\n ],\n \"taxonomy singular name\\u0004Category\": [\n \"Category\"\n ],\n \"post type general name\\u0004Pages\": [\n \"Pages\"\n ]\n \n \n\n\n\n\nBehind the screens\n\n\n\nWhen you upload your plugin or theme to wordpress.org all JS files will automatically be parsed the same as is already being done for PHP files. Any detected translations will be added to translate.wordpress.org to allow the community to cooperate to ensure WordPress, plugins and themes are available in as many languages as possible.\n\n\n\nIn order to parse all JS files the i18n-command for wp-cli is used. This replaces makepot.php to not only allow picking up translations in JS files but also to audit strings, parse strings only of a specific text domain and even pick up a few strings that weren\u2019t detected by makepot.php. This command is freely available and open-source as makepot.php was and it\u2019s recommended that anyone using makepot.php transition over to this much improved replacement.\n\n\n\nBased on these parsed translations Language Packs are generated. Traditionally these used to only contain PO and MO files, one pair for each locale. In order to selectively load only the necessary translations regardless of whether it\u2019s used or not a few more files are being added, one JSON file for every JS file that contains translations per locale.\n\n\n\nWhen parsing JS files for translations we don\u2019t know which handle is used to register that file so we\u2019ve had to use an alternate mechanism to find the translations belonging to each file. To do this we\u2019re using the md5 of the relative path of each file. This is appended to the usual name of $domain-$locale in the form of $domain-$locale-$md5.json.\n\n\n\nWhen you set script translations for a handle WordPress will automatically figure out the relative md5 hash of your source file, check to see if a translations file exists and if so ensure that it\u2019s loaded into wp.i18n before your script runs.\n\n\n\nPlugin and theme support\n\n\n\nTranslation and Language packs support for plugins and themes that are hosted on the repo is expected in the upcoming weeks. The patches are ready and waiting for commit. Plugin and theme authors are encouraged to start using wp-i18n in their JavaScript projects.\n\n\n\nCredits\n\n\n\nThis API wouldn\u2019t have been possible without the long standing efforts of @ocean90, @swissspidy, @nerrad, @atimmer, @schlessera and more recently @herregroen. Thanks a ton for the incredible work you've all put into making this a reality! Another thanks to @herregroen for providing the necessary input for this devnote.\n\n\n\n\n\n\n#5-0, #dev-notes, #i18n","contentFiltered":" For years, internationalization (i18ni18n Internationalization, or the act of writing and preparing code to be fully translatable into other languages. Also see localization. Often written with a lowercase i so it is not confused with a lowercase L or the numeral 1. Often an acquired skill.) has been a thing that has been pretty well supported in WordPress when it comes to PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher development. For PHP, WordPress already provides all the tools necessary to make it as easy as possible to localize WordPress coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress., themes and plugins to any language. Today we are bringing the same capabilities to JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user\u2019s browser. https:\/\/www.javascript.com\/. development for WordPress. \n\n\n\nHow does it work?\n\n\n\nWhen registering your scripts you can add wp-i18n as a dependency to allow you to add translatable strings as you would in PHP:\n\n\n\nwp_register_script( 'my-handle', plugins_url( '\/js\/my-file.js', MY_PLUGIN ), array( 'wp-i18n' ) );\n\n\n\nInside your scripts you will then be able to use wp-18n as follows:\n\n\n\nconst __, _x, _n, _nx = wp.i18n;\n\n__( '__', 'my-domain' );\n_x( '_x', '_x_context', 'my-domain' );\n_n( '_n_single', '_n_plural', number, 'my-domain' );\n_nx( '_nx_single', '_nx_plural', number, '_nx_context', 'my-domain' );\n\n\n\nThese functions mirror their PHP counterparts and can be used in exactly the same manner.\u00a0\n\n\n\nThe final step is to tell WordPress your script contains translations and of which domain, this is to allow WordPress to selectively load only the necessary translations to ensure everything is as fast as can be:\n\n\n\nwp_set_script_translations( 'my-handle', 'my-domain' );\n\n\n\nMake sure to also specify the\u00a0Text Domain\u00a0for your translations in the headerHeader The header of your site is typically the first thing people will experience. The masthead or header art located across the top of your page is part of the look and feel of your website. It can influence a visitor\u2019s opinion about your content and you\/ your organization\u2019s brand. It may also look different on different screen sizes. of your pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https:\/\/wordpress.org\/plugins\/ or can be cost-based plugin from a third-party file. Otherwise the translations will not be picked up by translate.wordpress.org.\u00a0\n\n\n\nAdvanced usage\n\n\n\nRight now it\u2019s already possible to ship your own translations using the load_textdomain function and passing your own MO file. This is also possible using wp_set_script_translations which accepts an optional third path argument that allows you to tell WordPress to first look elsewhere for translations:\n\n\n\nwp_set_script_translations( 'my-handle', 'my-domain', plugin_dir_path( MY_PLUGIN ) . 'languages' );\n\n\n\nIf passed WordPress will first check if a file in the format of $domain-$localeLocale A locale is a combination of language and regional dialect. Usually locales correspond to countries, as is the case with Portuguese (Portugal) and Portuguese (Brazil). Other examples of locales include Canadian English and U.S. English.-$handle.jsonJSON JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. exists in the given path and use it as the source of translations if so. Alternatively it will also first check the given path for the md5 filename before defaulting to the WordPress languages directory.\n\n\n\nIf you want to ship your own translationtranslation The process (or result) of changing text, words, and display formatting to support another language. Also see localization, internationalization. files these should be in the JED 1.x ( .json ) format. GlotPress is able to create these along with other tools such as po2json. Ideally these files should only contain translations that occur within their respective JSJS JavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors. files. With po2json you can generate these files as follows:\n\n\n\npo2json translation.po translation.json -f jed\n\n\n\nThis will generate a JSON in the following format:\n\n\n\n\n \"translation-revision-date\": \"+0000\",\n \"generator\": \"GlotPress\/2.3.0-alpha\",\n \"domain\": \"messages\",\n \"locale_data\": \n \"messages\": \n \"\": \n \"domain\": \"messages\",\n \"plural-forms\": \"n != 1\",\n \"lang\": \"en-gb\"\n ,\n \"This file is too big. Files must be less than %d KB in size.\": [\n \"This file is too big. Files must be less than %d KB in size.\"\n ],\n \"%d Theme Update\": [\n \"%d Theme Update\",\n \"%d Theme Updates\"\n ],\n \"password strength\\u0004Medium\": [\n \"Medium\"\n ],\n \"taxonomy singular name\\u0004Category\": [\n \"Category\"\n ],\n \"post type general name\\u0004Pages\": [\n \"Pages\"\n ]\n \n \n\n\n\n\nBehind the screens\n\n\n\nWhen you upload your plugin or theme to wordpress.org all JS files will automatically be parsed the same as is already being done for PHP files. Any detected translations will be added to translate.wordpress.org to allow the community to cooperate to ensure WordPress, plugins and themes are available in as many languages as possible.\n\n\n\nIn order to parse all JS files the i18n-command for wp-cli is used. This replaces makepot.php to not only allow picking up translations in JS files but also to audit strings, parse strings only of a specific text domain and even pick up a few strings that weren\u2019t detected by makepot.php. This command is freely available and open-source as makepot.php was and it\u2019s recommended that anyone using makepot.php transition over to this much improved replacement.\n\n\n\nBased on these parsed translations Language Packs are generated. Traditionally these used to only contain PO and MO files, one pair for each locale. In order to selectively load only the necessary translations regardless of whether it\u2019s used or not a few more files are being added, one JSON file for every JS file that contains translations per locale.\n\n\n\nWhen parsing JS files for translations we don\u2019t know which handle is used to register that file so we\u2019ve had to use an alternate mechanism to find the translations belonging to each file. To do this we\u2019re using the md5 of the relative path of each file. This is appended to the usual name of $domain-$locale in the form of $domain-$locale-$md5.json.\n\n\n\nWhen you set script translations for a handle WordPress will automatically figure out the relative md5 hash of your source file, check to see if a translations file exists and if so ensure that it\u2019s loaded into wp.i18n before your script runs.\n\n\n\nPlugin and theme support\n\n\n\nTranslation and Language packs support for plugins and themes that are hosted on the repo is expected in the upcoming weeks. The patches are ready and waiting for commit. Plugin and theme authors are encouraged to start using wp-i18n in their JavaScript projects.\n\n\n\nCredits\n\n\n\nThis APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. wouldn\u2019t have been possible without the long standing efforts of @ocean90, @swissspidy, @nerrad, @atimmer, @schlessera and more recently @herregroen. Thanks a ton for the incredible work you\u2019ve all put into making this a reality! Another thanks to @herregroen for providing the necessary input for this devnotedev note Each important change in WordPress Core is documented in a developers note, (usually called dev note). Good dev notes generally include a description of the change, the decision that led to this change, and a description of how developers are supposed to work with that change. Dev notes are published on Make\/Core blog during the beta phase of WordPress release cycle. Publishing dev notes is particularly important when plugin\/theme authors and WordPress developers need to be aware of those changes.In general, all dev notes are compiled into a Field Guide at the beginning of the release candidate phase..\n\n\n\n\n#5-0, #dev-notes, #i18nShare this:TwitterFacebook","permalink":"https:\/\/make.wordpress.org\/core\/2018\/11\/09\/new-javascript-i18n-support-in-wordpress\/","unixtime":1541767119,"unixtimeModified":1543839178,"entryHeaderMeta":"","linkPages":"","footerEntryMeta":"","tagsRaw":"5.0, dev-notes, i18n","tagsArray":["label":"5.0","count":36,"link":"https:\/\/make.wordpress.org\/core\/tag\/5-0\/","label":"dev-notes","count":453,"link":"https:\/\/make.wordpress.org\/core\/tag\/dev-notes\/","label":"i18n","count":26,"link":"https:\/\/make.wordpress.org\/core\/tag\/i18n\/"],"loginRedirectURL":"https:\/\/login.wordpress.org\/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcore%2F2018%2F11%2F09%2Fnew-javascript-i18n-support-in-wordpress%2F&locale=en_US","hasPrevPost":true,"prevPostTitle":"Dev Chat Summary: November 7th (5.0 Week 6)","prevPostURL":"https:\/\/make.wordpress.org\/core\/2018\/11\/08\/dev-chat-summary-november-7th-5-0-week-6\/","hasNextPost":true,"nextPostTitle":"5.0: JavaScript language packs are here \ud83c\udf89","nextPostURL":"https:\/\/make.wordpress.org\/core\/2018\/11\/09\/5-0-javascript-language-packs-are-here-%f0%9f%8e%89\/","commentsOpen":false,"is_xpost":false,"editURL":null,"postActions":"Post ActionsScrollShortlink","comments":["type":"comment","id":"34368","postID":"35124","postTitleRaw":"New! JavaScript i18n support in WordPress 5.0","cssClasses":"comment byuser comment-author-slaffik even thread-odd thread-alt depth-1","parentID":"0","contentRaw":"Is it a WordPress 5.0+ thing only? It's not clear from the post.","contentFiltered":"Is it a WordPress 5.0+ thing only? It\u2019s not clear from the post.\n","permalink":"https:\/\/make.wordpress.org\/core\/2018\/11\/09\/new-javascript-i18n-support-in-wordpress\/#comment-34368","unixtime":1541768174,"loginRedirectURL":"https:\/\/login.wordpress.org\/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcore%2F2018%2F11%2F09%2Fnew-javascript-i18n-support-in-wordpress%2F%23comment-34368&locale=en_US","approved":true,"isTrashed":false,"prevDeleted":"","editURL":null,"depth":1,"commentDropdownActions":"","commentFooterActions":"","commentTrashedActions":"Untrash","mentions":[],"mentionContext":"","commentCreated":"1541768174","hasChildren":false,"userLogin":"slaFFik","userNicename":"slaffik","type":"comment","id":"34369","postID":"35124","postTitleRaw":"New! JavaScript i18n support in WordPress 5.0","cssClasses":"comment byuser comment-author-omarreiss bypostauthor odd alt depth-2","parentID":"34368","contentRaw":"Thanks for asking! Yes, the built-in support is WordPress 5.0+. I've updated the title of the post accordingly.","contentFiltered":"Thanks for asking! Yes, the built-in support is WordPress 5.0+. I\u2019ve updated the title of the post accordingly.\n","permalink":"https:\/\/make.wordpress.org\/core\/2018\/11\/09\/new-javascript-i18n-support-in-wordpress\/#comment-34369","unixtime":1541769930,"loginRedirectURL":"https:\/\/login.wordpress.org\/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcore%2F2018%2F11%2F09%2Fnew-javascript-i18n-support-in-wordpress%2F%23comment-34369&locale=en_US","approved":true,"isTrashed":false,"prevDeleted":"","editURL":null,"depth":2,"commentDropdownActions":"","commentFooterActions":"","commentTrashedActions":"Untrash","mentions":[],"mentionContext":"","commentCreated":"1541769930","hasChildren":false,"userLogin":"omarreiss","userNicename":"omarreiss","type":"comment","id":"34371","postID":"35124","postTitleRaw":"New! JavaScript i18n support in WordPress 5.0","cssClasses":"comment byuser comment-author-realloc even thread-even depth-1","parentID":"0","contentRaw":"Great work! This is very exciting!","contentFiltered":"Great work! This is very exciting!\n","permalink":"https:\/\/make.wordpress.org\/core\/2018\/11\/09\/new-javascript-i18n-support-in-wordpress\/#comment-34371","unixtime":1541773361,"loginRedirectURL":"https:\/\/login.wordpress.org\/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcore%2F2018%2F11%2F09%2Fnew-javascript-i18n-support-in-wordpress%2F%23comment-34371&locale=en_US","approved":true,"isTrashed":false,"prevDeleted":"","editURL":null,"depth":1,"commentDropdownActions":"","commentFooterActions":"","commentTrashedActions":"Untrash","mentions":[],"mentionContext":"","commentCreated":"1541773361","hasChildren":false,"userLogin":"realloc","userNicename":"realloc","type":"comment","id":"34372","postID":"35124","postTitleRaw":"New! JavaScript i18n support in WordPress 5.0","cssClasses":"comment byuser comment-author-varunms odd alt thread-odd thread-alt depth-1","parentID":"0","contentRaw":"Exciting News :-)\n\nCan i bundle 'wp-i18n' script in my plugin to support WP Versions below 5.0 ?","contentFiltered":"Exciting News \ud83d\ude42\nCan i bundle \u2018wp-i18ni18n Internationalization, or the act of writing and preparing code to be fully translatable into other languages. Also see localization. Often written with a lowercase i so it is not confused with a lowercase L or the numeral 1. Often an acquired skill.\u2019 script in my pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https:\/\/wordpress.org\/plugins\/ or can be cost-based plugin from a third-party to support WP Versions below 5.0 ?\n","permalink":"https:\/\/make.wordpress.org\/core\/2018\/11\/09\/new-javascript-i18n-support-in-wordpress\/#comment-34372","unixtime":1541774053,"loginRedirectURL":"https:\/\/login.wordpress.org\/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcore%2F2018%2F11%2F09%2Fnew-javascript-i18n-support-in-wordpress%2F%23comment-34372&locale=en_US","approved":true,"isTrashed":false,"prevDeleted":"","editURL":null,"depth":1,"commentDropdownActions":"","commentFooterActions":"","commentTrashedActions":"Untrash","mentions":[],"mentionContext":"","commentCreated":"1541774053","hasChildren":false,"userLogin":"varunms","userNicename":"varunms","type":"comment","id":"34373","postID":"35124","postTitleRaw":"New! JavaScript i18n support in WordPress 5.0","cssClasses":"comment byuser comment-author-slaffik even depth-2","parentID":"34372","contentRaw":"No, because you need a core function wp_set_script_translations() that will appear in WordPress 5.0, unless you want to shim it on older WP versions.","contentFiltered":"No, because you need a coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. function wp_set_script_translations() that will appear in WordPress 5.0, unless you want to shim it on older WP versions.\n","permalink":"https:\/\/make.wordpress.org\/core\/2018\/11\/09\/new-javascript-i18n-support-in-wordpress\/#comment-34373","unixtime":1541780651,"loginRedirectURL":"https:\/\/login.wordpress.org\/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcore%2F2018%2F11%2F09%2Fnew-javascript-i18n-support-in-wordpress%2F%23comment-34373&locale=en_US","approved":true,"isTrashed":false,"prevDeleted":"","editURL":null,"depth":2,"commentDropdownActions":"","commentFooterActions":"","commentTrashedActions":"Untrash","mentions":[],"mentionContext":"","commentCreated":"1541780651","hasChildren":false,"userLogin":"slaFFik","userNicename":"slaffik","type":"comment","id":"34374","postID":"35124","postTitleRaw":"New! JavaScript i18n support in WordPress 5.0","cssClasses":"comment byuser comment-author-mattheweppelsheimer odd alt thread-even depth-1","parentID":"0","contentRaw":"This looks like a great engineering effort \u2014 congrats to those involved! \n\n@omarreiss Can you help explain when one would choose to use these new JS-native l18n functions in themes and plugins going forward (after 5.0 and into the future), and when one should instead use the `wp_localize_script()` workflow we\u2019ve had in core for a while? \n\nAre there inherent advantages of each? Will the older approach eventually be deprecated?","contentFiltered":"This looks like a great engineering effort \u2014 congrats to those involved! \n@omarreiss Can you help explain when one would choose to use these new JSJS JavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors.-native l18n functions in themes and plugins going forward (after 5.0 and into the future), and when one should instead use the `wp_localize_script()` workflow we\u2019ve had in coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. for a while? \nAre there inherent advantages of each? Will the older approach eventually be deprecated?\n","permalink":"https:\/\/make.wordpress.org\/core\/2018\/11\/09\/new-javascript-i18n-support-in-wordpress\/#comment-34374","unixtime":1541783747,"loginRedirectURL":"https:\/\/login.wordpress.org\/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcore%2F2018%2F11%2F09%2Fnew-javascript-i18n-support-in-wordpress%2F%23comment-34374&locale=en_US","approved":true,"isTrashed":false,"prevDeleted":"","editURL":null,"depth":1,"commentDropdownActions":"","commentFooterActions":"","commentTrashedActions":"Untrash","mentions":["omarreiss"],"mentionContext":"","commentCreated":"1541783747","hasChildren":false,"userLogin":"mattheweppelsheimer","userNicename":"mattheweppelsheimer","type":"comment","id":"34390","postID":"35124","postTitleRaw":"New! JavaScript i18n support in WordPress 5.0","cssClasses":"comment byuser comment-author-nerrad even depth-2","parentID":"34374","contentRaw":"There hasn't been any discussion about deprecating `wp_localize_script` and I can't see it happening in the foreseeable future. This work in core was mostly done to support using the new `wp.i18n` package because without this work, it's utility is diminished (and in fact necessary due to Gutenberg using `wp.i18n`).\n\nSo with that said, there's no urgency to switch away from using `wp_localize_script` but definitely recommended to gain the advantages of the new api and in many ways enhances working with translated strings in javascript.","contentFiltered":"There hasn\u2019t been any discussion about deprecating `wp_localize_script` and I can\u2019t see it happening in the foreseeable future. This work in coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. was mostly done to support using the new `wp.i18ni18n Internationalization, or the act of writing and preparing code to be fully translatable into other languages. Also see localization. Often written with a lowercase i so it is not confused with a lowercase L or the numeral 1. Often an acquired skill.` package because without this work, it\u2019s utility is diminished (and in fact necessary due to GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses \u2018blocks\u2019 to add richness rather than shortcodes, custom HTML etc. https:\/\/wordpress.org\/gutenberg\/ using `wp.i18n`).\nSo with that said, there\u2019s no urgency to switch away from using `wp_localize_script` but definitely recommended to gain the advantages of the new api and in many ways enhances working with translated strings in javascriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user\u2019s browser. https:\/\/www.javascript.com\/..\n","permalink":"https:\/\/make.wordpress.org\/core\/2018\/11\/09\/new-javascript-i18n-support-in-wordpress\/#comment-34390","unixtime":1541860546,"loginRedirectURL":"https:\/\/login.wordpress.org\/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcore%2F2018%2F11%2F09%2Fnew-javascript-i18n-support-in-wordpress%2F%23comment-34390&locale=en_US","approved":true,"isTrashed":false,"prevDeleted":"","editURL":null,"depth":2,"commentDropdownActions":"","commentFooterActions":"","commentTrashedActions":"Untrash","mentions":[],"mentionContext":"","commentCreated":"1541860546","hasChildren":false,"userLogin":"nerrad","userNicename":"nerrad","type":"comment","id":"34405","postID":"35124","postTitleRaw":"New! JavaScript i18n support in WordPress 5.0","cssClasses":"comment byuser comment-author-omarreiss bypostauthor odd alt depth-2","parentID":"34372","contentRaw":"It's true that you won't be able to rely on wp_set_script_translations for older versions of WP unless you backport it. However, some plugins (including Yoast SEO) already ship JavaScript translations for quite some time. In the end it's a matter of having the JSON translations available when you initialize wp-i18n. \n\nWith Yoast we currently use wp_localize_script to get the translations on the page and use a helper in the JS to load the translations, see https:\/\/github.com\/Yoast\/wordpress-seo\/blob\/c77e5b14bf0370f30043d02c0e3f8222a7a2c2ac\/js\/src\/helpers\/i18n.js \n\nWe will probably move over to the new core implementation though once 5.0 lands. I think we'll go with the backport over our current implementation, because it's future compatible and gives the benefit of JS language packs. \n\nWhen you choose to backport, please check if the functions you're backporting weren't set already in order to not collide with other plugins who might want to do the same thing. Might seem superfluous, but I've seen that go wrong more than once.","contentFiltered":"It\u2019s true that you won\u2019t be able to rely on wp_set_script_translations for older versions of WP unless you backportbackport A port is when code from one branch (or trunk) is merged into another branch or trunk. Some changes in WordPress point releases are the result of backporting code from trunk to the release branch. it. However, some plugins (including Yoast SEO) already ship JavaScriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user\u2019s browser. https:\/\/www.javascript.com\/. translations for quite some time. In the end it\u2019s a matter of having the JSONJSON JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. translations available when you initialize wp-i18ni18n Internationalization, or the act of writing and preparing code to be fully translatable into other languages. Also see localization. Often written with a lowercase i so it is not confused with a lowercase L or the numeral 1. Often an acquired skill.. \nWith Yoast we currently use wp_localize_script to get the translations on the page and use a helper in the JSJS JavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors. to load the translations, see https:\/\/github.com\/Yoast\/wordpress-seo\/blob\/c77e5b14bf0370f30043d02c0e3f8222a7a2c2ac\/js\/src\/helpers\/i18n.js \nWe will probably move over to the new coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. implementation though once 5.0 lands. I think we\u2019ll go with the backport over our current implementation, because it\u2019s future compatible and gives the benefit of JS language packs. \nWhen you choose to backport, please check if the functions you\u2019re backporting weren\u2019t set already in order to not collide with other plugins who might want to do the same thing. Might seem superfluous, but I\u2019ve seen that go wrong more than once.\n","permalink":"https:\/\/make.wordpress.org\/core\/2018\/11\/09\/new-javascript-i18n-support-in-wordpress\/#comment-34405","unixtime":1542019528,"loginRedirectURL":"https:\/\/login.wordpress.org\/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcore%2F2018%2F11%2F09%2Fnew-javascript-i18n-support-in-wordpress%2F%23comment-34405&locale=en_US","approved":true,"isTrashed":false,"prevDeleted":"","editURL":null,"depth":2,"commentDropdownActions":"","commentFooterActions":"","commentTrashedActions":"Untrash","mentions":[],"mentionContext":"","commentCreated":"1542019528","hasChildren":false,"userLogin":"omarreiss","userNicename":"omarreiss","type":"comment","id":"34522","postID":"35124","postTitleRaw":"New! JavaScript i18n support in WordPress 5.0","cssClasses":"comment byuser comment-author-swissspidy even depth-2","parentID":"34374","contentRaw":"One big advantage of this new JS I18N API is that your translatable strings are now part of the code and not in some PHP file.\n\nThis means:\n\n* You can use proper plural forms using `_n()` and `sprintf()`, which is currently not possible with `wp_localize_script()`\n* Developers don't have to go back and forth between PHP and JS to find out what kind of message `_myI18nData.someStuff.messageXY` is. Now it's just `__()` everywhere.-\n* It's much better for translators because they now have the necessary context regarding usage of a string. With `wp_localize_script()` one doesn't really know where in the application a specific message would pop up.","contentFiltered":"One big advantage of this new JSJS JavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors. I18Ni18n Internationalization, or the act of writing and preparing code to be fully translatable into other languages. Also see localization. Often written with a lowercase i so it is not confused with a lowercase L or the numeral 1. Often an acquired skill. APIAPI An API or Application Programming Interface is a software intermediary that allows programs to interact with each other and share data in limited, clearly defined ways. is that your translatable strings are now part of the code and not in some PHPPHP The web scripting language in which WordPress is primarily architected. WordPress requires PHP 5.6.20 or higher file.\nThis means:\n\nYou can use proper plural forms using `_n()` and `sprintf()`, which is currently not possible with `wp_localize_script()`\n\nDevelopers don\u2019t have to go back and forth between PHP and JS to find out what kind of message `_myI18nData.someStuff.messageXY` is. Now it\u2019s just `__()` everywhere.-\n\nIt\u2019s much better for translators because they now have the necessary context regarding usage of a string. With `wp_localize_script()` one doesn\u2019t really know where in the application a specific message would pop up.\n\n\n","permalink":"https:\/\/make.wordpress.org\/core\/2018\/11\/09\/new-javascript-i18n-support-in-wordpress\/#comment-34522","unixtime":1543063955,"loginRedirectURL":"https:\/\/login.wordpress.org\/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcore%2F2018%2F11%2F09%2Fnew-javascript-i18n-support-in-wordpress%2F%23comment-34522&locale=en_US","approved":true,"isTrashed":false,"prevDeleted":"","editURL":null,"depth":2,"commentDropdownActions":"","commentFooterActions":"","commentTrashedActions":"Untrash","mentions":[],"mentionContext":"","commentCreated":"1543063955","hasChildren":false,"userLogin":"swissspidy","userNicename":"swissspidy","type":"comment","id":"34530","postID":"35124","postTitleRaw":"New! JavaScript i18n support in WordPress 5.0","cssClasses":"comment byuser comment-author-felipeelia odd alt thread-odd thread-alt depth-1","parentID":"0","contentRaw":"Hey folks! I don't know if I did something wrong, but these were a couple of things I had to figure out to make the JS translation work:\n\n1. The plugin must have a Text Domain set, otherwise wp i18n make-pot command won't search through javascript files;\n2. When using wp_set_script_translations, remember that plugin_dir_path function already adds a trailings slash to it, so you can use it like this wp_set_script_translations( 'my-handle', 'my-domain', plugin_dir_path( __FILE__ ) . 'languages' ); (in opposite of concatenating it with '\/languages'.\n3. Using the last version of po2json, installed globally through npm, I've used po2json DOMAIN-LOCALE.po DOMAIN-LOCALE-HANDLER.json -p --format jed to generate the .json file correctly.\n\nThanks and congrats!","contentFiltered":"Hey folks! I don\u2019t know if I did something wrong, but these were a couple of things I had to figure out to make the JSJS JavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors. translationtranslation The process (or result) of changing text, words, and display formatting to support another language. Also see localization, internationalization. work:\n1. The pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https:\/\/wordpress.org\/plugins\/ or can be cost-based plugin from a third-party must have a Text Domain set, otherwise wp i18n make-pot command won\u2019t search through javascriptJavaScript JavaScript or JS is an object-oriented computer programming language commonly used to create interactive effects within web browsers. WordPress makes extensive use of JS for a better user experience. While PHP is executed on the server, JS executes within a user\u2019s browser. https:\/\/www.javascript.com\/. files;\n2. When using wp_set_script_translations, remember that plugin_dir_path function already adds a trailings slash to it, so you can use it like this wp_set_script_translations( 'my-handle', 'my-domain', plugin_dir_path( __FILE__ ) . 'languages' ); (in opposite of concatenating it with '\/languages'.\n3. Using the last version of po2json, installed globally through npm, I\u2019ve used po2json DOMAIN-LOCALE.po DOMAIN-LOCALE-HANDLER.json -p --format jed to generate the .jsonJSON JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. file correctly.\nThanks and congrats!\n","permalink":"https:\/\/make.wordpress.org\/core\/2018\/11\/09\/new-javascript-i18n-support-in-wordpress\/#comment-34530","unixtime":1543340066,"loginRedirectURL":"https:\/\/login.wordpress.org\/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcore%2F2018%2F11%2F09%2Fnew-javascript-i18n-support-in-wordpress%2F%23comment-34530&locale=en_US","approved":true,"isTrashed":false,"prevDeleted":"","editURL":null,"depth":1,"commentDropdownActions":"","commentFooterActions":"","commentTrashedActions":"Untrash","mentions":[],"mentionContext":"","commentCreated":"1543340066","hasChildren":false,"userLogin":"felipeelia","userNicename":"felipeelia","type":"comment","id":"34551","postID":"35124","postTitleRaw":"New! JavaScript i18n support in WordPress 5.0","cssClasses":"comment byuser comment-author-strategio even thread-even depth-1","parentID":"0","contentRaw":"Thanks Felipe for your message, but unfortunately I saw this a bit late. I have been struggling with the command po2json translation.po translation.json -f jed1.x shown in the blog post is giving an incorrect format for the JED file.\n\nFinally, I found out that the right one is simply po2json translation.po translation.json -f jed (as you mentioned).\n\n@omarreiss, could you please update your text, it might save some time for other people :)","contentFiltered":"Thanks Felipe for your message, but unfortunately I saw this a bit late. I have been struggling with the command po2json translation.po translation.json -f jed1.x shown in the blogblog (versus network, site) post is giving an incorrect format for the JED file.\nFinally, I found out that the right one is simply po2json translation.po translation.json -f jed (as you mentioned).\n@omarreiss, could you please update your text, it might save some time for other people \ud83d\ude42\n","permalink":"https:\/\/make.wordpress.org\/core\/2018\/11\/09\/new-javascript-i18n-support-in-wordpress\/#comment-34551","unixtime":1543599287,"loginRedirectURL":"https:\/\/login.wordpress.org\/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcore%2F2018%2F11%2F09%2Fnew-javascript-i18n-support-in-wordpress%2F%23comment-34551&locale=en_US","approved":true,"isTrashed":false,"prevDeleted":"","editURL":null,"depth":1,"commentDropdownActions":"","commentFooterActions":"","commentTrashedActions":"Untrash","mentions":["omarreiss"],"mentionContext":"","commentCreated":"1543599287","hasChildren":false,"userLogin":"strategio","userNicename":"strategio","type":"comment","id":"34561","postID":"35124","postTitleRaw":"New! JavaScript i18n support in WordPress 5.0","cssClasses":"comment byuser comment-author-gsexton odd alt thread-odd thread-alt depth-1","parentID":"0","contentRaw":"There's an error here. The code:\n\npo2json translation.po translation.json -f jed1.x\n\nshould be:\n\npo2json translation.po translation.json -f jed\n\nI pulled the latest po2json from github, and if you do --help, jed1.x isn't a format. If you specify jed1.x you get jedold, where the singular is null, and the caption is in the plural block.","contentFiltered":"There\u2019s an error here. The code:\npo2json translation.po translation.jsonJSON JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. -f jed1.x\nshould be:\npo2json translation.po translation.json -f jed\nI pulled the latest po2json from githubGitHub GitHub is a website that offers online implementation of git repositories that can easily be shared, copied and modified by other developers. Public repositories are free to host, private repositories require a paid subscription. GitHub introduced the concept of the \u2018pull request\u2019 where code changes done in branches by contributors can be reviewed and discussed before being merged be the repository owner. https:\/\/github.com\/, and if you do \u2013help, jed1.x isn\u2019t a format. If you specify jed1.x you get jedold, where the singular is null, and the caption is in the plural blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience..\n","permalink":"https:\/\/make.wordpress.org\/core\/2018\/11\/09\/new-javascript-i18n-support-in-wordpress\/#comment-34561","unixtime":1543696544,"loginRedirectURL":"https:\/\/login.wordpress.org\/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcore%2F2018%2F11%2F09%2Fnew-javascript-i18n-support-in-wordpress%2F%23comment-34561&locale=en_US","approved":true,"isTrashed":false,"prevDeleted":"","editURL":null,"depth":1,"commentDropdownActions":"","commentFooterActions":"","commentTrashedActions":"Untrash","mentions":[],"mentionContext":"","commentCreated":"1543696544","hasChildren":false,"userLogin":"gsexton","userNicename":"gsexton","type":"comment","id":"34567","postID":"35124","postTitleRaw":"New! JavaScript i18n support in WordPress 5.0","cssClasses":"comment byuser comment-author-omarreiss bypostauthor even depth-2","parentID":"34530","contentRaw":"Thanks Felipe, those are some good points! I've updated the post with your additions.","contentFiltered":"Thanks Felipe, those are some good points! I\u2019ve updated the post with your additions.\n","permalink":"https:\/\/make.wordpress.org\/core\/2018\/11\/09\/new-javascript-i18n-support-in-wordpress\/#comment-34567","unixtime":1543839256,"loginRedirectURL":"https:\/\/login.wordpress.org\/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcore%2F2018%2F11%2F09%2Fnew-javascript-i18n-support-in-wordpress%2F%23comment-34567&locale=en_US","approved":true,"isTrashed":false,"prevDeleted":"","editURL":null,"depth":2,"commentDropdownActions":"","commentFooterActions":"","commentTrashedActions":"Untrash","mentions":[],"mentionContext":"","commentCreated":"1543839256","hasChildren":false,"userLogin":"omarreiss","userNicename":"omarreiss","type":"comment","id":"34568","postID":"35124","postTitleRaw":"New! JavaScript i18n support in WordPress 5.0","cssClasses":"comment byuser comment-author-omarreiss bypostauthor odd alt depth-2","parentID":"34561","contentRaw":"Thanks George, I've updated the example accordingly.","contentFiltered":"Thanks George, I\u2019ve updated the example accordingly.\n","permalink":"https:\/\/make.wordpress.org\/core\/2018\/11\/09\/new-javascript-i18n-support-in-wordpress\/#comment-34568","unixtime":1543839276,"loginRedirectURL":"https:\/\/login.wordpress.org\/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcore%2F2018%2F11%2F09%2Fnew-javascript-i18n-support-in-wordpress%2F%23comment-34568&locale=en_US","approved":true,"isTrashed":false,"prevDeleted":"","editURL":null,"depth":2,"commentDropdownActions":"","commentFooterActions":"","commentTrashedActions":"Untrash","mentions":[],"mentionContext":"","commentCreated":"1543839276","hasChildren":false,"userLogin":"omarreiss","userNicename":"omarreiss","type":"comment","id":"34569","postID":"35124","postTitleRaw":"New! JavaScript i18n support in WordPress 5.0","cssClasses":"comment byuser comment-author-omarreiss bypostauthor even depth-2","parentID":"34551","contentRaw":"Done!","contentFiltered":"Done!\n","permalink":"https:\/\/make.wordpress.org\/core\/2018\/11\/09\/new-javascript-i18n-support-in-wordpress\/#comment-34569","unixtime":1543839297,"loginRedirectURL":"https:\/\/login.wordpress.org\/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcore%2F2018%2F11%2F09%2Fnew-javascript-i18n-support-in-wordpress%2F%23comment-34569&locale=en_US","approved":true,"isTrashed":false,"prevDeleted":"","editURL":null,"depth":2,"commentDropdownActions":"","commentFooterActions":"","commentTrashedActions":"Untrash","mentions":[],"mentionContext":"","commentCreated":"1543839297","hasChildren":false,"userLogin":"omarreiss","userNicename":"omarreiss","type":"comment","id":"35069","postID":"35124","postTitleRaw":"New! JavaScript i18n support in WordPress 5.0","cssClasses":"comment byuser comment-author-webliberty odd alt thread-even depth-1","parentID":"0","contentRaw":"The function wp_set_script_translations( 'my-handle', 'my-domain' ); does not work properly, is it possible to see somewhere an example of a block for WordPress 5.0 with its use?","contentFiltered":"The function wp_set_script_translations( 'my-handle', 'my-domain' ); does not work properly, is it possible to see somewhere an example of a blockBlock Block is the abstract term used to describe units of markup that, composed together, form the content or layout of a webpage using the WordPress editor. The idea combines concepts of what in the past may have achieved with shortcodes, custom HTML, and embed discovery into a single consistent API and user experience. for WordPress 5.0 with its use?\n","permalink":"https:\/\/make.wordpress.org\/core\/2018\/11\/09\/new-javascript-i18n-support-in-wordpress\/#comment-35069","unixtime":1544874613,"loginRedirectURL":"https:\/\/login.wordpress.org\/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcore%2F2018%2F11%2F09%2Fnew-javascript-i18n-support-in-wordpress%2F%23comment-35069&locale=en_US","approved":true,"isTrashed":false,"prevDeleted":"","editURL":null,"depth":1,"commentDropdownActions":"","commentFooterActions":"","commentTrashedActions":"Untrash","mentions":[],"mentionContext":"","commentCreated":"1544874613","hasChildren":false,"userLogin":"webliberty","userNicename":"webliberty","type":"comment","id":"35119","postID":"35124","postTitleRaw":"New! JavaScript i18n support in WordPress 5.0","cssClasses":"comment byuser comment-author-eclare even thread-odd thread-alt depth-1","parentID":"0","contentRaw":"If the json file name is generated based on the relative file path, won't this break the translations if someone changed the wp-content directory name for security purposes?","contentFiltered":"If the jsonJSON JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. file name is generated based on the relative file path, won\u2019t this break the translations if someone changed the wp-content directory name for security purposes?\n","permalink":"https:\/\/make.wordpress.org\/core\/2018\/11\/09\/new-javascript-i18n-support-in-wordpress\/#comment-35119","unixtime":1545221100,"loginRedirectURL":"https:\/\/login.wordpress.org\/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcore%2F2018%2F11%2F09%2Fnew-javascript-i18n-support-in-wordpress%2F%23comment-35119&locale=en_US","approved":true,"isTrashed":false,"prevDeleted":"","editURL":null,"depth":1,"commentDropdownActions":"","commentFooterActions":"","commentTrashedActions":"Untrash","mentions":[],"mentionContext":"","commentCreated":"1545221100","hasChildren":false,"userLogin":"eclare","userNicename":"eclare","type":"comment","id":"35123","postID":"35124","postTitleRaw":"New! JavaScript i18n support in WordPress 5.0","cssClasses":"comment byuser comment-author-herregroen odd alt depth-2","parentID":"35119","contentRaw":"For plugins and themes the relative path is relative to the plugin or theme itself, so changing the wp-content directory poses no issue there. Since the JSON file name also includes the plugin\/theme domain which is required to be unique this is sufficient to create unique file names.","contentFiltered":"For plugins and themes the relative path is relative to the pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https:\/\/wordpress.org\/plugins\/ or can be cost-based plugin from a third-party or theme itself, so changing the wp-content directory poses no issue there. Since the JSONJSON JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. file name also includes the plugin\/theme domain which is required to be unique this is sufficient to create unique file names.\n","permalink":"https:\/\/make.wordpress.org\/core\/2018\/11\/09\/new-javascript-i18n-support-in-wordpress\/#comment-35123","unixtime":1545227777,"loginRedirectURL":"https:\/\/login.wordpress.org\/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcore%2F2018%2F11%2F09%2Fnew-javascript-i18n-support-in-wordpress%2F%23comment-35123&locale=en_US","approved":true,"isTrashed":false,"prevDeleted":"","editURL":null,"depth":2,"commentDropdownActions":"","commentFooterActions":"","commentTrashedActions":"Untrash","mentions":[],"mentionContext":"","commentCreated":"1545227777","hasChildren":false,"userLogin":"herregroen","userNicename":"herregroen","type":"comment","id":"35162","postID":"35124","postTitleRaw":"New! JavaScript i18n support in WordPress 5.0","cssClasses":"comment byuser comment-author-nida78 even thread-even depth-1","parentID":"0","contentRaw":"Is this already working for \/ with the current version of WP (5.0.2)? I just updated one of my plugins in the repository and the JS strings are printed out without any error but without any translation, too!","contentFiltered":"Is this already working for \/ with the current version of WP (5.0.2)? I just updated one of my plugins in the repository and the JSJS JavaScript, a web scripting language typically executed in the browser. Often used for advanced user interfaces and behaviors. strings are printed out without any error but without any translationtranslation The process (or result) of changing text, words, and display formatting to support another language. Also see localization, internationalization., too!\n","permalink":"https:\/\/make.wordpress.org\/core\/2018\/11\/09\/new-javascript-i18n-support-in-wordpress\/#comment-35162","unixtime":1546378958,"loginRedirectURL":"https:\/\/login.wordpress.org\/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcore%2F2018%2F11%2F09%2Fnew-javascript-i18n-support-in-wordpress%2F%23comment-35162&locale=en_US","approved":true,"isTrashed":false,"prevDeleted":"","editURL":null,"depth":1,"commentDropdownActions":"","commentFooterActions":"","commentTrashedActions":"Untrash","mentions":[],"mentionContext":"","commentCreated":"1546378958","hasChildren":false,"userLogin":"nida78","userNicename":"nida78","type":"comment","id":"35182","postID":"35124","postTitleRaw":"New! JavaScript i18n support in WordPress 5.0","cssClasses":"comment byuser comment-author-nida78 odd alt depth-2","parentID":"35162","contentRaw":"Thanks to @herregroen for the chat on Slack! The new system works in general but there seams to be a bug by generating the .json files by wordpress.org! If I build them manualy and put them into the right directory everything works fine :)","contentFiltered":"Thanks to @herregroen for the chat on SlackSlack Slack is a Collaborative Group Chat Platform https:\/\/slack.com\/. The WordPress community has its own Slack Channel at https:\/\/make.wordpress.org\/chat\/.! The new system works in general but there seams to be a bugbug A bug is an error or unexpected result. Performance improvements, code optimization, and are considered enhancements, not defects. After feature freeze, only bugs are dealt with, with regressions (adverse changes from the previous version) being the highest priority. by generating the .jsonJSON JSON, or JavaScript Object Notation, is a minimal, readable format for structuring data. It is used primarily to transmit data between a server and web application, as an alternative to XML. files by wordpress.orgWordPress.org The community site where WordPress code is created and shared by the users. This is where you can download the source code for WordPress core, plugins and themes as well as the central location for community conversations and organization. https:\/\/wordpress.org\/! If I build them manualy and put them into the right directory everything works fine \ud83d\ude42\n","permalink":"https:\/\/make.wordpress.org\/core\/2018\/11\/09\/new-javascript-i18n-support-in-wordpress\/#comment-35182","unixtime":1546637823,"loginRedirectURL":"https:\/\/login.wordpress.org\/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcore%2F2018%2F11%2F09%2Fnew-javascript-i18n-support-in-wordpress%2F%23comment-35182&locale=en_US","approved":true,"isTrashed":false,"prevDeleted":"","editURL":null,"depth":2,"commentDropdownActions":"","commentFooterActions":"","commentTrashedActions":"Untrash","mentions":["herregroen"],"mentionContext":"","commentCreated":"1546637823","hasChildren":false,"userLogin":"nida78","userNicename":"nida78","type":"comment","id":"35367","postID":"35124","postTitleRaw":"New! JavaScript i18n support in WordPress 5.0","cssClasses":"comment byuser comment-author-drozdz even thread-odd thread-alt depth-1","parentID":"0","contentRaw":"OK... I'm starting to hate it... \n\nOne of the greatest things in WP is that you can write a plugin and change all the strings you want. Either there is a filter that will allow you to do it, or as last resort, you can use `gettext` filter...\n\nBut of course... There is no consistency with Gutenberg, so why should there be consistency when we think of translations... \n\nSo again, we came to point that it's impossible to use dynamic texts in this case.\n\nAnd why should you? Well, here's a great use-case:\nhttps:\/\/wordpress.stackexchange.com\/questions\/328121\/changing-text-within-the-block-editor\/\n\nSo instead of \"When you\u2019re ready, submit your work for review, and an Editor will be able to approve it for you.\" text, you want to display \"These users will help you\" and the list of users.\n\nSo yeah... Good luck, I guess...\n\nAnd the best part of WP - it's flexibility dies on our eyes....","contentFiltered":"OK\u2026 I\u2019m starting to hate it\u2026 \nOne of the greatest things in WP is that you can write a pluginPlugin A plugin is a piece of software containing a group of functions that can be added to a WordPress website. They can extend functionality or add new features to your WordPress websites. WordPress plugins are written in the PHP programming language and integrate seamlessly with WordPress. These can be free in the WordPress.org Plugin Directory https:\/\/wordpress.org\/plugins\/ or can be cost-based plugin from a third-party and change all the strings you want. Either there is a filterFilter Filters are one of the two types of Hooks https:\/\/codex.wordpress.org\/Plugin_API\/Hooks. They provide a way for functions to modify data of other functions. They are the counterpart to Actions. Unlike Actions, filters are meant to work in an isolated manner, and should never have side effects such as affecting global variables and output. that will allow you to do it, or as last resort, you can use `gettext` filter\u2026\nBut of course\u2026 There is no consistency with GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses \u2018blocks\u2019 to add richness rather than shortcodes, custom HTML etc. https:\/\/wordpress.org\/gutenberg\/, so why should there be consistency when we think of translations\u2026 \nSo again, we came to point that it\u2019s impossible to use dynamic texts in this case.\nAnd why should you? Well, here\u2019s a great use-case:\nhttps:\/\/wordpress.stackexchange.com\/questions\/328121\/changing-text-within-the-block-editor\/\nSo instead of \u201cWhen you\u2019re ready, submit your work for review, and an Editor will be able to approve it for you.\u201d text, you want to display \u201cThese users will help you\u201d and the list of users.\nSo yeah\u2026 Good luck, I guess\u2026\nAnd the best part of WP \u2013 it\u2019s flexibility dies on our eyes\u2026.\n","permalink":"https:\/\/make.wordpress.org\/core\/2018\/11\/09\/new-javascript-i18n-support-in-wordpress\/#comment-35367","unixtime":1549926782,"loginRedirectURL":"https:\/\/login.wordpress.org\/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcore%2F2018%2F11%2F09%2Fnew-javascript-i18n-support-in-wordpress%2F%23comment-35367&locale=en_US","approved":true,"isTrashed":false,"prevDeleted":"","editURL":null,"depth":1,"commentDropdownActions":"","commentFooterActions":"","commentTrashedActions":"Untrash","mentions":[],"mentionContext":"","commentCreated":"1549926782","hasChildren":false,"userLogin":"drozdz","userNicename":"drozdz","type":"comment","id":"35368","postID":"35124","postTitleRaw":"New! JavaScript i18n support in WordPress 5.0","cssClasses":"comment byuser comment-author-omarreiss bypostauthor odd alt depth-2","parentID":"35367","contentRaw":"Hi Krzysiek, I understand your frustration and I'm sorry you got hit by some inflexibility you've encountered in the system. Please assume no bad intention on behalf of the people making WordPress and engage in constructive and civilized discussion.\n\nYou are right about the inconsistency. It was discovered by WordPress core developers as well and solutions have been added and some discussion is still ongoing. @swissspidy wrote about it here: https:\/\/pascalbirchler.com\/internationalization-in-wordpress-5-0\/ (scroll to the section about hooks and filters)\n\nHe explains that there are currently 3 filters available.\n[code]pre_load_script_translations[\/code] Pre-filters script translations for the given file, script handle and text domain. This way you can short-circuit the script translation logic to return your own translations.\n[code]load_script_translation_file[\/code] Filters the file path for loading script translations for the given script handle and text domain..\n[code]load_script_translations[\/code] Filters script translations for the given file, script handle and text domain. This way you can override translations after they have been loaded from the translation file.\n\nIf I understand correctly, this should technically allow you to do the things you want to do.\n\nThere is still a PR open on Gutenberg to discuss also adding filters to the gettext functions. See https:\/\/github.com\/WordPress\/gutenberg\/pull\/12517. There are some performance drawbacks that are mentioned in there that make us hesitant to do that. Please feel free to add your perspective to the discussion there.","contentFiltered":"Hi Krzysiek, I understand your frustration and I\u2019m sorry you got hit by some inflexibility you\u2019ve encountered in the system. Please assume no bad intention on behalf of the people making WordPress and engage in constructive and civilized discussion.\nYou are right about the inconsistency. It was discovered by WordPress coreCore Core is the set of software required to run WordPress. The Core Development Team builds WordPress. developers as well and solutions have been added and some discussion is still ongoing. @swissspidy wrote about it here: https:\/\/pascalbirchler.com\/internationalization-in-wordpress-5-0\/ (scroll to the section about hooksHooks In WordPress theme and development, hooks are functions that can be applied to an action or a Filter in WordPress. Actions are functions performed when a certain event occurs in WordPress. Filters allow you to modify certain functions. Arguments used to hook both filters and actions look the same. and filters)\nHe explains that there are currently 3 filters available.\n\n\npre_load_script_translations\n Pre-filters script translations for the given file, script handle and text domain. This way you can short-circuit the script translationtranslation The process (or result) of changing text, words, and display formatting to support another language. Also see localization, internationalization. logic to return your own translations.\nload_script_translation_file\n Filters the file path for loading script translations for the given script handle and text domain..\nload_script_translations\n Filters script translations for the given file, script handle and text domain. This way you can override translations after they have been loaded from the translation file.\nIf I understand correctly, this should technically allow you to do the things you want to do.\nThere is still a PR open on GutenbergGutenberg The Gutenberg project is the new Editor Interface for WordPress. The editor improves the process and experience of creating new content, making writing rich content much simpler. It uses \u2018blocks\u2019 to add richness rather than shortcodes, custom HTML etc. https:\/\/wordpress.org\/gutenberg\/ to discuss also adding filters to the gettext functions. See https:\/\/github.com\/WordPress\/gutenberg\/pull\/12517. There are some performance drawbacks that are mentioned in there that make us hesitant to do that. Please feel free to add your perspective to the discussion there.\n","permalink":"https:\/\/make.wordpress.org\/core\/2018\/11\/09\/new-javascript-i18n-support-in-wordpress\/#comment-35368","unixtime":1549967291,"loginRedirectURL":"https:\/\/login.wordpress.org\/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcore%2F2018%2F11%2F09%2Fnew-javascript-i18n-support-in-wordpress%2F%23comment-35368&locale=en_US","approved":true,"isTrashed":false,"prevDeleted":"","editURL":null,"depth":2,"commentDropdownActions":"","commentFooterActions":"","commentTrashedActions":"Untrash","mentions":["swissspidy"],"mentionContext":"","commentCreated":"1549967291","hasChildren":false,"userLogin":"omarreiss","userNicename":"omarreiss","type":"comment","id":"35369","postID":"35124","postTitleRaw":"New! JavaScript i18n support in WordPress 5.0","cssClasses":"comment byuser comment-author-drozdz even depth-3","parentID":"35368","contentRaw":"I don't assume bad intentions. But it's really hard not to assume a really bad job with this 5.0 branch...\n\nIt's here for 2 months now and there are a lot of inconsistencies that are harming WP flexibility. Many features are completely ignoring previous WP standards. The documentation is very poor or non-existent... (why do you have to link some external sites of WP enthusiasts in here and not send me to proper page on Codex or WP Dev Ref?)","contentFiltered":"I don\u2019t assume bad intentions. But it\u2019s really hard not to assume a really bad job with this 5.0 branchbranch A directory in Subversion. WordPress uses branches to store the latest development code for each major release (3.9, 4.0, etc.). Branches are then updated with code for any minor releases of that branch. Sometimes, a major version of WordPress and its minor versions are collectively referred to as a \"branch\", such as \"the 4.0 branch\".\u2026\nIt\u2019s here for 2 months now and there are a lot of inconsistencies that are harming WP flexibility. Many features are completely ignoring previous WP standards. The documentation is very poor or non-existent\u2026 (why do you have to link some external sites of WP enthusiasts in here and not send me to proper page on Codex or WP Dev Ref?)\n","permalink":"https:\/\/make.wordpress.org\/core\/2018\/11\/09\/new-javascript-i18n-support-in-wordpress\/#comment-35369","unixtime":1549968393,"loginRedirectURL":"https:\/\/login.wordpress.org\/?redirect_to=https%3A%2F%2Fmake.wordpress.org%2Fcore%2F2018%2F11%2F09%2Fnew-javascript-i18n-support-in-wordpress%2F%23comment-35369&locale=en_US","approved":true,"isTrashed":false,"prevDeleted":"","editURL":null,"depth":3,"commentDropdownActions":"","commentFooterActions":"","commentTrashedActions":"Untrash","mentions":[],"mentionContext":"","commentCreated":"1549968393","hasChildren":false,"userLogin":"drozdz","userNicename":"drozdz",{"type":"comment","id":"35509","postID":"35124","postTitleRaw":"New! JavaScript i18n support in WordPress 5.0","cssClasses":"comment byuser comment-author-2winfactor odd alt depth-2","parentID":"34372","contentRaw":"Thanks for sharing that source @omarreiss!\n\nAnyone looking to do this, I did a quick write up of how to do this with WordPress 2ff7e9595c
Comments