Skip to content
This repository has been archived by the owner on Mar 29, 2021. It is now read-only.

Commit

Permalink
add i18n for "Source" text in citations
Browse files Browse the repository at this point in the history
  • Loading branch information
dsifford committed Dec 27, 2017
1 parent e37b329 commit fc411bc
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions lib/fixtures.ts
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,7 @@ export const state: ABT.Backend['state'] = {
export const i18n: ABT.Backend['i18n'] = {
misc: {
footnotes: 'Footnotes',
source: 'Source',
},
referenceList: {
tooltips: {
Expand Down
1 change: 1 addition & 0 deletions lib/types/ABT.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ declare namespace ABT {
fieldmaps: FieldMappings;
misc: {
footnotes: 'Footnotes';
source: 'Source';
};
referenceList: {
menu: {
Expand Down
3 changes: 1 addition & 2 deletions src/js/utils/formatters/formatReferenceLinks.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,9 @@ class LinkStyle {
}
case 'URL':
default: {
// FIXME: i18n "Source"
const sourceText = id.value.toLocaleLowerCase().endsWith('.pdf')
? 'PDF'
: 'Source';
: top.ABT.i18n.misc.source;
return oneLineTrim`
${html}${' '}
<span class="abt-url">
Expand Down
1 change: 1 addition & 0 deletions src/php/i18n.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ function generate_translations() {

$ABT_i18n->misc = [
'footnotes' => __( 'Footnotes', 'academic-bloggers-toolkit' ),
'source' => __( 'Source', 'academic-bloggers-toolkit' ),
];

$ABT_i18n->errors = [
Expand Down

0 comments on commit fc411bc

Please # to comment.