Skip to content

[Bug]: The i18n locales profile for lowcoder-comps does not work #159

Closed
@exqmjmz

Description

@exqmjmz

Is there an existing issue for this?

  • I have searched the existing issues

Current Behavior

image
image

I set up the i18n locales file in the lowcoder-comps directory.
But it doesn't translate as it is set, it still keeps the original English content.

Expected Behavior

Translation according to i18n locales file.

Steps to reproduce

lowcoder-comps i18n locales zh.ts file changed to the following
Next, open the designer, place a chart, and view the chart setup options.

export const zh = {
    chart: {
        delete: "删除",
        data: "数据",
        mode: "模式",
        config: "配置",
        UIMode: "UI模式",
        chartType: "图表类型",
        xAxis: "X轴",
        chartSeries: "图表系列",
        customSeries: "自定义系列",
        add: "添加",
        confirmDelete: "确认删除:",
        seriesName: "系列名称",
        dataColumns: "数据列",
        title: "标题",
        xAxisDirection: "X轴方向",
        xAxisName: "X轴名称",
        xAxisType: "X轴类型",
        xAxisTypeTooltip: "默认情况下,根据X轴数据自动检测.有关类型描述,请参考:",
        logBase: "对数底数",
        yAxisName: "Y轴名称",
        yAxisType: "Y轴类型",
        yAxisDataFormat: "Y轴数据格式",
        yAxisDataFormatTooltip: `值表示每个坐标的值.示例:'{{value * 100 + "%"}}'`,
        basicBar: "基本柱状图",
        stackedBar: "堆叠柱状图",
        barType: "柱状图类型",
        categoryAxis: "分类轴",
        valueAxis: "值轴",
        timeAxis: "时间轴",
        logAxis: "对数轴",
        auto: "自动",
        legendPosition: "图例位置",
        basicLine: "基本折线图",
        stackedLine: "堆叠折线图",
        areaLine: "区域折线图",
        smooth: "平滑曲线",
        lineType: "折线图类型",
        basicPie: "基本饼图",
        doughnutPie: "环形饼图",
        rosePie: "玫瑰饼图",
        pieType: "饼图类型",
        spending: "支出",
        budget: "预算",
        bar: "柱状图",
        line: "折线图",
        scatter: "散点图",
        pie: "饼图",
        horizontal: "水平",
        vertical: "垂直",
        noData: "无数据",
        unknown: "未知",
        select: "选择",
        unSelect: "取消选择",
        echartsOptionLabel: "选项",
        echartsOptionTooltip: "ECharts选项",
        echartsOptionExamples: "ECharts示例",
        selectDesc: "当用户选择图表中的部分数据时触发",
        unselectDesc: "当用户取消选择图表中的部分数据时触发",
        selectedPointsDesc: "已选中的数据点",
        dataDesc: "当前图表使用的原始数据",
        titleDesc: "当前图表标题",
        scatterShape: "散点形状",
        circle: "圆形",
        rect: "矩形",
        triangle: "三角形",
        diamond: "菱形",
        pin: "图钉",
        arrow: "箭头",
        pointColorLabel: "数据点颜色",
        pointColorTooltip: `根据系列名称和当前数据点值设置数据点颜色,可选变量:seriesName、value.示例:'{{value < 25000 ? "red" : "green"}}'`,
    },
    imageEditor: {
        defaultSrc: "",
        save: "保存",
        saveDesc: "保存图像",
        src: "图像来源",
        name: "图像名称",
        buttonText: "按钮文本",
        srcDesc: "图像来源",
        nameDesc: "图像名称",
        dataURIDesc: "图像数据URI",
        dataDesc: "图像数据",
        buttonTextDesc: "按钮文本",
    },
    calendar: {
        events: "事件数据",
        editable: "可编辑",
        defaultDate: "默认日期",
        defaultDateTooltip: "日历最初显示的日期",
        defaultView: "默认视图",
        defaultViewTooltip: "日历最初显示的视图",
        showEventTime: "显示事件时间",
        showEventTimeTooltip: "是否显示事件的时间文本",
        showWeekends: "显示周末",
        showAllDay: "显示全天",
        showAllDayTooltip: "是否在周视图和日视图中显示全天时间段",
        dayMaxEvents: "每日最多事件数",
        dayMaxEventsTooltip: "在月视图中每天显示的事件最大数量,为0表示限制为单元格的高度",
        eventMaxStack: "事件最大堆叠数",
        eventMaxStackTooltip: "在周视图和日视图中水平堆叠的事件的最大数量,为0表示没有限制",
        selectInterval: "日历上选择的时间间隔",
        selectEvent: "已选事件",
        changeSet: "拖动日历中更改的事件对象,键为eventId,值为事件对象",
        headerBtnBackground: "按钮背景",
        btnText: "按钮文本",
        title: "标题",
        selectBackground: "选择背景",
        today: "今天",
        month: "月",
        week: "周",
        day: "日",
        list: "列表",
        monday: "星期一",
        tuesday: "星期二",
        wednesday: "星期三",
        thursday: "星期四",
        friday: "星期五",
        saturday: "星期六",
        sunday: "星期日",
        startWeek: "起始星期",
        creatEvent: "创建事件",
        editEvent: "编辑事件",
        eventName: "事件名称",
        eventColor: "事件颜色",
        eventGroupId: "分组ID",
        groupIdTooltip: "分组ID用于将不同的事件分组,同一组内的事件可以一起拖动和调整大小.",
        more: "更多",
        allDay: "全天",
        eventNameRequire: "请输入事件名称",
        eventId: "事件ID",
        eventIdRequire: "请输入事件ID",
        eventIdTooltip: "每个事件的唯一标识符",
        eventIdExist: "ID已存在",
    },
};

Environment

No response

Additional Information

No response

Metadata

Metadata

Assignees

Labels

BugSomething isn't workingNeeds triageNeeds to be reviewed by core team

Type

No type

Projects

Status

✅ Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions