Finish translation

This commit is contained in:
Lucas Verney 2016-07-29 00:50:08 +02:00
parent 157382c3b8
commit 921028c073
11 changed files with 57 additions and 56 deletions

1
TODO
View File

@ -27,5 +27,4 @@
## Miscellaneous ## Miscellaneous
* Babel transform runtime
* Webpack chunks? * Webpack chunks?

View File

@ -1,6 +1,6 @@
import React, { Component, PropTypes } from "react"; import React, { Component, PropTypes } from "react";
import { Link, withRouter } from "react-router"; import { Link, withRouter } from "react-router";
import { defineMessages, injectIntl, intlShape, FormattedMessage } from "react-intl"; import { defineMessages, injectIntl, intlShape, FormattedMessage, FormattedHTMLMessage } from "react-intl";
import { messagesMap } from "../../utils"; import { messagesMap } from "../../utils";
import commonMessages from "../../locales/messagesDescriptors/common"; import commonMessages from "../../locales/messagesDescriptors/common";
@ -77,7 +77,7 @@ export class PaginationIntl extends Component {
pagesButton.push( pagesButton.push(
<li className="page-item" key={key}> <li className="page-item" key={key}>
<Link className="page-link" title={formatMessage(paginationMessages["app.pagination.goToPageWithoutMarkup"], { pageNumber: 1})} to={this.buildLinkTo(1)}> <Link className="page-link" title={formatMessage(paginationMessages["app.pagination.goToPageWithoutMarkup"], { pageNumber: 1})} to={this.buildLinkTo(1)}>
<FormattedMessage {...paginationMessages["app.pagination.goToPage"]} values={{ pageNumber: 1 }} /> <FormattedHTMLMessage {...paginationMessages["app.pagination.goToPage"]} values={{ pageNumber: 1 }} />
</Link> </Link>
</li> </li>
); );
@ -104,7 +104,7 @@ export class PaginationIntl extends Component {
pagesButton.push( pagesButton.push(
<li className={className} key={key}> <li className={className} key={key}>
<Link className="page-link" title={title} to={this.buildLinkTo(i)}> <Link className="page-link" title={title} to={this.buildLinkTo(i)}>
<FormattedMessage {...paginationMessages["app.pagination.goToPage"]} values={{ pageNumber: i }} /> <FormattedHTMLMessage {...paginationMessages["app.pagination.goToPage"]} values={{ pageNumber: i }} />
{currentSpan} {currentSpan}
</Link> </Link>
</li> </li>
@ -126,7 +126,7 @@ export class PaginationIntl extends Component {
pagesButton.push( pagesButton.push(
<li className="page-item" key={key}> <li className="page-item" key={key}>
<Link className="page-link" title={title} to={this.buildLinkTo(this.props.nPages)}> <Link className="page-link" title={title} to={this.buildLinkTo(this.props.nPages)}>
<FormattedMessage {...paginationMessages["app.pagination.goToPage"]} values={{ pageNumber: this.props.nPages }} /> <FormattedHTMLMessage {...paginationMessages["app.pagination.goToPage"]} values={{ pageNumber: this.props.nPages }} />
</Link> </Link>
</li> </li>
); );

View File

@ -6,7 +6,6 @@ import { messagesMap } from "../../utils";
import commonMessages from "../../locales/messagesDescriptors/common"; import commonMessages from "../../locales/messagesDescriptors/common";
import messages from "../../locales/messagesDescriptors/layouts/Sidebar"; import messages from "../../locales/messagesDescriptors/layouts/Sidebar";
// TODO: i18n for artist / album / songs
const sidebarLayoutMessages = defineMessages(messagesMap(Array.concat([], commonMessages, messages))); const sidebarLayoutMessages = defineMessages(messagesMap(Array.concat([], commonMessages, messages)));
export default class SidebarLayoutIntl extends Component { export default class SidebarLayoutIntl extends Component {
@ -80,22 +79,32 @@ export default class SidebarLayoutIntl extends Component {
<li> <li>
<Link to="/artists" title={formatMessage(sidebarLayoutMessages["app.sidebarLayout.browseArtists"])} className={isActive.artists}> <Link to="/artists" title={formatMessage(sidebarLayoutMessages["app.sidebarLayout.browseArtists"])} className={isActive.artists}>
<span className="glyphicon glyphicon-user" aria-hidden="true"></span> <span className="glyphicon glyphicon-user" aria-hidden="true"></span>
<span className="sr-only">Artists</span> <span className="sr-only">
<span className="hidden-sm"> Artists</span> <FormattedMessage {...sidebarLayoutMessages["app.common.artist"]} values={{itemCount: 42}} />
</span>
<span className="hidden-sm">
&nbsp;<FormattedMessage {...sidebarLayoutMessages["app.common.artist"]} values={{itemCount: 42}} />
</span>
</Link> </Link>
</li> </li>
<li> <li>
<Link to="/albums" title={formatMessage(sidebarLayoutMessages["app.sidebarLayout.browseAlbums"])} className={isActive.albums}> <Link to="/albums" title={formatMessage(sidebarLayoutMessages["app.sidebarLayout.browseAlbums"])} className={isActive.albums}>
<span className="glyphicon glyphicon-cd" aria-hidden="true"></span> <span className="glyphicon glyphicon-cd" aria-hidden="true"></span>
<span className="sr-only">Albums</span> <span className="sr-only"><FormattedMessage {...sidebarLayoutMessages["app.common.album"]} values={{itemCount: 42}} /></span>
<span className="hidden-sm"> Albums</span> <span className="hidden-sm">
&nbsp;<FormattedMessage {...sidebarLayoutMessages["app.common.album"]} values={{itemCount: 42}} />
</span>
</Link> </Link>
</li> </li>
<li> <li>
<Link to="/songs" title={formatMessage(sidebarLayoutMessages["app.sidebarLayout.browseSongs"])} className={isActive.songs}> <Link to="/songs" title={formatMessage(sidebarLayoutMessages["app.sidebarLayout.browseSongs"])} className={isActive.songs}>
<span className="glyphicon glyphicon-music" aria-hidden="true"></span> <span className="glyphicon glyphicon-music" aria-hidden="true"></span>
<span className="sr-only">Songs</span> <span className="sr-only">
<span className="hidden-sm"> Songs</span> <FormattedMessage {...sidebarLayoutMessages["app.common.song"]} values={{itemCount: 42}} />
</span>
<span className="hidden-sm">
&nbsp;<FormattedMessage {...sidebarLayoutMessages["app.common.song"]} values={{itemCount: 42}} />
</span>
</Link> </Link>
</li> </li>
</ul> </ul>

File diff suppressed because one or more lines are too long

46
app/dist/index.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,10 +1,10 @@
module.exports = { module.exports = {
"app.common.album": "Album", // Album "app.common.album": "{itemCount, plural, one {Album} other {Albums}}", // Album
"app.common.artist": "Artist", // Artist "app.common.artist": "{itemCount, plural, one {Artist} other {Artists}}", // Artist
"app.common.cancel": "Cancel", // Cancel "app.common.cancel": "Cancel", // Cancel
"app.common.close": "Close", // Close "app.common.close": "Close", // Close
"app.common.go": "Go", // Go "app.common.go": "Go", // Go
"app.common.song": "Song", // Song "app.common.song": "{itemCount, plural, one {Song} other {Songs}}", // Song
"app.filter.filter": "Filter…", // Filtering input placeholder "app.filter.filter": "Filter…", // Filtering input placeholder
"app.filter.whatAreWeListeningToToday": "What are we listening to today?", // Description for the filter bar "app.filter.whatAreWeListeningToToday": "What are we listening to today?", // Description for the filter bar
"app.login.endpointInputAriaLabel": "URL of your Ampache instance (e.g. http://ampache.example.com)", // ARIA label for the endpoint input "app.login.endpointInputAriaLabel": "URL of your Ampache instance (e.g. http://ampache.example.com)", // ARIA label for the endpoint input
@ -14,7 +14,7 @@ module.exports = {
"app.login.signIn": "Sign in", // Sign in "app.login.signIn": "Sign in", // Sign in
"app.login.username": "Username", // Username input placeholder "app.login.username": "Username", // Username input placeholder
"app.pagination.current": "current", // Current (page) "app.pagination.current": "current", // Current (page)
"app.pagination.goToPage": "<span className=\"sr-only\">Go to page </span>{pageNumber}", // Link content to go to page N. span is here for screen-readers "app.pagination.goToPage": "<span class=\"sr-only\">Go to page </span>{pageNumber}", // Link content to go to page N. span is here for screen-readers
"app.pagination.goToPageWithoutMarkup": "Go to page {pageNumber}", // Link title to go to page N "app.pagination.goToPageWithoutMarkup": "Go to page {pageNumber}", // Link title to go to page N
"app.pagination.pageNavigation": "Page navigation", // ARIA label for the nav block containing pagination "app.pagination.pageNavigation": "Page navigation", // ARIA label for the nav block containing pagination
"app.pagination.pageToGoTo": "Page to go to?", // Title of the pagination modal "app.pagination.pageToGoTo": "Page to go to?", // Title of the pagination modal
@ -28,7 +28,6 @@ module.exports = {
"app.sidebarLayout.mainNavigationMenu": "Main navigation menu", // ARIA label for the main navigation menu "app.sidebarLayout.mainNavigationMenu": "Main navigation menu", // ARIA label for the main navigation menu
"app.sidebarLayout.search": "Search", // Search "app.sidebarLayout.search": "Search", // Search
"app.sidebarLayout.settings": "Settings", // Settings "app.sidebarLayout.settings": "Settings", // Settings
"app.songs.album": "Album", // Album (song)
"app.songs.genre": "Genre", // Genre (song) "app.songs.genre": "Genre", // Genre (song)
"app.songs.length": "Length", // Length (song) "app.songs.length": "Length", // Length (song)
"app.songs.title": "Title", // Title (song) "app.songs.title": "Title", // Title (song)

View File

@ -1,10 +1,10 @@
module.exports = { module.exports = {
"app.common.album": "Album", // Album "app.common.album": "{itemCount, plural, one {Album} other {Albums}}", // Albums
"app.common.artist": "Artiste", // Artist "app.common.artist": "{itemCount, plural, one {Artiste} other {Artistes}}", // Artists
"app.common.cancel": "Annuler", // Cancel "app.common.cancel": "Annuler", // Cancel
"app.common.close": "Fermer", // Close "app.common.close": "Fermer", // Close
"app.common.go": "Aller", // Go "app.common.go": "Aller", // Go
"app.common.song": "Piste", // Song "app.common.song": "{itemCount, plural, one {Piste} other {Pistes}}", // Song
"app.filter.filter": "Filtrer…", // Filtering input placeholder "app.filter.filter": "Filtrer…", // Filtering input placeholder
"app.filter.whatAreWeListeningToToday": "Que voulez-vous écouter aujourd'hui\u00a0?", // Description for the filter bar "app.filter.whatAreWeListeningToToday": "Que voulez-vous écouter aujourd'hui\u00a0?", // Description for the filter bar
"app.login.endpointInputAriaLabel": "URL de votre Ampache (e.g. http://ampache.example.com)", // ARIA label for the endpoint input "app.login.endpointInputAriaLabel": "URL de votre Ampache (e.g. http://ampache.example.com)", // ARIA label for the endpoint input
@ -14,7 +14,7 @@ module.exports = {
"app.login.signIn": "Connexion", // Sign in "app.login.signIn": "Connexion", // Sign in
"app.login.username": "Utilisateur", // Username input placeholder "app.login.username": "Utilisateur", // Username input placeholder
"app.pagination.current": "actuelle", // Current (page) "app.pagination.current": "actuelle", // Current (page)
"app.pagination.goToPage": "<span className=\"sr-only\">Aller à la page </span>{pageNumber}", // Link content to go to page N. span is here for screen-readers "app.pagination.goToPage": "<span class=\"sr-only\">Aller à la page </span>{pageNumber}", // Link content to go to page N. span is here for screen-readers
"app.pagination.goToPageWithoutMarkup": "Aller à la page {pageNumber}", // Link title to go to page N "app.pagination.goToPageWithoutMarkup": "Aller à la page {pageNumber}", // Link title to go to page N
"app.pagination.pageNavigation": "Navigation entre les pages", // ARIA label for the nav block containing pagination "app.pagination.pageNavigation": "Navigation entre les pages", // ARIA label for the nav block containing pagination
"app.pagination.pageToGoTo": "Page à laquelle aller\u00a0?", // Title of the pagination modal "app.pagination.pageToGoTo": "Page à laquelle aller\u00a0?", // Title of the pagination modal
@ -28,7 +28,6 @@ module.exports = {
"app.sidebarLayout.mainNavigationMenu": "Menu principal", // ARIA label for the main navigation menu "app.sidebarLayout.mainNavigationMenu": "Menu principal", // ARIA label for the main navigation menu
"app.sidebarLayout.search": "Rechercher", // Search "app.sidebarLayout.search": "Rechercher", // Search
"app.sidebarLayout.settings": "Préférences", // Settings "app.sidebarLayout.settings": "Préférences", // Settings
"app.songs.album": "Album", // Album (song)
"app.songs.genre": "Genre", // Genre (song) "app.songs.genre": "Genre", // Genre (song)
"app.songs.length": "Durée", // Length (song) "app.songs.length": "Durée", // Length (song)
"app.songs.title": "Titre", // Title (song) "app.songs.title": "Titre", // Title (song)

View File

@ -4,11 +4,6 @@ const messages = [
"description": "Title (song)", "description": "Title (song)",
"defaultMessage": "Title" "defaultMessage": "Title"
}, },
{
"id": "app.songs.album",
"description": "Album (song)",
"defaultMessage": "Album"
},
{ {
"id": "app.songs.genre", "id": "app.songs.genre",
"description": "Genre (song)", "description": "Genre (song)",

View File

@ -17,17 +17,17 @@ const messages = [
{ {
id: "app.common.artist", id: "app.common.artist",
description: "Artist", description: "Artist",
defaultMessage: "Artist" defaultMessage: "{itemCount, plural, one {Artist} other {Artists}}"
}, },
{ {
id: "app.common.album", id: "app.common.album",
description: "Album", description: "Album",
defaultMessage: "Album" defaultMessage: "{itemCount, plural, one {Album} other {Albums}}"
}, },
{ {
id: "app.common.song", id: "app.common.song",
description: "Song", description: "Song",
defaultMessage: "Song" defaultMessage: "{itemCount, plural, one {Song} other {Songs}}"
}, },
]; ];

View File

@ -1,7 +1,7 @@
const messages = [ const messages = [
{ {
id: "app.pagination.goToPage", id: "app.pagination.goToPage",
defaultMessage: "<span className=\"sr-only\">Go to page </span>{pageNumber}", defaultMessage: "<span class=\"sr-only\">Go to page </span>{pageNumber}",
description: "Link content to go to page N. span is here for screen-readers" description: "Link content to go to page N. span is here for screen-readers"
}, },
{ {