mirror of
https://bitbucket.org/wisemapping/wisemapping-frontend.git
synced 2024-11-22 06:37:56 +01:00
Add internationalization.
This commit is contained in:
parent
94e8046bae
commit
b3587acfee
@ -220,5 +220,17 @@
|
||||
},
|
||||
"icon-picker.show-images": {
|
||||
"defaultMessage": "Bilder anzeigen"
|
||||
},
|
||||
"editor-panel.tooltip-connection-style": {
|
||||
"defaultMessage": "Verbindungsstil"
|
||||
},
|
||||
"editor-panel.tooltip-connection-style-curved": {
|
||||
"defaultMessage": "Kurve"
|
||||
},
|
||||
"editor-panel.tooltip-connection-style-polyline": {
|
||||
"defaultMessage": "Polylinie"
|
||||
},
|
||||
"editor-panel.tooltip-connection-style-polyline-curved": {
|
||||
"defaultMessage": "Gekrümmte Polylinie"
|
||||
}
|
||||
}
|
@ -62,6 +62,18 @@
|
||||
"editor-panel.tooltip-add-topic": {
|
||||
"defaultMessage": "Add Topic"
|
||||
},
|
||||
"editor-panel.tooltip-connection-style": {
|
||||
"defaultMessage": "Connection Style"
|
||||
},
|
||||
"editor-panel.tooltip-connection-style-curved": {
|
||||
"defaultMessage": "Curved"
|
||||
},
|
||||
"editor-panel.tooltip-connection-style-polyline": {
|
||||
"defaultMessage": "Polyline"
|
||||
},
|
||||
"editor-panel.tooltip-connection-style-polyline-curved": {
|
||||
"defaultMessage": "Curved Polyline"
|
||||
},
|
||||
"editor-panel.tooltip-delete-topic": {
|
||||
"defaultMessage": "Delete Topic"
|
||||
},
|
||||
|
@ -214,5 +214,17 @@
|
||||
},
|
||||
"icon-picker.show-images": {
|
||||
"defaultMessage": "Mostrar imagenes"
|
||||
},
|
||||
"editor-panel.tooltip-connection-style": {
|
||||
"defaultMessage": "Estilo de Connexión"
|
||||
},
|
||||
"editor-panel.tooltip-connection-style-curved": {
|
||||
"defaultMessage": "Curva"
|
||||
},
|
||||
"editor-panel.tooltip-connection-style-polyline": {
|
||||
"defaultMessage": "Polilinea"
|
||||
},
|
||||
"editor-panel.tooltip-connection-style-polyline-curved": {
|
||||
"defaultMessage": "Polilinea Curva"
|
||||
}
|
||||
}
|
@ -214,5 +214,17 @@
|
||||
},
|
||||
"icon-picker.show-images": {
|
||||
"defaultMessage": "Afficher les images"
|
||||
},
|
||||
"editor-panel.tooltip-connection-style": {
|
||||
"defaultMessage": "Style de connexion"
|
||||
},
|
||||
"editor-panel.tooltip-connection-style-curved": {
|
||||
"defaultMessage": "Courbe"
|
||||
},
|
||||
"editor-panel.tooltip-connection-style-polyline": {
|
||||
"defaultMessage": "Polyligne"
|
||||
},
|
||||
"editor-panel.tooltip-connection-style-polyline-curved": {
|
||||
"defaultMessage": "Polyligne courbe"
|
||||
}
|
||||
}
|
@ -131,6 +131,30 @@
|
||||
"value": "Thema hinzufügen"
|
||||
}
|
||||
],
|
||||
"editor-panel.tooltip-connection-style": [
|
||||
{
|
||||
"type": 0,
|
||||
"value": "Verbindungsstil"
|
||||
}
|
||||
],
|
||||
"editor-panel.tooltip-connection-style-curved": [
|
||||
{
|
||||
"type": 0,
|
||||
"value": "Kurve"
|
||||
}
|
||||
],
|
||||
"editor-panel.tooltip-connection-style-polyline": [
|
||||
{
|
||||
"type": 0,
|
||||
"value": "Polylinie"
|
||||
}
|
||||
],
|
||||
"editor-panel.tooltip-connection-style-polyline-curved": [
|
||||
{
|
||||
"type": 0,
|
||||
"value": "Gekrümmte Polylinie"
|
||||
}
|
||||
],
|
||||
"editor-panel.tooltip-delete-topic": [
|
||||
{
|
||||
"type": 0,
|
||||
|
@ -125,6 +125,30 @@
|
||||
"value": "Add Topic"
|
||||
}
|
||||
],
|
||||
"editor-panel.tooltip-connection-style": [
|
||||
{
|
||||
"type": 0,
|
||||
"value": "Connection Style"
|
||||
}
|
||||
],
|
||||
"editor-panel.tooltip-connection-style-curved": [
|
||||
{
|
||||
"type": 0,
|
||||
"value": "Curved"
|
||||
}
|
||||
],
|
||||
"editor-panel.tooltip-connection-style-polyline": [
|
||||
{
|
||||
"type": 0,
|
||||
"value": "Polyline"
|
||||
}
|
||||
],
|
||||
"editor-panel.tooltip-connection-style-polyline-curved": [
|
||||
{
|
||||
"type": 0,
|
||||
"value": "Curved Polyline"
|
||||
}
|
||||
],
|
||||
"editor-panel.tooltip-delete-topic": [
|
||||
{
|
||||
"type": 0,
|
||||
|
@ -125,6 +125,30 @@
|
||||
"value": "Agregar tópico"
|
||||
}
|
||||
],
|
||||
"editor-panel.tooltip-connection-style": [
|
||||
{
|
||||
"type": 0,
|
||||
"value": "Estilo de Connexión"
|
||||
}
|
||||
],
|
||||
"editor-panel.tooltip-connection-style-curved": [
|
||||
{
|
||||
"type": 0,
|
||||
"value": "Curva"
|
||||
}
|
||||
],
|
||||
"editor-panel.tooltip-connection-style-polyline": [
|
||||
{
|
||||
"type": 0,
|
||||
"value": "Polilinea"
|
||||
}
|
||||
],
|
||||
"editor-panel.tooltip-connection-style-polyline-curved": [
|
||||
{
|
||||
"type": 0,
|
||||
"value": "Polilinea Curva"
|
||||
}
|
||||
],
|
||||
"editor-panel.tooltip-delete-topic": [
|
||||
{
|
||||
"type": 0,
|
||||
|
@ -125,6 +125,30 @@
|
||||
"value": "Agregar Topico"
|
||||
}
|
||||
],
|
||||
"editor-panel.tooltip-connection-style": [
|
||||
{
|
||||
"type": 0,
|
||||
"value": "Style de connexion"
|
||||
}
|
||||
],
|
||||
"editor-panel.tooltip-connection-style-curved": [
|
||||
{
|
||||
"type": 0,
|
||||
"value": "Courbe"
|
||||
}
|
||||
],
|
||||
"editor-panel.tooltip-connection-style-polyline": [
|
||||
{
|
||||
"type": 0,
|
||||
"value": "Polyligne"
|
||||
}
|
||||
],
|
||||
"editor-panel.tooltip-connection-style-polyline-curved": [
|
||||
{
|
||||
"type": 0,
|
||||
"value": "Polyligne courbe"
|
||||
}
|
||||
],
|
||||
"editor-panel.tooltip-delete-topic": [
|
||||
{
|
||||
"type": 0,
|
||||
|
@ -158,6 +158,15 @@ export function buildEditorPanelConfig(model: Editor, intl: IntlShape): ActionCo
|
||||
defaultMessage: 'Connection Style',
|
||||
}),
|
||||
options: [
|
||||
{
|
||||
icon: <GestureOutlined />,
|
||||
tooltip: intl.formatMessage({
|
||||
id: 'editor-panel.tooltip-connection-style-curved',
|
||||
defaultMessage: 'Curved',
|
||||
}),
|
||||
onClick: () => valueBulder.getConnectionStyleModel().setValue(LineType.SIMPLE_CURVED),
|
||||
selected: () => valueBulder.getConnectionStyleModel().getValue() === LineType.SIMPLE_CURVED,
|
||||
},
|
||||
{
|
||||
icon: <PolylineOutlined />,
|
||||
tooltip: intl.formatMessage({
|
||||
@ -172,21 +181,12 @@ export function buildEditorPanelConfig(model: Editor, intl: IntlShape): ActionCo
|
||||
icon: <TimelineOutined />,
|
||||
tooltip: intl.formatMessage({
|
||||
id: 'editor-panel.tooltip-connection-style-polyline-curved',
|
||||
defaultMessage: 'Polyline Curved',
|
||||
defaultMessage: 'Curved Polyline',
|
||||
}),
|
||||
onClick: () => valueBulder.getConnectionStyleModel().setValue(LineType.POLYLINE_CURVED),
|
||||
selected: () =>
|
||||
valueBulder.getConnectionStyleModel().getValue() === LineType.POLYLINE_CURVED,
|
||||
},
|
||||
{
|
||||
icon: <GestureOutlined />,
|
||||
tooltip: intl.formatMessage({
|
||||
id: 'editor-panel.tooltip-connection-style-curved',
|
||||
defaultMessage: 'Curved',
|
||||
}),
|
||||
onClick: () => valueBulder.getConnectionStyleModel().setValue(LineType.SIMPLE_CURVED),
|
||||
selected: () => valueBulder.getConnectionStyleModel().getValue() === LineType.SIMPLE_CURVED,
|
||||
},
|
||||
],
|
||||
disabled: () => model.getDesignerModel().filterSelectedTopics().length === 0,
|
||||
};
|
||||
|
@ -660,7 +660,7 @@ class Designer extends Events {
|
||||
|
||||
this._workspace.append(result);
|
||||
children.forEach((child) => {
|
||||
if ($defined(child)) {
|
||||
if (child) {
|
||||
this.nodeModelToTopic(child);
|
||||
}
|
||||
});
|
||||
@ -690,10 +690,6 @@ class Designer extends Events {
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param {mindplot.model.RelationshipModel} model
|
||||
* @return {mindplot.Relationship} the relationship added to the mindmap
|
||||
*/
|
||||
addRelationship(model: RelationshipModel): Relationship {
|
||||
const mindmap = this.getMindmap();
|
||||
mindmap.addRelationship(model);
|
||||
@ -881,7 +877,7 @@ class Designer extends Events {
|
||||
changeConnectionStyle(type: LineType): void {
|
||||
const validateFunc = (topic: Topic) => !topic.isCentralTopic();
|
||||
|
||||
const validateError = 'Central Topic can not be changed to line figure.';
|
||||
const validateError = 'Central topic connection style can not be changed for central topic.';
|
||||
const topicsIds = this.getModel().filterTopicsIds(validateFunc, validateError);
|
||||
if (topicsIds.length > 0) {
|
||||
this._actionDispatcher.changeConnectionStyleToTopic(topicsIds, type);
|
||||
|
@ -548,10 +548,17 @@ abstract class Topic extends NodeGraph {
|
||||
}
|
||||
|
||||
setConnectionStyle(type: LineType): void {
|
||||
this.getModel().setConnectionStyle(type);
|
||||
const model = this.getModel();
|
||||
model.setConnectionStyle(type);
|
||||
|
||||
// Needs to change change all the lines types. Outgoing are part of the children.
|
||||
this.getChildren().map((topic: Topic) => topic.redraw());
|
||||
|
||||
// If chidren nodes does not children, set the connection style too. We don't want to have cascade changes on all the branches.
|
||||
model
|
||||
.getChildren()
|
||||
.filter((c) => c.getChildren().length === 0)
|
||||
.forEach((c) => c.setConnectionStyle(type));
|
||||
}
|
||||
|
||||
private _setBackgroundColor(color: string, updateModel: boolean) {
|
||||
@ -1157,7 +1164,6 @@ abstract class Topic extends NodeGraph {
|
||||
|
||||
private createConnectionLine(targetTopic: Topic): ConnectionLine {
|
||||
const type: LineType = targetTopic.getConnectionStyle();
|
||||
console.log(`redraw ...: ${type}`);
|
||||
return new ConnectionLine(this, targetTopic, type);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user