Skip to content

Commit 0dbfc73

Browse files
committed
Add @{notranslate} into the views.
1 parent 832111c commit 0dbfc73

4 files changed

Lines changed: 13 additions & 2 deletions

File tree

changes.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ BETA ======= 1.9.1 (HOTFIX)
88
- added: F.backup(filename, path, [callback], [filter]) --> backup some path to one file
99
- added: F.restore(filename, target, [callback], [filter]) --> restore backup file (but not evaluating)
1010
- added: MailMessage supports custom headers `message.headers = { key: 'value' }`
11+
- added: @{notranslate} --> disables view translation
1112

1213
- updated: MailMessage.bcc(email, [clear]) --> added clear
1314
- updated: MailMessage.cc(email, [clear]) --> added clear

index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ function Framework() {
223223

224224
this.id = null;
225225
this.version = 1910;
226-
this.version_header = '1.9.1-16';
226+
this.version_header = '1.9.1-17';
227227

228228
var version = process.version.toString().replace('v', '').replace(/\./g, '');
229229
if (version[1] === '0')

internal.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1745,6 +1745,16 @@ function View() {}
17451745

17461746
function view_parse_localization(content, language) {
17471747

1748+
var is = false;
1749+
1750+
content = content.replace(/@\{notranslate\}/gi, function(text) {
1751+
is = true;
1752+
return '';
1753+
}).trim();
1754+
1755+
if (is)
1756+
return content;
1757+
17481758
var command = view_find_localization(content, 0);
17491759
var output = '';
17501760
var end = 0;

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"name": "Andrea Sessa",
4242
"email": "andrea.sessa@gmail.com"
4343
}],
44-
"version": "1.9.1-16",
44+
"version": "1.9.1-17",
4545
"homepage": "http://www.totaljs.com",
4646
"bugs": {
4747
"url": "https://github.com/totaljs/framework/issues",

0 commit comments

Comments
 (0)