-
-
Notifications
You must be signed in to change notification settings - Fork 290
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix area/instrument i18n in EntityLink
Fixes a couple issues in the previous code: * It should've been checking for areas, not artists. Artists don't have translated names (not counting aliases), but areas which are countries do. You can see this is the behavior of the original TT macros, too: areas and instruments default to l_name for their content. * We don't serialize any l_name property. We have to get the translated name from the appropriate gettext domain.
- Loading branch information
Showing
3 changed files
with
46 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* @flow | ||
* Copyright (C) 2018 MetaBrainz Foundation | ||
* | ||
* This file is part of MusicBrainz, the open internet music database, | ||
* and is licensed under the GPL version 2, or (at your option) any | ||
* later version: http://www.gnu.org/licenses/gpl-2.0.txt | ||
*/ | ||
|
||
import wrapGettext from './wrapGettext'; | ||
|
||
const l_countries = wrapGettext('dgettext', 'countries'); | ||
const ln_countries = wrapGettext('dngettext', 'countries'); | ||
const lp_countries = wrapGettext('dpgettext', 'countries'); | ||
|
||
export { | ||
l_countries, | ||
ln_countries, | ||
lp_countries, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
* @flow | ||
* Copyright (C) 2018 MetaBrainz Foundation | ||
* | ||
* This file is part of MusicBrainz, the open internet music database, | ||
* and is licensed under the GPL version 2, or (at your option) any | ||
* later version: http://www.gnu.org/licenses/gpl-2.0.txt | ||
*/ | ||
|
||
import wrapGettext from './wrapGettext'; | ||
|
||
const l_instruments = wrapGettext('dgettext', 'instruments'); | ||
const ln_instruments = wrapGettext('dngettext', 'instruments'); | ||
const lp_instruments = wrapGettext('dpgettext', 'instruments'); | ||
|
||
export { | ||
l_instruments, | ||
ln_instruments, | ||
lp_instruments, | ||
}; |