Generate pot file from the converse-no-dependencies
build
This is a workaround for the fact that getttext doesn't support ES2015 template literals and it also allows us to scan for translateable strings in our HTML templates.
This commit is contained in:
parent
92af05d510
commit
3d53943f49
6
Makefile
6
Makefile
|
@ -61,10 +61,10 @@ serve_bg: dev
|
|||
########################################################################
|
||||
## Translation machinery
|
||||
|
||||
GETTEXT = xgettext --language="JavaScript" --keyword=__ --keyword=___ --from-code=UTF-8 --output=locale/converse.pot src/*.js --package-name=Converse.js --copyright-holder="Jan-Carel Brand" --package-version=3.2.1 -c
|
||||
GETTEXT = xgettext --language="JavaScript" --keyword=__ --keyword=___ --from-code=UTF-8 --output=locale/converse.pot dist/converse-no-dependencies.js --package-name=Converse.js --copyright-holder="Jan-Carel Brand" --package-version=3.2.1 -c
|
||||
|
||||
.PHONY: pot
|
||||
pot:
|
||||
pot: dist/converse-no-dependencies.js
|
||||
$(GETTEXT) 2>&1 > /dev/null; exit $$?;
|
||||
|
||||
.PHONY: po
|
||||
|
@ -189,7 +189,7 @@ dist/converse-no-jquery.js: transpile src locale node_modules *.js
|
|||
dist/converse-no-jquery.min.js: src locale node_modules *.js transpile
|
||||
$(RJS) -o src/build.js include=converse wrap.endFile=end-no-jquery.frag exclude=jquery exclude=jquery.noconflict out=dist/converse-no-jquery.min.js
|
||||
dist/converse-no-dependencies.js: transpile src locale node_modules *.js
|
||||
$(RJS) -o src/build-no-dependencies.js optimize=none out=dist/converse-no-dependencies.min.js
|
||||
$(RJS) -o src/build-no-dependencies.js optimize=none out=dist/converse-no-dependencies.js
|
||||
dist/converse-no-dependencies.min.js: src locale node_modules *.js
|
||||
$(RJS) -o src/build-no-dependencies.js out=dist/converse-no-dependencies.min.js
|
||||
dist/converse-mobile.js: transpile src locale node_modules *.js
|
||||
|
|
5828
dist/converse-no-dependencies.js
vendored
5828
dist/converse-no-dependencies.js
vendored
File diff suppressed because one or more lines are too long
3631
dist/converse.js
vendored
3631
dist/converse.js
vendored
File diff suppressed because it is too large
Load Diff
1004
locale/converse.pot
1004
locale/converse.pot
File diff suppressed because it is too large
Load Diff
|
@ -26,7 +26,6 @@
|
|||
"tpl!search_contact",
|
||||
"tpl!status_option",
|
||||
"tpl!spinner",
|
||||
"tpl!login_feedback",
|
||||
"converse-chatview",
|
||||
"converse-rosterview"
|
||||
], factory);
|
||||
|
@ -50,7 +49,6 @@
|
|||
tpl_search_contact,
|
||||
tpl_status_option,
|
||||
tpl_spinner,
|
||||
tpl_login_feedback
|
||||
) {
|
||||
"use strict";
|
||||
|
||||
|
@ -768,17 +766,19 @@
|
|||
searchContacts (ev) {
|
||||
ev.preventDefault();
|
||||
$.getJSON(_converse.xhr_user_search_url+ "?q=" + $(ev.target).find('input.username').val(), function (data) {
|
||||
const title_subscribe = __('Click to add as a chat contact');
|
||||
const no_users_text = __('No users found');
|
||||
const $ul= $('.search-xmpp ul');
|
||||
$ul.find('li.found-user').remove();
|
||||
$ul.find('li.chat-info').remove();
|
||||
if (!data.length) {
|
||||
$ul.append(`<li class="chat-info">${__('No users found')}</li>`);
|
||||
$ul.append(`<li class="chat-info">${no_users_text}</li>`);
|
||||
}
|
||||
$(data).each(function (idx, obj) {
|
||||
$ul.append(
|
||||
$('<li class="found-user"></li>')
|
||||
.append(
|
||||
$(`<a class="subscribe-to-user" href="#" title="${__('Click to add as a chat contact')}"></a>`)
|
||||
$(`<a class="subscribe-to-user" href="#" title="${title_subscribe}"></a>`)
|
||||
.attr('data-recipient', Strophe.getNodeFromJid(obj.id)+"@"+Strophe.getDomainFromJid(obj.id))
|
||||
.text(obj.fullname)
|
||||
)
|
||||
|
@ -919,7 +919,7 @@
|
|||
_converse.on('disconnected', disconnect);
|
||||
|
||||
const afterReconnected = function () {
|
||||
/* After reconnection makes sure the controlbox's is aware.
|
||||
/* After reconnection makes sure the controlbox is aware.
|
||||
*/
|
||||
const view = _converse.chatboxviews.get('controlbox');
|
||||
if (view.model.get('connected')) {
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
{[ if (authentication == LOGIN || authentication == EXTERNAL) { ]}
|
||||
<label>{{{__("Jabber ID:")}}}</label>
|
||||
<p class="form-help fade-in error {[ if (!_.includes(errors, 'invalid_jid')) { ]} hidden {[ } ]}">
|
||||
{{{_('Please enter a valid XMPP address')}}}
|
||||
{{{__('Please enter a valid XMPP address')}}}
|
||||
</p>
|
||||
<input autofocus
|
||||
type="text"
|
||||
|
@ -22,7 +22,7 @@
|
|||
{[ if (authentication !== EXTERNAL) { ]}
|
||||
<label>{{{__("Password:")}}}</label>
|
||||
<p class="form-help fade-in error {[ if (!_.includes(errors, 'password_required')) { ]} hidden {[ } ]}">
|
||||
{{{_('Please enter your password')}}}
|
||||
{{{__('Please enter your password')}}}
|
||||
</p>
|
||||
<input type="password"
|
||||
name="password"
|
||||
|
|
Loading…
Reference in New Issue
Block a user