mirror of
https://github.com/PrivateBin/PrivateBin.git
synced 2024-03-22 13:10:41 +08:00
Merge branch 'otaku-lang'
This commit is contained in:
commit
b85dab4633
|
@ -4,7 +4,7 @@
|
||||||
"type": "project",
|
"type": "project",
|
||||||
"keywords": ["private", "secure", "end-to-end-encrypted", "e2e", "paste", "pastebin", "zero", "zero-knowledge", "encryption", "encrypted", "AES"],
|
"keywords": ["private", "secure", "end-to-end-encrypted", "e2e", "paste", "pastebin", "zero", "zero-knowledge", "encryption", "encrypted", "AES"],
|
||||||
"homepage": "https://github.com/PrivateBin",
|
"homepage": "https://github.com/PrivateBin",
|
||||||
"license":"zlib",
|
"license":"zlib-acknowledgement",
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/PrivateBin/PrivateBin/issues",
|
"issues": "https://github.com/PrivateBin/PrivateBin/issues",
|
||||||
"wiki": "https://github.com/PrivateBin/PrivateBin/wiki",
|
"wiki": "https://github.com/PrivateBin/PrivateBin/wiki",
|
||||||
|
|
|
@ -441,7 +441,7 @@ jQuery.PrivateBin = (function($, sjcl, Base64, RawDeflate) {
|
||||||
|
|
||||||
// auto-select language based on browser settings
|
// auto-select language based on browser settings
|
||||||
if (newLanguage.length === 0) {
|
if (newLanguage.length === 0) {
|
||||||
newLanguage = (navigator.language || navigator.userLanguage).substring(0, 2);
|
newLanguage = (navigator.language || navigator.userLanguage || 'en').substring(0, 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
// if language is already used skip update
|
// if language is already used skip update
|
||||||
|
|
|
@ -99,6 +99,28 @@ describe('I18n', function () {
|
||||||
return language === result && language === alias;
|
return language === result && language === alias;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
|
||||||
|
jsc.property(
|
||||||
|
'should default to en',
|
||||||
|
function() {
|
||||||
|
var clean = jsdom('', {url: 'https://privatebin.net/'});
|
||||||
|
|
||||||
|
[ 'language', 'userLanguage' ].forEach(function (key) {
|
||||||
|
Object.defineProperty(navigator, key, {
|
||||||
|
value: undefined,
|
||||||
|
writeable: false
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
$.PrivateBin.I18n.reset('en');
|
||||||
|
$.PrivateBin.I18n.loadTranslations();
|
||||||
|
var result = $.PrivateBin.I18n.translate('en'),
|
||||||
|
alias = $.PrivateBin.I18n._('en');
|
||||||
|
|
||||||
|
clean();
|
||||||
|
return 'en' === result && 'en' === alias;
|
||||||
|
}
|
||||||
|
);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -75,7 +75,7 @@ if ($MARKDOWN):
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-9HcFkJcGWfvpGHD7tTGYzBtx4TbVfR9z7oujlX2WZ2dYWVv/2QIW5eMSjpvfxUVTJVF+DHD7Ps/80qR8GcQsIg==" crossorigin="anonymous"></script>
|
<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-RP/Q7x1nwpIRC2bOYlYNjOe85laGtKgKioX+h+Th0QKl01Gc2FPNrWNVtr3zJvNEpm4Oq3Ksi+av71GX3S/RBQ==" crossorigin="anonymous"></script>
|
||||||
<!--[if lt IE 10]>
|
<!--[if lt IE 10]>
|
||||||
<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
|
<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
@ -468,7 +468,7 @@ endif;
|
||||||
<div id="pastesuccess" role="alert" class="hidden alert alert-success">
|
<div id="pastesuccess" role="alert" class="hidden alert alert-success">
|
||||||
<span class="glyphicon glyphicon-ok" aria-hidden="true"></span>
|
<span class="glyphicon glyphicon-ok" aria-hidden="true"></span>
|
||||||
<div id="deletelink"></div>
|
<div id="deletelink"></div>
|
||||||
<div id="pastelink">
|
<div id="pastelink"></div>
|
||||||
<?php
|
<?php
|
||||||
if (strlen($URLSHORTENER)):
|
if (strlen($URLSHORTENER)):
|
||||||
?>
|
?>
|
||||||
|
@ -479,7 +479,6 @@ if (strlen($URLSHORTENER)):
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<ul id="editorTabs" class="nav nav-tabs hidden">
|
<ul id="editorTabs" class="nav nav-tabs hidden">
|
||||||
<li role="presentation" class="active"><a id="messageedit" href="#"><?php echo I18n::_('Editor'); ?></a></li>
|
<li role="presentation" class="active"><a id="messageedit" href="#"><?php echo I18n::_('Editor'); ?></a></li>
|
||||||
<li role="presentation"><a id="messagepreview" href="#"><?php echo I18n::_('Preview'); ?></a></li>
|
<li role="presentation"><a id="messagepreview" href="#"><?php echo I18n::_('Preview'); ?></a></li>
|
||||||
|
|
|
@ -54,7 +54,7 @@ if ($QRCODE):
|
||||||
<?php
|
<?php
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-9HcFkJcGWfvpGHD7tTGYzBtx4TbVfR9z7oujlX2WZ2dYWVv/2QIW5eMSjpvfxUVTJVF+DHD7Ps/80qR8GcQsIg==" crossorigin="anonymous"></script>
|
<script type="text/javascript" src="js/privatebin.js?<?php echo rawurlencode($VERSION); ?>" integrity="sha512-RP/Q7x1nwpIRC2bOYlYNjOe85laGtKgKioX+h+Th0QKl01Gc2FPNrWNVtr3zJvNEpm4Oq3Ksi+av71GX3S/RBQ==" crossorigin="anonymous"></script>
|
||||||
<!--[if lt IE 10]>
|
<!--[if lt IE 10]>
|
||||||
<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
|
<style type="text/css">body {padding-left:60px;padding-right:60px;} #ienotice {display:block;} #oldienotice {display:block;}</style>
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
@ -206,7 +206,7 @@ if ($QRCODE):
|
||||||
endif;
|
endif;
|
||||||
?> <div id="pastesuccess" class="hidden">
|
?> <div id="pastesuccess" class="hidden">
|
||||||
<div id="deletelink"></div>
|
<div id="deletelink"></div>
|
||||||
<div id="pastelink">
|
<div id="pastelink"></div>
|
||||||
<?php
|
<?php
|
||||||
if (strlen($URLSHORTENER)):
|
if (strlen($URLSHORTENER)):
|
||||||
?>
|
?>
|
||||||
|
@ -215,7 +215,6 @@ if (strlen($URLSHORTENER)):
|
||||||
endif;
|
endif;
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
|
||||||
<?php
|
<?php
|
||||||
if ($FILEUPLOAD):
|
if ($FILEUPLOAD):
|
||||||
?>
|
?>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user