1
0
mirror of https://github.com/mattermost/focalboard.git synced 2024-12-24 13:43:12 +02:00

Adding more translations

This commit is contained in:
Jesús Espino 2020-10-24 11:02:01 +02:00
parent d4f65a38fa
commit bcccfb8f0e
4 changed files with 71 additions and 37 deletions

View File

@ -1,4 +1,12 @@
{
"BoardComponent.add-a-group": "+ Add a group",
"BoardComponent.delete": "Delete",
"BoardComponent.hidden-columns": "Hidden Columns",
"BoardComponent.hide": "Hide",
"BoardComponent.neww": "+ New",
"BoardComponent.no-property": "No {property}",
"BoardComponent.no-property-title": "Items with an empty {property} property will go here. This column cannot be removed.",
"BoardComponent.show": "Show",
"Sidebar.add-board": "+ Add Board",
"Sidebar.delete-board": "Delete Board",
"Sidebar.export-archive": "Export Archive",

View File

@ -1,4 +1,12 @@
{
"BoardComponent.add-a-group": "+ Añadir un grupo",
"BoardComponent.delete": "Borrar",
"BoardComponent.hidden-columns": "Columnas Ocultas",
"BoardComponent.hide": "Ocultar",
"BoardComponent.neww": "+ Nueva",
"BoardComponent.no-property": "Sin {property}",
"BoardComponent.no-property-title": "Elementos sin la propiedad {property} irán aquí. Esta columna no se puede eliminar.",
"BoardComponent.show": "Mostrar",
"Sidebar.add-board": "+ Añadir Panel",
"Sidebar.delete-board": "Borrar Panel",
"Sidebar.export-archive": "Exportar Archivo",

View File

@ -2,6 +2,7 @@
// See LICENSE.txt for license information.
/* eslint-disable max-lines */
import React from 'react'
import {injectIntl, IntlShape, FormattedMessage} from 'react-intl'
import {BlockIcons} from '../blockIcons'
import {IPropertyOption, IPropertyTemplate} from '../blocks/board'
@ -27,6 +28,7 @@ type Props = {
boardTree?: BoardTree
showView: (id: string) => void
setSearchText: (text: string) => void
intl: IntlShape
}
type State = {
@ -85,7 +87,7 @@ class BoardComponent extends React.Component<Props, State> {
}
render(): JSX.Element {
const {boardTree, showView} = this.props
const {boardTree, showView, intl} = this.props
if (!boardTree || !boardTree.board) {
return (
@ -139,8 +141,19 @@ class BoardComponent extends React.Component<Props, State> {
<div className='octo-board-header-cell'>
<div
className='octo-label'
title={`Items with an empty ${boardTree.groupByProperty?.name} property will go here. This column cannot be removed.`}
>{`No ${boardTree.groupByProperty?.name}`}</div>
title={intl.formatMessage({
id: 'BoardComponent.no-property-title',
defaultMessage: 'Items with an empty {property} property will go here. This column cannot be removed.',
}, {property: boardTree.groupByProperty?.name})}
>
<FormattedMessage
id='BoardComponent.no-property'
defaultMessage='No {property}'
values={{
property: boardTree.groupByProperty?.name,
}}
/>
</div>
<Button>{`${boardTree.emptyGroupCards.length}`}</Button>
<div className='octo-spacer'/>
<Button><div className='imageOptions'/></Button>
@ -157,18 +170,23 @@ class BoardComponent extends React.Component<Props, State> {
{/* Hidden column header */}
{(() => {
if (hiddenGroups.length > 0) {
return <div className='octo-board-header-cell narrow'>Hidden columns</div>
}
})()}
{hiddenGroups.length > 0 &&
<div className='octo-board-header-cell narrow'>
<FormattedMessage
id='BoardComponent.hidden-columns'
defaultMessage='Hidden Columns'
/>
</div>}
<div className='octo-board-header-cell narrow'>
<Button
onClick={(e) => {
this.addGroupClicked()
}}
>+ Add a group</Button>
onClick={this.addGroupClicked}
>
<FormattedMessage
id='BoardComponent.add-a-group'
defaultMessage='+ Add a group'
/>
</Button>
</div>
</div>
@ -182,16 +200,19 @@ class BoardComponent extends React.Component<Props, State> {
{/* No value column */}
<BoardColumn
onDrop={(e) => {
this.onDropToColumn(undefined)
}}
onDrop={() => this.onDropToColumn(undefined)}
>
{boardTree.emptyGroupCards.map((card) => this.renderCard(card, visiblePropertyTemplates))}
<Button
onClick={() => {
this.addCard(undefined)
}}
>+ New</Button>
>
<FormattedMessage
id='BoardComponent.neww'
defaultMessage='+ New'
/>
</Button>
</BoardColumn>
{/* Columns */}
@ -199,31 +220,28 @@ class BoardComponent extends React.Component<Props, State> {
{visibleGroups.map((group) => (
<BoardColumn
key={group.option.id}
onDrop={(e) => {
this.onDropToColumn(group.option)
}}
onDrop={() => this.onDropToColumn(group.option)}
>
{group.cards.map((card) => this.renderCard(card, visiblePropertyTemplates))}
<Button
onClick={() => {
this.addCard(group.option.id)
}}
>+ New</Button>
>
<FormattedMessage
id='BoardComponent.neww'
defaultMessage='+ New'
/>
</Button>
</BoardColumn>
))}
{/* Hidden columns */}
{(() => {
if (hiddenGroups.length > 0) {
return (
<div className='octo-board-column narrow'>
{hiddenGroups.map((group) => this.renderHiddenColumnItem(group))}
</div>
)
}
})()}
{hiddenGroups.length > 0 &&
<div className='octo-board-column narrow'>
{hiddenGroups.map((group) => this.renderHiddenColumnItem(group))}
</div>}
</div>
</div>
</div>
@ -252,7 +270,7 @@ class BoardComponent extends React.Component<Props, State> {
}
private renderColumnHeader(group: BoardTreeGroup) {
const {boardTree} = this.props
const {boardTree, intl} = this.props
const {activeView} = boardTree
const ref = React.createRef<HTMLDivElement>()
@ -302,12 +320,12 @@ class BoardComponent extends React.Component<Props, State> {
<Menu>
<Menu.Text
id='hide'
name='Hide'
name={intl.formatMessage({id: 'BoardComponent.hide', defaultMessage: 'Hide'})}
onClick={() => mutator.hideViewColumn(activeView, group.option.id)}
/>
<Menu.Text
id='delete'
name='Delete'
name={intl.formatMessage({id: 'BoardComponent.delete', defaultMessage: 'Delete'})}
onClick={() => mutator.deletePropertyOption(boardTree, boardTree.groupByProperty, group.option)}
/>
<Menu.Separator/>
@ -331,7 +349,7 @@ class BoardComponent extends React.Component<Props, State> {
}
private renderHiddenColumnItem(group: BoardTreeGroup) {
const {boardTree} = this.props
const {boardTree, intl} = this.props
const {activeView} = boardTree
const ref = React.createRef<HTMLDivElement>()
@ -380,7 +398,7 @@ class BoardComponent extends React.Component<Props, State> {
<Menu>
<Menu.Text
id='show'
name='Show'
name={intl.formatMessage({id: 'BoardComponent.show', defaultMessage: 'Show'})}
onClick={() => mutator.unhideViewColumn(activeView, group.option.id)}
/>
</Menu>
@ -483,4 +501,4 @@ class BoardComponent extends React.Component<Props, State> {
}
}
export {BoardComponent}
export default injectIntl(BoardComponent)

View File

@ -6,7 +6,7 @@ import {BoardTree} from '../viewModel/boardTree'
import {Utils} from '../utils'
import {WorkspaceTree} from '../viewModel/workspaceTree'
import {BoardComponent} from './boardComponent'
import BoardComponent from './boardComponent'
import {Sidebar} from './sidebar'
import {TableComponent} from './tableComponent'