diff --git a/.eslintrc.unfixed.yaml b/.eslintrc.unfixed.yaml index 1e320b0b3ba..e5f4b474bac 100644 --- a/.eslintrc.unfixed.yaml +++ b/.eslintrc.unfixed.yaml @@ -22,6 +22,9 @@ rules: "l_languages", "ln_languages", "lp_languages", + "l_mb_server", + "ln_mb_server", + "lp_mb_server", "l_relationships", "ln_relationships", "lp_relationships", @@ -34,6 +37,9 @@ rules: "N_l", "N_ln", "N_lp", + "N_l_mb_server", + "N_ln_mb_server", + "N_lp_mb_server", "N_l_statistics", "N_lp_statistics", "__webpack_public_path__", diff --git a/docker/musicbrainz-tests/run_circleci_tests.sh b/docker/musicbrainz-tests/run_circleci_tests.sh index 84f4ce0b758..8128fb410aa 100755 --- a/docker/musicbrainz-tests/run_circleci_tests.sh +++ b/docker/musicbrainz-tests/run_circleci_tests.sh @@ -40,7 +40,9 @@ sudo -E -H -u musicbrainz ./node_modules/.bin/eslint --max-warnings 0 . echo OK echo Checking translation domain in statistics code -! sudo -E -H -u musicbrainz git grep -Pw '(N_)?l[np]?\(' -- 'root/statistics/**.js' +sudo -E -H -u musicbrainz \ + git --no-pager grep -Pw '(N_)?l[np]?\(' -- 'root/statistics/**.js' \ + && { exit 1; } echo OK sv_start_if_down chrome diff --git a/eslint.config.mjs b/eslint.config.mjs index 7e3d70790f3..5b7ce02cb42 100644 --- a/eslint.config.mjs +++ b/eslint.config.mjs @@ -222,6 +222,8 @@ export default [ 'l_languages', 'ln_languages', 'lp_languages', + 'l_mb_server', + 'lp_mb_server', 'l_relationships', 'ln_relationships', 'lp_relationships', @@ -234,6 +236,7 @@ export default [ 'N_l', 'N_ln', 'N_lp', + 'N_l_mb_server', 'N_l_statistics', 'N_lp_statistics', '__webpack_public_path__', diff --git a/root/statistics/Countries.js b/root/statistics/Countries.js index bd0d40a6aea..476be057689 100644 --- a/root/statistics/Countries.js +++ b/root/statistics/Countries.js @@ -47,27 +47,27 @@ component Countries( {l_statistics('Rank')} - {l_statistics('Country')} + {l_mb_server('Country')}
- {l_statistics('Artists')} + {l_mb_server('Artists')}
- {l_statistics('Releases')} + {l_mb_server('Releases')}
- {l_statistics('Labels')} + {l_mb_server('Labels')}
- {l_statistics('Events')} + {l_mb_server('Events')}
- {l_statistics('Places')} + {l_mb_server('Places')}
diff --git a/root/statistics/Editors.js b/root/statistics/Editors.js index 12ccaf6e8fc..ce2805686cd 100644 --- a/root/statistics/Editors.js +++ b/root/statistics/Editors.js @@ -85,7 +85,7 @@ component Editors(

{texp.l_statistics('Last updated: {date}', {date: dateCollected})} @@ -101,13 +101,13 @@ component Editors(

diff --git a/root/statistics/Edits.js b/root/statistics/Edits.js index 92de662397b..70dcea7aa83 100644 --- a/root/statistics/Edits.js +++ b/root/statistics/Edits.js @@ -31,7 +31,7 @@ component Edits(

{texp.l_statistics('Last updated: {date}', {date: dateCollected})}

-

{l_statistics('Edits')}

+

{l_mb_server('Edits')}

{Object.keys(statsByCategory).length === 0 ? (

{l_statistics('No edit statistics available.')} diff --git a/root/statistics/Formats.js b/root/statistics/Formats.js index f3be1b0e05b..1c2bbce6617 100644 --- a/root/statistics/Formats.js +++ b/root/statistics/Formats.js @@ -46,10 +46,10 @@ component Formats( {l_statistics('Rank')} - {l_statistics('Format')} - {l_statistics('Releases')} + {l_mb_server('Format')} + {l_mb_server('Releases')} {l_statistics('% of total releases')} - {l_statistics('Mediums')} + {l_mb_server('Mediums')} {l_statistics('% of total mediums')} diff --git a/root/statistics/Index.js b/root/statistics/Index.js index d1218a5c194..9eac90f5138 100644 --- a/root/statistics/Index.js +++ b/root/statistics/Index.js @@ -72,63 +72,63 @@ component Index( {l_statistics('Core entities')} - {addColonText(l_statistics('Artists'))} + {addColonText(l_mb_server('Artists'))} {fc('artist')} - {addColonText(l_statistics('Release groups'))} + {addColonText(l_mb_server('Release groups'))} {fc('releasegroup')} - {addColonText(l_statistics('Releases'))} + {addColonText(l_mb_server('Releases'))} {fc('release')} - {addColonText(l_statistics('Mediums'))} + {addColonText(l_mb_server('Mediums'))} {fc('medium')} - {addColonText(l_statistics('Recordings'))} + {addColonText(l_mb_server('Recordings'))} {fc('recording')} - {addColonText(l_statistics('Tracks'))} + {addColonText(l_mb_server('Tracks'))} {fc('track')} - {addColonText(l_statistics('Labels'))} + {addColonText(l_mb_server('Labels'))} {fc('label')} - {addColonText(l_statistics('Works'))} + {addColonText(l_mb_server('Works'))} {fc('work')} - {addColonText(l_statistics('URLs'))} + {addColonText(l_mb_server('URLs'))} {fc('url')} - {addColonText(l_statistics('Areas'))} + {addColonText(l_mb_server('Areas'))} {fc('area')} - {addColonText(l_statistics('Places'))} + {addColonText(l_mb_server('Places'))} {fc('place')} - {addColonText(lp_statistics('Series', 'plural'))} + {addColonText(lp_mb_server('Series', 'plural'))} {fc('series')} - {addColonText(l_statistics('Instruments'))} + {addColonText(l_mb_server('Instruments'))} {fc('instrument')} - {addColonText(l_statistics('Events'))} + {addColonText(l_mb_server('Events'))} {fc('event')} - {addColonText(l_statistics('Genres'))} + {addColonText(l_mb_server('Genres'))} {fc('genre')} @@ -143,11 +143,11 @@ component Index( {fc('editor.deleted')} - {addColonText(l_statistics('Relationships'))} + {addColonText(l_mb_server('Relationships'))} {fc('ar.links')} - {addColonText(l_statistics('Collections'))} + {addColonText(l_mb_server('Collections'))} {fc('collection')} @@ -193,7 +193,7 @@ component Index( {fc('iswc')} - {addColonText(l_statistics('Disc IDs'))} + {addColonText(l_mb_server('Disc IDs'))} {fc('discid')} @@ -211,14 +211,14 @@ component Index( -

{l_statistics('Artists')}

+

{l_mb_server('Artists')}

- + - + @@ -283,7 +283,7 @@ component Index( + + +
{l_statistics('Artists')}{l_mb_server('Artists')}
{addColonText(l_statistics('Artists'))}{addColonText(l_mb_server('Artists'))} {fc('artist')}
- {l_statistics('Male:')}{addColonText(lp_attributes('Male', 'gender'))} {fc('artist.gender.male')} {_formatPercentage( @@ -294,7 +294,7 @@ component Index(
- {l_statistics('Female:')}{addColonText(lp_attributes('Female', 'gender'))} {fc('artist.gender.female')} {_formatPercentage( @@ -305,7 +305,7 @@ component Index(
- {addColonText(l_statistics('Non-binary'))}{addColonText(lp_attributes('Non-binary', 'gender'))} {fc('artist.gender.nonbinary')} {_formatPercentage( @@ -354,10 +354,10 @@ component Index( - + - + @@ -379,7 +379,7 @@ component Index( - + @@ -405,7 +405,7 @@ component Index( - + @@ -431,7 +431,7 @@ component Index( - + @@ -450,10 +450,10 @@ component Index( - + - + @@ -500,15 +500,15 @@ component Index( - + - + - + @@ -552,7 +552,7 @@ component Index( - + @@ -596,7 +596,7 @@ component Index(
{l_statistics('Releases')}{l_mb_server('Releases')}
{addColonText(l_statistics('Releases'))}{addColonText(l_mb_server('Releases'))} {fc('release')}
{l_statistics('Release status')}
{addColonText(l_statistics('Releases'))}{addColonText(l_mb_server('Releases'))} {fc('release')}
{l_statistics('Release packaging')}
{addColonText(l_statistics('Releases'))}{addColonText(l_mb_server('Releases'))} {fc('release')}
{l_statistics('Cover art sources')}
{addColonText(l_statistics('Releases'))}{addColonText(l_mb_server('Releases'))} {fc('release')}
{l_statistics('Data quality')}{l_mb_server('Data quality')}
{addColonText(l_statistics('Releases'))}{addColonText(l_mb_server('Releases'))} {fc('release')}
{l_statistics('Disc IDs')}{l_mb_server('Disc IDs')}
{addColonText(l_statistics('Disc IDs'))}{addColonText(l_mb_server('Disc IDs'))} {fc('discid')}
{addColonText(l_statistics('Releases'))}{addColonText(l_mb_server('Releases'))} {fc('release')}
{fp('release.10discids', 'release.has_discid')}
{addColonText(l_statistics('Mediums'))}{addColonText(l_mb_server('Mediums'))} {fc('medium')}
-

{l_statistics('Release groups')}

+

{l_mb_server('Release groups')}

@@ -604,7 +604,7 @@ component Index( + @@ -638,7 +638,7 @@ component Index( +
- {addColonText(l_statistics('Release groups'))} + {addColonText(l_mb_server('Release groups'))} {fc('releasegroup')} @@ -629,7 +629,7 @@ component Index( ))}
- {l_statistics('None')}{lp_statistics('None', 'release group primary type')} {fc('releasegroup.primary_type.null')} {fp('releasegroup.primary_type.null', 'releasegroup')}
- {addColonText(l_statistics('Release groups'))} + {addColonText(l_mb_server('Release groups'))} {fc('releasegroup')} @@ -663,21 +663,21 @@ component Index( ))}
- {l_statistics('None')}{lp_statistics('None', 'release group secondary type')} {fc('releasegroup.secondary_type.null')} {fp('releasegroup.secondary_type.null', 'releasegroup')}
-

{l_statistics('Recordings')}

+

{l_mb_server('Recordings')}

- + - + @@ -699,14 +699,14 @@ component Index(
{l_statistics('Recordings')}{l_mb_server('Recordings')}
{addColonText(l_statistics('Recordings'))}{addColonText(l_mb_server('Recordings'))} {fc('recording')}
-

{l_statistics('Labels')}

+

{l_mb_server('Labels')}

- + @@ -720,21 +720,21 @@ component Index( ))} +
{l_statistics('Types')}
{addColonText(l_statistics('Labels'))}{addColonText(l_mb_server('Labels'))} {fc('label')}
- {l_statistics('None')}{lp_statistics('None', 'label type')} {fc('label.type.null')} {fp('label.type.null', 'label')}
-

{l_statistics('Works')}

+

{l_mb_server('Works')}

- + @@ -748,7 +748,7 @@ component Index( ))} + @@ -766,7 +766,7 @@ component Index( - + @@ -782,21 +782,21 @@ component Index( ))} +
{l_statistics('Types')}
{addColonText(l_statistics('Works'))}{addColonText(l_mb_server('Works'))} {fc('work')}
- {l_statistics('None')}{lp_statistics('None', 'work type')} {fc('work.type.null')} {fp('work.type.null', 'work')}
{l_statistics('Attributes')}
{addColonText(l_statistics('Works'))}{addColonText(l_mb_server('Works'))} {fc('work')}
- {l_statistics('None')}{lp_statistics('None', 'work attribute')} {fc('work.attribute.null')} {fp('work.attribute.null', 'work')}
-

{l_statistics('Areas')}

+

{l_mb_server('Areas')}

- + @@ -810,21 +810,21 @@ component Index( ))} +
{l_statistics('Types')}
{addColonText(l_statistics('Areas'))}{addColonText(l_mb_server('Areas'))} {fc('area')}
- {l_statistics('None')}{lp_statistics('None', 'area type')} {fc('area.type.null')} {fp('area.type.null', 'area')}
-

{l_statistics('Places')}

+

{l_mb_server('Places')}

- + @@ -838,14 +838,14 @@ component Index( ))} +
{l_statistics('Types')}
{addColonText(l_statistics('Places'))}{addColonText(l_mb_server('Places'))} {fc('place')}
- {l_statistics('None')}{lp_statistics('None', 'place type')} {fc('place.type.null')} {fp('place.type.null', 'place')}
-

{lp_statistics('Series', 'plural')}

+

{lp_mb_server('Series', 'plural')}

@@ -853,7 +853,7 @@ component Index(
- {addColonText(lp_statistics('Series', 'plural'))} + {addColonText(lp_mb_server('Series', 'plural'))} {fc('series')} @@ -869,14 +869,14 @@ component Index(
-

{l_statistics('Instruments')}

+

{l_mb_server('Instruments')}

- + @@ -892,21 +892,21 @@ component Index( ))} +
{l_statistics('Types')}
{addColonText(l_statistics('Instruments'))}{addColonText(l_mb_server('Instruments'))} {fc('instrument')}
- {l_statistics('None')}{lp_statistics('None', 'instrument type')} {fc('instrument.type.null')} {fp('instrument.type.null', 'instrument')}
-

{l_statistics('Events')}

+

{l_mb_server('Events')}

- + @@ -920,17 +920,19 @@ component Index( ))} + - + - + @@ -949,14 +951,14 @@ component Index(
{l_statistics('Types')}
{addColonText(l_statistics('Events'))}{addColonText(l_mb_server('Events'))} {fc('event')}
- {l_statistics('None')}{lp_statistics('None', 'event type')} {fc('event.type.null')} {fp('event.type.null', 'event')}
{l_statistics('Event art')} + {lp_statistics('Event art', 'plural, multiple events, header')} +
{addColonText(l_statistics('Events'))}{addColonText(l_mb_server('Events'))} {fc('event')}
-

{l_statistics('Collections')}

+

{l_mb_server('Collections')}

- + - + @@ -1095,13 +1097,13 @@ component Index( + + @@ -1120,7 +1122,7 @@ component Index(
{l_statistics('Collections')}{l_mb_server('Collections')}
{addColonText(l_statistics('Collections'))}{addColonText(l_mb_server('Collections'))} {fc('collection')}
- {addColonText(l_statistics('Public'))}{addColonText(l_mb_server('Public'))} {fc('collection.public')} {fp('collection.public', 'collection')}
- {addColonText(l_statistics('Private'))}{addColonText(l_mb_server('Private'))} {fc('collection.private')} {fp('collection.private', 'collection')}
- + @@ -1246,22 +1248,26 @@ component Index( - + - + + + @@ -1292,13 +1298,13 @@ component Index( - + @@ -1318,37 +1324,37 @@ component Index( - + - + + + @@ -1356,7 +1362,7 @@ component Index( @@ -1364,13 +1370,13 @@ component Index( - + diff --git a/root/statistics/LanguagesScripts.js b/root/statistics/LanguagesScripts.js index 1b0aa7cd5ec..6347a0a6c0e 100644 --- a/root/statistics/LanguagesScripts.js +++ b/root/statistics/LanguagesScripts.js @@ -58,15 +58,15 @@ component LanguagesScripts( diff --git a/root/statistics/Relationships.js b/root/statistics/Relationships.js index 516a9179abf..c8f71ea2a9d 100644 --- a/root/statistics/Relationships.js +++ b/root/statistics/Relationships.js @@ -10,7 +10,7 @@ import * as React from 'react'; import {CatalystContext} from '../context.mjs'; -import {compare} from '../static/scripts/common/i18n.js'; +import {compare, l as l_mb_server} from '../static/scripts/common/i18n.js'; import formatEntityTypeName from '../static/scripts/common/utility/formatEntityTypeName.js'; @@ -87,12 +87,12 @@ component Relationships(

{texp.l_statistics('Last updated: {date}', {date: dateCollected})}

-

{l_statistics('Relationships')}

+

{l_mb_server('Relationships')}

{stats['count.ar.links'] < 1 ? (

{l_statistics('No relationship statistics available.')} @@ -107,7 +107,7 @@ component Relationships(

- +
{l_statistics('Editors')}{l_mb_server('Editors')}
{l_statistics('Editors (valid):')}
{l_statistics('Edits')}{l_mb_server('Edits')}
{addColonText(l_statistics('Edits'))}{addColonText(l_mb_server('Edits'))} {fc('edit')}
- {addColonText(l_statistics('Open'))} + {addColonText(lp_mb_server('Open', 'adjective, edit status'))} + {fc('edit.open')} {fp('edit.open', 'edit')}
- {addColonText(l_statistics('Applied'))} + {addColonText(lp_mb_server('Applied', 'edit status'))} + {fc('edit.applied')} {fp('edit.applied', 'edit')}
- {addColonText(lp_statistics('Cancelled', 'edit'))} + {addColonText(lp_mb_server('Cancelled', 'edit'))} {fc('edit.deleted')} {fp('edit.deleted', 'edit')}
{addColonText(l_statistics('Edits'))}{addColonText(l_mb_server('Edits'))} {fc('edit')}
{l_statistics('Votes')}{l_mb_server('Votes')}
{addColonText(l_statistics('Votes'))}{addColonText(l_mb_server('Votes'))} {fc('vote')}
- {addColonText(lp_statistics('Approve', 'vote'))} + {addColonText(lp_mb_server('Approve', 'vote'))} {fc('vote.approve')} {fp('vote.approve', 'vote')}
- {addColonText(lp_statistics('Yes', 'vote'))}{addColonText(lp_mb_server('Yes', 'vote'))} {fc('vote.yes')} {fp('vote.yes', 'vote')}
- {addColonText(lp_statistics('No', 'vote'))}{addColonText(lp_mb_server('No', 'vote'))} {fc('vote.no')} {fp('vote.no', 'vote')}
- {addColonText(lp_statistics('Abstain', 'vote'))} + {addColonText(lp_mb_server('Abstain', 'vote'))} {fc('vote.abstain')} {fp('vote.abstain', 'vote')}
- {addColonText(lp('Admin approval', 'vote'))} + {addColonText(lp_mb_server('Admin approval', 'vote'))} {fc('vote.admin_approve')} {fp('vote.admin_approve', 'vote')}
- {addColonText(lp('Admin rejection', 'vote'))} + {addColonText(lp_mb_server('Admin rejection', 'vote'))} {fc('vote.admin_reject')} {fp('vote.admin_reject', 'vote')}
{addColonText(l_statistics('Votes'))}{addColonText(l_mb_server('Votes'))} {fc('vote')}
{l_statistics('Rank')} - {l_statistics('Languages')} + {l_mb_server('Language')}
- {l_statistics('Releases')} + {l_mb_server('Releases')}
- {l_statistics('Works')} + {l_mb_server('Works')}
@@ -146,11 +146,11 @@ component LanguagesScripts(
{l_statistics('Rank')} - {l_statistics('Script')} + {l_mb_server('Script')}
- {l_statistics('Releases')} + {l_mb_server('Releases')}
{addColonText(l_statistics('Relationships'))}{addColonText(l_mb_server('Relationships'))} {formatCount($c, stats['count.ar.links'])} diff --git a/root/statistics/StatisticsLayout.js b/root/statistics/StatisticsLayout.js index 7eb806795d4..23db8fd55d4 100644 --- a/root/statistics/StatisticsLayout.js +++ b/root/statistics/StatisticsLayout.js @@ -52,12 +52,12 @@ const infoLinks = [ { link: '/statistics/relationships', page: 'relationships', - title: N_l_statistics('Relationships'), + title: N_l_mb_server('Relationships'), }, { link: '/statistics/edits', page: 'edits', - title: N_l_statistics('Edits'), + title: N_l_mb_server('Edits'), }, { link: '/statistics/formats', diff --git a/root/statistics/stats.js b/root/statistics/stats.js index ad443141183..d117c86b405 100644 --- a/root/statistics/stats.js +++ b/root/statistics/stats.js @@ -16,13 +16,19 @@ const stats = { 'area-types': {label: l_statistics('Area types')}, 'artist-countries': {label: l_statistics('Artist countries')}, 'artist-other': {label: l_statistics('Artist types and genders')}, - 'collection': {label: l_statistics('Collections')}, + 'collection': {label: l_mb_server('Collections')}, 'core-entities': {label: l_statistics('Core entities')}, - 'cover-art': {hide: true, label: lp_statistics('Cover art', 'plural')}, + 'cover-art': { + hide: true, + label: lp_statistics('Cover art', 'plural, multiple releases, header'), + }, 'edit-information': {hide: true, label: lp_statistics('Edit information', 'noun')}, 'edit-types': {label: lp_statistics('Edit types', 'noun')}, - 'event-art': {hide: true, label: lp_statistics('Event art', 'plural')}, + 'event-art': { + hide: true, + label: lp_statistics('Event art', 'plural, multiple events, header'), + }, 'event-types': {label: l_statistics('Event types')}, 'formats': {label: l_statistics('Formats')}, 'instrument-types': {label: l_statistics('Instrument types')}, @@ -31,7 +37,7 @@ const stats = { 'other': {label: lp_statistics('Other', 'stats category')}, 'place-types': {label: l_statistics('Place types')}, 'ratings-tags': {label: lp_statistics('Ratings and tags', 'folksonomy')}, - 'relationships': {hide: true, label: l_statistics('Relationships')}, + 'relationships': {hide: true, label: l_mb_server('Relationships')}, 'release-countries': {label: l_statistics('Release countries')}, 'release-group-types': {label: l_statistics('Release group types')}, 'release-languages': {label: l_statistics('Release languages')}, @@ -47,12 +53,12 @@ const stats = { 'count.ar.links': { category: 'relationships', color: '#ff0000', - label: l_statistics('Relationships'), + label: l_mb_server('Relationships'), }, 'count.area': { category: 'core-entities', color: '#ff0000', - label: l_statistics('Areas'), + label: l_mb_server('Areas'), }, 'count.area.type.null': { category: 'area-types', @@ -62,7 +68,7 @@ const stats = { 'count.artist': { category: 'core-entities', color: '#ff8a00', - label: l_statistics('Artists'), + label: l_mb_server('Artists'), }, 'count.artist.0credits': { category: 'artist-other', @@ -147,7 +153,7 @@ const stats = { 'count.artistcredit': { category: 'other', color: '#ff0000', - label: l_statistics('Artist credits'), + label: l_mb_server('Artist credits'), }, 'count.barcode': { category: 'other', @@ -172,7 +178,7 @@ const stats = { 'count.collection': { category: 'collection', color: '#ff0000', - label: l_statistics('Collections'), + label: l_mb_server('Collections'), }, 'count.collection.has_collaborators': { category: 'collection', @@ -287,13 +293,13 @@ const stats = { 'count.discid': { category: 'other', color: '#ff0000', - label: l_statistics('Disc IDs'), + label: l_mb_server('Disc IDs'), }, 'count.edit': { category: 'edit-information', color: '#ff00ff', hide: true, - label: l_statistics('Edits'), + label: l_mb_server('Edits'), }, 'count.edit.applied': { category: 'edit-information', @@ -328,7 +334,7 @@ const stats = { 'count.edit.open': { category: 'edit-information', color: '#ffe400', - label: lp_statistics('Open edits', 'noun'), + label: lp_mb_server('Open edits', 'noun'), }, 'count.edit.perday': { category: 'edit-information', @@ -433,7 +439,7 @@ const stats = { 'count.event': { category: 'core-entities', color: '#e8ab08', - label: l_statistics('Events'), + label: l_mb_server('Events'), }, 'count.event.country.null': { category: 'event-countries', @@ -475,12 +481,12 @@ const stats = { 'count.genre': { category: 'core-entities', color: '#ff0000', - label: l_statistics('Genres'), + label: l_mb_server('Genres'), }, 'count.instrument': { category: 'core-entities', color: '#8fddc9', - label: l_statistics('Instruments'), + label: l_mb_server('Instruments'), }, 'count.instrument.type.null': { category: 'instrument-types', @@ -540,7 +546,7 @@ const stats = { 'count.label': { category: 'core-entities', color: '#ff0096', - label: l_statistics('Labels'), + label: l_mb_server('Labels'), }, 'count.label.country.null': { category: 'label-countries', @@ -560,7 +566,7 @@ const stats = { 'count.medium': { category: 'core-entities', color: '#00c0ff', - label: l_statistics('Mediums'), + label: l_mb_server('Mediums'), }, 'count.medium.format.null': { category: 'formats', @@ -575,7 +581,7 @@ const stats = { 'count.place': { category: 'core-entities', color: '#bc0a0a', - label: l_statistics('Places'), + label: l_mb_server('Places'), }, 'count.place.country.null': { category: 'place-countries', @@ -635,7 +641,7 @@ const stats = { 'count.rating.raw': { category: 'ratings-tags', color: '#ff0000', - label: l_statistics('Ratings'), + label: l_mb_server('Ratings'), }, 'count.rating.raw.artist': { category: 'ratings-tags', @@ -685,7 +691,7 @@ const stats = { 'count.recording': { category: 'core-entities', color: '#4800ff', - label: l_statistics('Recordings'), + label: l_mb_server('Recordings'), }, 'count.recording.has_isrc': { category: 'other', @@ -700,7 +706,7 @@ const stats = { 'count.release': { category: 'core-entities', color: '#a8ff00', - label: l_statistics('Releases'), + label: l_mb_server('Releases'), }, 'count.release.country.null': { category: 'release-countries', @@ -784,7 +790,7 @@ const stats = { 'count.releasegroup': { category: 'core-entities', color: '#ae00ff', - label: l_statistics('Release groups'), + label: l_mb_server('Release groups'), }, 'count.releasegroup.caa.inferred': { category: 'cover-art', @@ -811,7 +817,7 @@ const stats = { 'count.series': { category: 'core-entities', color: '#1a6756', - label: lp_statistics('Series', 'plural'), + label: lp_mb_server('Series', 'plural'), }, 'count.series.type.null': { category: 'series-types', @@ -876,12 +882,12 @@ const stats = { 'count.track': { category: 'other', color: '#ff0000', - label: l_statistics('Tracks'), + label: l_mb_server('Tracks'), }, 'count.url': { category: 'core-entities', color: '#1a6756', - label: l_statistics('URLs'), + label: l_mb_server('URLs'), }, 'count.video': { category: 'other', @@ -892,7 +898,7 @@ const stats = { category: 'edit-information', color: '#00ffff', hide: true, - label: l_statistics('Votes'), + label: l_mb_server('Votes'), }, 'count.vote.abstain': { category: 'edit-information', @@ -938,7 +944,7 @@ const stats = { 'count.work': { category: 'core-entities', color: '#00ffa8', - label: l_statistics('Works'), + label: l_mb_server('Works'), }, 'count.work.attribute.null': { category: 'work-attributes', diff --git a/root/vars.js b/root/vars.js index 0f8d2df98fe..4535cd7da9a 100644 --- a/root/vars.js +++ b/root/vars.js @@ -72,6 +72,14 @@ declare var l_languages: typeof l; declare var ln_languages: typeof ln; declare var lp_languages: typeof lp; +declare var l_mb_server: typeof l; +declare var ln_mb_server: typeof ln; +declare var lp_mb_server: typeof lp; + +declare var N_l_mb_server: typeof N_l; +declare var N_ln_mb_server: typeof N_ln; +declare var N_lp_mb_server: typeof N_lp; + declare var l_relationships: typeof l; declare var ln_relationships: typeof ln; declare var lp_relationships: typeof lp; diff --git a/webpack/providePluginConfig.mjs b/webpack/providePluginConfig.mjs index 0654c9c141c..c95c0ab7c8a 100644 --- a/webpack/providePluginConfig.mjs +++ b/webpack/providePluginConfig.mjs @@ -46,6 +46,14 @@ const providePluginConfig = { 'N_ln': [i18nPath, 'N_ln'], 'N_lp': [i18nPath, 'N_lp'], + 'l_mb_server': [i18nPath, 'l'], + 'ln_mb_server': [i18nPath, 'ln'], + 'lp_mb_server': [i18nPath, 'lp'], + + 'N_l_mb_server': [i18nPath, 'N_l'], + 'N_ln_mb_server': [i18nPath, 'N_ln'], + 'N_lp_mb_server': [i18nPath, 'N_lp'], + 'exp.l': [expandPath, 'l'], 'exp.ln': [expandPath, 'ln'], 'exp.lp': [expandPath, 'lp'],