apache / echarts

Apache ECharts is a powerful, interactive charting and data visualization library for browser
https://echarts.apache.org
Apache License 2.0
60.18k stars 19.6k forks source link

[Feature] Improve pt-br internationalization #20345

Closed ViniciusCestarii closed 2 days ago

ViniciusCestarii commented 4 days ago

What problem does this feature solve?

This issue is for improving pt-br internationalization because there are some terms in english that could be tranlated to pt-br

What does the proposed API look like?

Before

var localeObj = {
    time: {
        month: [
            'Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho',
            'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro'
        ],
        monthAbbr: [
            'Jan', 'Fev', 'Mar', 'Abr', 'Mai', 'Jun',
            'Jul', 'Ago', 'Set', 'Out', 'Nov', 'Dez'
        ],
        dayOfWeek: [
            'Domingo', 'Segunda-feira', 'Terça-feira', 'Quarta-feira',
'Quinta-feira', 'Sexta-feira', 'Sábado'
        ],
        dayOfWeekAbbr: [
            'Dom', 'Seg', 'Ter', 'Qua', 'Qui', 'Sex', 'Sáb'
        ]
    },
    legend: {
        selector: {
            all: 'Todas',
            inverse: 'Inv'
        }
    },
    toolbox: {
        brush: {
            title: {
                rect: 'Seleção retangular',
                polygon: 'Seleção em laço',
                lineX: 'Selecionar horizontalmente',
                lineY: 'Selecionar verticalmente',
                keep: 'Manter seleções',
                clear: 'Limpar seleções'
            }
        },
        dataView: {
            title: 'Exibição de dados',
            lang: ['Exibição de dados', 'Fechar', 'Atualizar']
        },
        dataZoom: {
            title: {
                zoom: 'Zoom',
                back: 'Restaurar Zoom'
            }
        },
        magicType: {
            title: {
                line: 'Trocar para gráfico de linhas',
                bar: 'Trocar para gráfico de barras',
                stack: 'Empilhar',
                tiled: 'Tile'
            }
        },
        restore: {
            title: 'Restore'
        },
        saveAsImage: {
            title: 'Salvar como imagem',
            lang: ['Clique com o botão direito para salvar imagem']
        }
    },
    series: {
        typeNames: {
            pie: 'Gráfico de pizza',
            bar: 'Gráfico de barras',
            line: 'Gráfico de linhas',
            scatter: 'Gráfico de dispersão',
            effectScatter: 'Gráfico de dispersão ondulado',
            radar: 'Gráfico radar',
            tree: 'Árvore',
            treemap: 'Treemap',
            boxplot: 'Boxplot',
            candlestick: 'Candlestick',
            k: 'Gráfico K line',
            heatmap: 'Mapa de calor',
            map: 'Mapa',
            parallel: 'Coordenadas paralelas',
            lines: 'Gráfico de linhas',
            graph: 'Relationship graph',
            sankey: 'Gráfico Sankey',
            funnel: 'Gráfico de funil',
            gauge: 'Gauge',
            pictorialBar: 'Pictorial bar',
            themeRiver: 'Theme River Map',
            sunburst: 'Sunburst',
            custom: 'Gráfico personalizado',
            chart: 'Gráfico'
        }
    },
    aria: {
        general: {
            withTitle: 'Este é um gráfico entitulado "{title}"',
            withoutTitle: 'Este é um gráfico'
        },
        series: {
            single: {
                prefix: '',
                withName: ' do tipo {seriesType} nomeada/nomeado como {seriesName}.',
                withoutName: ' do tipo {seriesType}.'
            },
            multiple: {
                prefix: '. Consiste de {seriesCount} séries.',
                withName: ' A {seriesId} série é um/uma {seriesType} representando {seriesName}.',
                withoutName: ' A {seriesId} series é um/uma {seriesType}.',
                separator: {
                    middle: '',
                    end: ''
                }
            }
        },
        data: {
            allData: 'Os dados são: ',
            partialData: 'As primeiros {displayCnt} itens são: ',
            withName: 'os dados para {name} são {value}',
            withoutName: '{value}',
            separator: {
                middle: ', ',
                end: '. '
            }
        }
    }
};

Proposed changes

-        restore: {
-            title: 'Restore'
-        },
+        restore: {
+            title: 'Restaurar'
+        },
-        tree: 'Árvore',
+        tree: 'Gráfico de árvore',
-        treemap: 'Treemap',
+        treemap: 'Mapa de Árvore',
-        boxplot: 'Boxplot',
+        boxplot: 'Gráfico de caixa',
-        candlestick: 'Candlestick',
+        candlestick: 'Gráfico de vela',
-        k: 'Gráfico K line',
+        k: 'Gráfico de linha K',
-        pictorialBar: 'Pictorial bar',
+        pictorialBar: 'Barra pictórica',
-        themeRiver: 'Theme River Map',
+        themeRiver: 'Gráfico de rio de tema',
-        sunburst: 'Sunburst',
+        sunburst: 'Gráfico de explosão solar',
-        graph: 'Relationship graph',
+        graph: 'Grafo',
plainheart commented 3 days ago

Feel free to open a PR for this.

ViniciusCestarii commented 2 days ago

Hey there! I found the file with the pt-BR translations but it has a warning to not modify it directly. What file should i modify to open a PR?

plainheart commented 2 days ago

@ViniciusCestarii Hi, please modify the source file https://github.com/apache/echarts/blob/master/src/i18n/langPT-br.ts

ViniciusCestarii commented 2 days ago

@plainheart hi, I created the PR https://github.com/apache/echarts/pull/20348