Translation c_jobs

Hi
I would like to translate “Positions” (c_jobs) in metasfresh. In the current version, there is no translations register for this table available. Is there a way to add one or are there any other options to translate this?
many thanks for your help.
Simon

Hi,

there is a generic translation logic in metasfresh.
I have not done that for a while but as far as I remember you need to create a table with same name plus “_trl”.
You can check the config of existing trl tables.

If setup correctly, metasfresh will automatically create translation records once you adding or updating records in the main table.

Does anyone got more details about how to configure it?

Norbert

hi,

I got now a similar case where I want to request status to another other language.
I tried to configure it and I kind of succeeded but I cant save.
Error:

2018-06-07 14:32:30.354 ERROR 21678 --- [AWT-EventQueue-0] org.compiere.model.GridTable             : Error while saving on GridTable[R_Status_Trl,WindowNo=2,Tab=2]
 Type: SaveError

org.postgresql.util.PSQLException: F?r die Tabelle R_Status_Trl konnte kein Prim?rschl?ssel gefunden werden.
	at org.postgresql.jdbc.PgResultSet.isUpdateable(PgResultSet.java:1586)
	at org.postgresql.jdbc.PgResultSet.checkUpdateable(PgResultSet.java:2722)
	at org.postgresql.jdbc.PgResultSet.moveToInsertRow(PgResultSet.java:1029)
	at com.mchange.v2.c3p0.impl.NewProxyResultSet.moveToInsertRow(NewProxyResultSet.java:4110)
	at org.compiere.model.GridTable.dataSave(GridTable.java:1525)
	at org.compiere.model.GridTab.dataSave(GridTab.java:1323)
	at org.compiere.apps.APanel.cmd_save(APanel.java:2374)
	at org.compiere.apps.APanel.actionPerformed(APanel.java:1966)
	at org.compiere.apps.AppsAction.actionPerformed(AppsAction.java:455)
	at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2022)
	at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2348)
	at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402)
	at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259)
	at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252)
	at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:289)
	at java.awt.Component.processMouseEvent(Component.java:6533)
	at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
	at java.awt.Component.processEvent(Component.java:6298)
	at java.awt.Container.processEvent(Container.java:2236)
	at java.awt.Component.dispatchEventImpl(Component.java:4889)
	at java.awt.Container.dispatchEventImpl(Container.java:2294)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
	at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4525)
	at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
	at java.awt.Container.dispatchEventImpl(Container.java:2280)
	at java.awt.Window.dispatchEventImpl(Window.java:2746)
	at java.awt.Component.dispatchEvent(Component.java:4711)
	at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:758)
	at java.awt.EventQueue.access$500(EventQueue.java:97)
	at java.awt.EventQueue$3.run(EventQueue.java:709)
	at java.awt.EventQueue$3.run(EventQueue.java:703)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:90)
	at java.awt.EventQueue$4.run(EventQueue.java:731)
	at java.awt.EventQueue$4.run(EventQueue.java:729)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:80)
	at java.awt.EventQueue.dispatchEvent(EventQueue.java:728)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:201)
	at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:116)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:105)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
	at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:93)
	at java.awt.EventDispatchThread.run(EventDispatchThread.java:82)

I know that translation tables do have a combined key made from ID + language.
Therefore both columns ID and language have the checkbox “parent link column” set.

Any hints what I am missing?

Update:
I used the process “Generate Primary Key for selected Table” and that one is not needed as the table for TRL was created correctly in the first place.

Lesson learned: dont use the process for generate primary keys on TRL tables.

How I fixed it:

  • dropped the table in db with a statement like drop table ...
  • synchronized columns

The table was then created from scratch with the definition stored in the appdictionary.

1 Like

hi Simon,

were you able to set it up?

cheers,
Norbert

hi Norbert
yes, setting up the _TRL table solved the Issue.
Many thanks
Simon

Hi Simon,
thanks a lot.

Would you like to contribute your new Translation Table? Please add a Pull Request. That would be great.
I created an issue for that. https://github.com/metasfresh/metasfresh/issues/4227

Thanks in advance.
Mark