Skip to content

Commit

Permalink
Upgrades locales
Browse files Browse the repository at this point in the history
Details:
- Fixes some minor localisation issues
- Fine tunes en.json
- Backports en.json into dev.json
- Drafts a full fr.json
  • Loading branch information
jacomyal committed Jul 13, 2023
1 parent 0af6951 commit 3b53ac5
Show file tree
Hide file tree
Showing 6 changed files with 706 additions and 110 deletions.
4 changes: 2 additions & 2 deletions src/components/GraphCaption/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,11 @@ const GraphCaption: FC<GraphCaptionProps> = ({ minimal }) => {
: undefined;

return (
<div title="caption" className={cx("graph-caption", collapsed ? "collapsed" : "border")}>
<div className={cx("graph-caption", collapsed ? "collapsed" : "border")}>
<div className="d-flex flex-column justify-content-end align-items-start align-self-end">
<div title={enabled ? undefined : t("graph.caption.disabled").toString()}>
<button
title={`${t(collapsed ? "graph.caption.expand" : "graph.caption.collapse")} `}
title={`${t(collapsed ? "common.expand" : "common.collapse")} `}
className="btn btn-ico btn-dark btn-sm"
disabled={!enabled}
onClick={(e) => {
Expand Down
2 changes: 1 addition & 1 deletion src/components/GraphFilters/FilterCreator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export const FilterCreator: FC = () => {
return (
<div className="filter-item d-flex align-items-center justify-content-center">
<button type="button" className="btn btn-outline-dark border-0" onClick={() => setIsOpened(true)}>
<CgAddR /> {t("common.add")} {t("filters.filter")}
<CgAddR /> {t("filters.add_filter")}
</button>
</div>
);
Expand Down
2 changes: 1 addition & 1 deletion src/components/forms/GraphMetadataForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export const GraphMetadataForm: FC = () => {
>
{GraphTypeValues.map((v) => (
<option key={v} value={v}>
{v}
{t(`graph.model.${v}`)}
</option>
))}
</select>
Expand Down
48 changes: 26 additions & 22 deletions src/locales/dev.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@
},
"github": {
"title": "GitHub authentication",
"select_ui_language": "Select application language",
"description": "You can log into GitHub from Gephi Lite, to save and load graph files directly as GitHub Gists.",
"logged_as": "You are currently logged into GitHub as {{username}}."
"logged_as": "You are currently logged into GitHub as {{username}}.",
"select_ui_language": "Select application language"
},
"auth": {
"unauth_success": "Unauthentication successful",
Expand All @@ -62,16 +62,16 @@
"title": "Data overview"
},
"selection": {
"nodes_zero": "No selected item",
"nodes_zero": "No selected node",
"nodes_one": "One selected node",
"nodes": "{{count}} selected nodes",
"edges_zero": "No selected item",
"edges_zero": "No selected edge",
"edges_one": "One selected edge",
"edges": "{{count}} selected edges",
"visible_nodes_zero": "No visible selected item",
"visible_nodes_zero": "No visible selected node",
"visible_nodes_one": "One visible selected node",
"visible_nodes": "{{count}} visible selected nodes",
"visible_edges_zero": "No visible selected item",
"visible_edges_zero": "No visible selected edge",
"visible_edges_one": "One visible selected edge",
"visible_edges": "{{count}} visible selected edges",
"hidden_nodes_one": "One hidden selected node",
Expand Down Expand Up @@ -155,6 +155,7 @@
"title": "Filters",
"description": "This panel allows to filter the graph by stacking filters.",
"filter": "Filter",
"add_filter": "Add filter",
"full_graph": "Full graph",
"using": "Using",
"topological": "Topology",
Expand All @@ -173,10 +174,10 @@
"create_edges": "Create new edge",
"create_nodes_success": "The node has successfully been created.",
"create_edges_success": "The edge has successfully been created.",
"update_this_nodes": "Update this node",
"update_this_edges": "Update this edge",
"update_nodes": "Update existing node",
"update_edges": "Update existing edge",
"update_this_nodes": "Edit this node",
"update_this_edges": "Edit this edge",
"update_nodes": "Edit existing node",
"update_edges": "Edit existing edge",
"update_nodes_success": "The node has successfully been updated.",
"update_edges_success": "The edge has successfully been updated.",
"delete_this_nodes": "Delete this node",
Expand Down Expand Up @@ -229,6 +230,9 @@
"qualitative": "Qualitative",
"quantitative": "Quantitative"
},
"directed": "Directed",
"undirected": "Undirected",
"mixed": "Mixed",
"nodes_one": "node",
"nodes_zero": "node",
"nodes": "nodes",
Expand Down Expand Up @@ -258,9 +262,7 @@
"attribute-name": "Attribute name",
"attribute-value": "Attribute value",
"new-attribute": "Add new attribute"
},
"nodes_plural": "",
"edges_plural": ""
}
},
"open": {
"title": "Open a graph file",
Expand Down Expand Up @@ -312,17 +314,18 @@
}
},
"caption": {
"color": " {{itemType}} colors:",
"size": "{{itemType}} size:",
"color": "Color {{itemType}} by",
"size": "Size {{itemType}} by",
"title": "Caption",
"disabled": "Caption is available once appearance has been set."
}
},
"statistics": {
"title": "Statistics",
"compute_one": "Compute metric",
"compute": "Compute metrics",
"success_one": "The {{items}} metric {{metrics}} has been added to the data. It is now available in other panels.",
"success": "The {{items}} metrics {{metrics}} have been added to the data. They are now available in other panels.",
"success_one": "The {{items}} metric \"{{metrics}}\" has been added to the data.",
"success": "The {{items}} metrics \"{{metrics}}\" have been added to the data.",
"description": "This panel allows computing new attributes to the nodes or edges of the graph. These attributes can later be used in the other panels, for appearance or filtering for instance.",
"placeholder": "Select an algorithm",
"attributes_placeholder": "None",
Expand Down Expand Up @@ -461,16 +464,14 @@
"custom": "Attribute name on which to store the metric"
}
}
},
"success_plural": "",
"compute_plural": ""
}
},
"layouts": {
"title": "Layout",
"description": "This panel allows computing new coordintaes to nodes of the graph. ",
"description": "This panel allows computing new coordinates to nodes of the graph. ",
"placeholder": "Select a layout algorithm",
"exec": {
"success": "Layout {{layout}} has been applied",
"success": "Layout \"{{layout}}\" has successfully been applied.",
"started": "Layout {{layout}} is running",
"stopped": "Layout {{layout}} has been stopped"
},
Expand Down Expand Up @@ -635,11 +636,13 @@
"cancel": "Cancel",
"clear": "Clear",
"close": "Close",
"collapse": "Collapse",
"confirm": "Confirm",
"copy": "Copy",
"created": "Created",
"delete": "Delete",
"edit": "Edit",
"expand": "Expand",
"filename": "Filename",
"hide": "Hide",
"load-more": "Load more",
Expand All @@ -654,6 +657,7 @@
"reset": "Reset",
"save": "Save",
"save-and-run": "Save and run",
"select": "Select...",
"start": "Start",
"stop": "Stop",
"size": "Size",
Expand Down
40 changes: 21 additions & 19 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -62,23 +62,21 @@
"title": "Data overview"
},
"selection": {
"nodes_zero": "No selected node",
"nodes_one": "One selected node",
"nodes_other": "",
"nodes": "{{count}} selected nodes",
"edges_zero": "No selected edge",
"edges_one": "One selected edge",
"edges_other": "",
"edges": "{{count}} selected edges",
"visible_nodes_zero": "No visible selected node",
"visible_nodes_one": "One visible selected node",
"visible_nodes_other": "",
"visible_nodes": "{{count}} visible selected nodes",
"visible_edges_zero": "No visible selected edge",
"visible_edges_one": "One visible selected edge",
"visible_edges_other": "",
"visible_edges": "{{count}} visible selected edges",
"hidden_nodes_one": "One hidden selected node",
"hidden_nodes_other": "",
"hidden_nodes": "{{count}} hidden selected nodes",
"hidden_edges_one": "One hidden selected edge",
"hidden_edges_other": "",
"hidden_edges": "{{count}} hidden selected edges",
"select_all": "Select all",
"unselect_all": "Unselect all",
Expand Down Expand Up @@ -157,6 +155,7 @@
"title": "Filters",
"description": "This panel allows to filter the graph by stacking filters.",
"filter": "Filter",
"add_filter": "Add filter",
"full_graph": "Full graph",
"using": "Using",
"topological": "Topology",
Expand All @@ -175,25 +174,23 @@
"create_edges": "Create new edge",
"create_nodes_success": "The node has successfully been created.",
"create_edges_success": "The edge has successfully been created.",
"update_this_nodes": "Update this node",
"update_this_edges": "Update this edge",
"update_nodes": "Update existing node",
"update_edges": "Update existing edge",
"update_this_nodes": "Edit this node",
"update_this_edges": "Edit this edge",
"update_nodes": "Edit existing node",
"update_edges": "Edit existing edge",
"update_nodes_success": "The node has successfully been updated.",
"update_edges_success": "The edge has successfully been updated.",
"delete_this_nodes": "Delete this node",
"delete_this_edges": "Delete this edge",
"delete_nodes_zero": "Delete nodes",
"delete_nodes_one": "Delete one node",
"delete_nodes_other": "",
"delete_nodes": "Delete {{count}} nodes",
"delete_edges_zero": "Delete edges",
"delete_edges_one": "Delete one edge",
"delete_edges_other": "",
"delete_edges": "Delete {{count}} edges",
"confirm_delete_nodes_one": "Are you sure you want to delete this one node?",
"confirm_delete_nodes_other": "",
"confirm_delete_nodes": "Are you sure you want to delete {{count}} nodes?",
"confirm_delete_edges_one": "Are you sure you want to delete this one edge?",
"confirm_delete_edges_other": "",
"confirm_delete_edges": "Are you sure you want to delete {{count}} edges?",
"search_nodes": "Search on node labels..."
},
Expand Down Expand Up @@ -233,11 +230,14 @@
"qualitative": "Qualitative",
"quantitative": "Quantitative"
},
"directed": "Directed",
"undirected": "Undirected",
"mixed": "Mixed",
"nodes_one": "node",
"nodes_other": "",
"nodes_zero": "node",
"nodes": "nodes",
"edges_one": "edge",
"edges_other": "",
"edges_zero": "edge",
"edges": "edges",
"nodes-data": {
"id": "Node ID",
Expand Down Expand Up @@ -323,10 +323,8 @@
"statistics": {
"title": "Statistics",
"compute_one": "Compute metric",
"compute_other": "",
"compute": "Compute metrics",
"success_one": "The {{items}} metric \"{{metrics}}\" has been added to the data.",
"success_other": "",
"success": "The {{items}} metrics \"{{metrics}}\" have been added to the data.",
"description": "This panel allows computing new attributes to the nodes or edges of the graph. These attributes can later be used in the other panels, for appearance or filtering for instance.",
"placeholder": "Select an algorithm",
Expand Down Expand Up @@ -623,7 +621,8 @@
},
"script": {
"title": "Custom layout",
"description": "Write your own layout by creating a function that returns a {x,y} object for each node"
"description": "Write your own layout by creating a function that returns a {x,y} object for each node",
"parameters": {}
}
},
"file": {
Expand All @@ -637,11 +636,13 @@
"cancel": "Cancel",
"clear": "Clear",
"close": "Close",
"collapse": "Collapse",
"confirm": "Confirm",
"copy": "Copy",
"created": "Created",
"delete": "Delete",
"edit": "Edit",
"expand": "Expand",
"filename": "Filename",
"hide": "Hide",
"load-more": "Load more",
Expand All @@ -656,6 +657,7 @@
"reset": "Reset",
"save": "Save",
"save-and-run": "Save and run",
"select": "Select...",
"start": "Start",
"stop": "Stop",
"size": "Size",
Expand Down
Loading

0 comments on commit 3b53ac5

Please sign in to comment.