Skip to content

Commit

Permalink
refactor(web): update translation (#1277)
Browse files Browse the repository at this point in the history
  • Loading branch information
mkumbobeaty authored Nov 26, 2024
1 parent 9847bb2 commit b65410f
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 50 deletions.
2 changes: 1 addition & 1 deletion server/pkg/builtin/manifest_ja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ extensions:
description: 有効にすると、カメラは地形の中を移動でき、地下エリアに入ることができます。
fov:
title: 視野(FOV)
description: カメラの視野 (FOV) (ラジアン単位)。カメラに見えるシーンの垂直方向の角度範囲を定義します。私たちのシステムでサポートされている範囲は 0.1 2.0 です。
description: "垂直方向のカメラの視野を変更します(単位はラジアン)。最小値: 0.1 最大値: 2.0"

cesium:
name: Cesium
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ const ConditionsTab: FC<Props> = ({
/>
<ConditionWrapper>
<ConditionStatement>
<Typography size="body">{t("if")}</Typography>
<Typography size="body">if</Typography>
<InputWrapper>
<TextInput
value={condition.variable || ""}
Expand Down Expand Up @@ -200,7 +200,6 @@ const ConditionsTab: FC<Props> = ({
[
conditions,
field,
t,
valueOptions,
deleteCondition,
updateCondition,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import {
PopupMenuItem
} from "@reearth/beta/lib/reearth-ui";
import { LayerStyle } from "@reearth/services/api/layerStyleApi/utils";
import { useT } from "@reearth/services/i18n";
import { useEffect, FC, useCallback, useRef } from "react";

import { LayerStyleAddProps } from "../../../hooks/useLayerStyles";
Expand Down Expand Up @@ -34,14 +33,12 @@ const PresetLayerStyle: FC<PresetLayerStyleProps> = ({
onLayerStyleAdd,
onLayerStyleSelect
}) => {
const t = useT();

const layerStyleAddedRef = useRef<string | undefined>(undefined);

const handleLayerStyleAddition = useCallback(
(value?: Record<string, unknown>, styleName?: string) => {
const name = getLayerStyleName(
styleName ? styleName : t("Style"),
styleName ? styleName : "Style",
layerStyles
);
onLayerStyleAdd({
Expand All @@ -50,7 +47,7 @@ const PresetLayerStyle: FC<PresetLayerStyleProps> = ({
});
layerStyleAddedRef.current = name;
},
[t, layerStyles, onLayerStyleAdd]
[layerStyles, onLayerStyleAdd]
);

useEffect(() => {
Expand All @@ -66,78 +63,78 @@ const PresetLayerStyle: FC<PresetLayerStyleProps> = ({
const menuItems: PopupMenuItem[] = [
{
id: "empty",
title: t("Empty"),
title: "Empty",
onClick: () => handleLayerStyleAddition({})
},
{
id: "default",
title: t("Default"),
title: "Default",
onClick: () => handleLayerStyleAddition(defaultStyle, "Default")
},
{
id: "professional",
title: t("Professional"),
title: "Professional",
onClick: () => handleLayerStyleAddition(professionalStyle, "Professional")
},
{
id: "basicGeometry",
title: t("Basic Geometry"),
title: "Basic Geometry",
icon: "folderSimple",
subItem: [
{
id: "point",
title: t("Points"),
title: "Points",
onClick: () => handleLayerStyleAddition(pointStyle, "Points")
},
{
id: "pointWithLabel",
title: t("Point with label"),
title: "Point with label",
onClick: () =>
handleLayerStyleAddition(pointWithLabelStyle, "Point_with_label")
},
{
id: "polyline",
title: t("Polyline"),
title: "Polyline",
onClick: () => handleLayerStyleAddition(polylineStyle, "Polyline")
},
{
id: "polygon",
title: t("Polygon"),
title: "Polygon",
onClick: () => handleLayerStyleAddition(polygonStyle, "Polygon")
},
{
id: "extrudedPolygon",
title: t("Extruded polygon"),
title: "Extruded polygon",
onClick: () =>
handleLayerStyleAddition(extrudedPolygonStyle, "Extruded_polygon")
},
{
id: "threedTiles",
title: t("3D Tiles"),
title: "3D Tiles",
onClick: () => handleLayerStyleAddition(threeDTilesStyle, "3D_tiles")
}
]
},
{
id: "geometry",
title: t("Geometry"),
title: "Geometry",
icon: "folderSimple",
subItem: [
{
id: "simpleStyle",
title: t("Simple Style"),
title: "Simple Style",
onClick: () => handleLayerStyleAddition(simpleStyle, "Simple_style")
}
]
},
{
id: "plateau",
title: t("Plateau"),
title: "Plateau",
icon: "folderSimple",
subItem: [
{
id: "colorBuilding",
title: t("Color buildings by height"),
title: "Color buildings by height",
onClick: () =>
handleLayerStyleAddition(
colorBuildingsByHeight,
Expand Down
15 changes: 1 addition & 14 deletions web/src/services/i18n/translations/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ Code: ''
Invalid style: ''
Save: ''
No style selected: ''
if: ''
Condition is incompatible with the current system for this node or value.: ''
Expression is incompatible with the current system for this node or value.: ''
${your property name}: ''
Expand All @@ -153,19 +152,6 @@ font weight: ''
font color: ''
italic: ''
New node: ''
Style: ''
Empty: ''
Default: ''
Professional: ''
Basic Geometry: ''
Points: ''
Point with label: ''
Polyline: ''
Polygon: ''
Extruded polygon: ''
Simple Style: ''
Plateau: ''
Color buildings by height: ''
Main: ''
Tiles: ''
Terrain: ''
Expand Down Expand Up @@ -446,6 +432,7 @@ Successfully upgraded plugin!: ''
Failed to uninstall plugin.: ''
Successfully uninstalled plugin.: ''
Failed to create project.: ''
Default: ''
Failed to create story page on project creation.: ''
Successfully created project!: ''
Failed to publish project.: ''
Expand Down
15 changes: 1 addition & 14 deletions web/src/services/i18n/translations/ja.yml
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,6 @@ Code: コード
Invalid style: 無効なスタイル
Save: 保存
No style selected: スタイルが選択されていません
if: もし
Condition is incompatible with the current system for this node or value.: 条件は現在のシステムと互換性がありません。
Expression is incompatible with the current system for this node or value.: 式は現在のシステムと互換性がありません。
${your property name}: ${プロパティ名}
Expand All @@ -156,19 +155,6 @@ font weight: フォントウェイト
font color: フォントカラー
italic: イタリック
New node: 新しいノード
Style: スタイル
Empty:
Default: デフォルト
Professional: プロフェッショナル
Basic Geometry: 基本ジオメトリ
Points: ポイント
Point with label: ラベル付きポイント
Polyline: ポリライン
Polygon: ポリゴン
Extruded polygon: 押し出しポリゴン
Simple Style: シンプルスタイル
Plateau: 台地
Color buildings by height: 高さで建物の色を設定
Main: メイン
Tiles: タイル
Terrain: 地形
Expand Down Expand Up @@ -449,6 +435,7 @@ Successfully upgraded plugin!: プラグインのアップグレードに成功
Failed to uninstall plugin.: プラグインの削除に失敗しました。
Successfully uninstalled plugin.: プラグインのアンインストールに成功しました。
Failed to create project.: プロジェクトの作成に失敗しました。
Default: デフォルト
Failed to create story page on project creation.: プロジェクト作成時にストーリーページの作成に失敗しました。
Successfully created project!: 新しいプロジェクトの作成に成功しました!
Failed to publish project.: プロジェクト公開に失敗しました。
Expand Down

0 comments on commit b65410f

Please sign in to comment.