Move About pane strings and URLs to ZOTERO_CONFIG
This commit is contained in:
parent
749e28dc1f
commit
7065dacee8
2 changed files with 26 additions and 9 deletions
|
@ -21,7 +21,7 @@
|
|||
</div>
|
||||
<hbox>
|
||||
<label id="version"/>
|
||||
<label id="changelog" class="zotero-text-link" href="https://www.zotero.org/support/changelog" value="&zotero.whatsNew;"/>
|
||||
<label id="changelog" class="zotero-text-link" value="&zotero.whatsNew;"/>
|
||||
</hbox>
|
||||
<script>
|
||||
document.getElementById('version').textContent = Zotero.version;
|
||||
|
@ -32,32 +32,43 @@
|
|||
<p id="third-party-software"></p>
|
||||
<p id="get-involved"></p>
|
||||
<script><![CDATA[
|
||||
Components.utils.import("resource://zotero/config.js");
|
||||
|
||||
document.getElementById('changelog').href = ZOTERO_CONFIG.CHANGELOG_URL;
|
||||
|
||||
// Replace [links] in localized strings with spans with onclick handlers
|
||||
//
|
||||
// TODO: Use helper function in common with intro text in itemTreeView.js
|
||||
document.getElementById('created-by').innerHTML =
|
||||
Zotero.Utilities.htmlSpecialChars(Zotero.getString('about.createdBy'))
|
||||
Zotero.Utilities.htmlSpecialChars(
|
||||
Zotero.getString(
|
||||
'about.createdBy',
|
||||
[Zotero.appName, `[${ZOTERO_CONFIG.PRODUCER}]`]
|
||||
),
|
||||
)
|
||||
.replace(
|
||||
/\[([^\]]+)](.+)\[([^\]]+)]/,
|
||||
`<span data-href="https://digitalscholar.org/">$1</span>`
|
||||
`<span data-href="${ZOTERO_CONFIG.PRODUCER_URL}">$1</span>`
|
||||
+ '$2'
|
||||
+ `<span data-href="https://www.zotero.org/support/credits_and_acknowledgments">$3</span>`
|
||||
+ `<span data-href="${ZOTERO_CONFIG.CREDITS_URL}">$3</span>`
|
||||
);
|
||||
|
||||
document.getElementById('third-party-software').innerHTML =
|
||||
Zotero.Utilities.htmlSpecialChars(Zotero.getString('about.openSource'))
|
||||
Zotero.Utilities.htmlSpecialChars(
|
||||
Zotero.getString('about.openSource', Zotero.appName)
|
||||
)
|
||||
.replace(
|
||||
/\[([^\]]+)](.+)\[([^\]]+)]/,
|
||||
`<span data-href="https://www.zotero.org/support/licensing">$1</span>`
|
||||
`<span data-href="${ZOTERO_CONFIG.LICENSING_URL}">$1</span>`
|
||||
+ '$2'
|
||||
+ `<span data-href="https://www.zotero.org/support/credits_and_acknowledgments#third-party_software">$3</span>`
|
||||
+ `<span data-href="${ZOTERO_CONFIG.CREDITS_URL}#third-party_software">$3</span>`
|
||||
);
|
||||
|
||||
document.getElementById('get-involved').innerHTML =
|
||||
Zotero.Utilities.htmlSpecialChars(Zotero.getString('about.getInvolved'))
|
||||
.replace(
|
||||
/\[([^\]]+)]/,
|
||||
`<span data-href="https://www.zotero.org/getinvolved/">$1</span>`
|
||||
`<span data-href="${ZOTERO_CONFIG.GET_INVOLVED_URL}">$1</span>`
|
||||
);
|
||||
|
||||
// Activate text links
|
||||
|
|
|
@ -3,6 +3,8 @@ var ZOTERO_CONFIG = {
|
|||
ID: 'zotero', // used for db filename, etc.
|
||||
CLIENT_NAME: 'Zotero',
|
||||
DOMAIN_NAME: 'zotero.org',
|
||||
PRODUCER: 'Digital Scholar',
|
||||
PRODUCER_URL: 'https://digitalscholar.org',
|
||||
REPOSITORY_URL: 'https://repo.zotero.org/repo/',
|
||||
BASE_URI: 'http://zotero.org/',
|
||||
WWW_BASE_URL: 'https://www.zotero.org/',
|
||||
|
@ -21,7 +23,11 @@ var ZOTERO_CONFIG = {
|
|||
SUPPORT_URL: "https://www.zotero.org/support/",
|
||||
TROUBLESHOOTING_URL: "https://www.zotero.org/support/getting_help",
|
||||
FEEDBACK_URL: "https://forums.zotero.org/",
|
||||
CONNECTORS_URL: "https://www.zotero.org/download/connectors"
|
||||
CONNECTORS_URL: "https://www.zotero.org/download/connectors",
|
||||
CHANGELOG_URL: "https://www.zotero.org/support/changelog",
|
||||
CREDITS_URL: 'https://www.zotero.org/support/credits_and_acknowledgments',
|
||||
LICENSING_URL: 'https://www.zotero.org/support/licensing',
|
||||
GET_INVOLVED_URL: 'https://www.zotero.org/getinvolved',
|
||||
};
|
||||
|
||||
if (typeof process === 'object' && process + '' === '[object process]'){
|
||||
|
|
Loading…
Reference in a new issue