Skip to content

Commit

Permalink
Temporary bugfix for match count text in findbar
Browse files Browse the repository at this point in the history
  • Loading branch information
IsaacSchemm committed Nov 14, 2018
1 parent 55e505e commit 8cc20fe
Showing 1 changed file with 7 additions and 24 deletions.
31 changes: 7 additions & 24 deletions web/pdf_find_bar.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,31 +151,14 @@ class PDFFindBar {

if (total > 0) {
if (total > limit) {
if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('MOZCENTRAL')) {
// TODO: Remove this hard-coded `[other]` form once plural support has
// been implemented in the mozilla-central specific `l10n.js` file.
matchesCountMsg = this.l10n.get('find_match_count_limit[other]', {
limit,
}, 'More than {{limit}} matches');
} else {
matchesCountMsg = this.l10n.get('find_match_count_limit', {
limit,
}, 'More than {{limit}} match' + (limit !== 1 ? 'es' : ''));
}
matchesCountMsg = this.l10n.get('find_match_count_limit[other]', {
limit,
}, 'More than {{limit}} matches');
} else {
if (typeof PDFJSDev !== 'undefined' && PDFJSDev.test('MOZCENTRAL')) {
// TODO: Remove this hard-coded `[other]` form once plural support has
// been implemented in the mozilla-central specific `l10n.js` file.
matchesCountMsg = this.l10n.get('find_match_count[other]', {
current,
total,
}, '{{current}} of {{total}} matches');
} else {
matchesCountMsg = this.l10n.get('find_match_count', {
current,
total,
}, '{{current}} of {{total}} match' + (total !== 1 ? 'es' : ''));
}
matchesCountMsg = this.l10n.get('find_match_count[other]', {
current,
total,
}, '{{current}} of {{total}} matches');
}
}
Promise.resolve(matchesCountMsg).then((msg) => {
Expand Down

0 comments on commit 8cc20fe

Please sign in to comment.