Browse Source

adds/adapts translation context markers

all nescessary in folder: Cura/plugins

Contributes to: issue CURA-116
Tamara Hogenhout 9 years ago
parent
commit
4a9bf2b4d6

+ 1 - 1
plugins/3MFReader/ThreeMFReader.py

@@ -120,5 +120,5 @@ class ThreeMFReader(MeshReader):
                 except:
                     pass
             except Exception as e:
-                Logger.log("e" ,"exception occured in 3mf reader: %s" , e)      
+                Logger.log("e" ,"exception occured in 3mf reader: %s" , e)
         return result  

+ 3 - 3
plugins/3MFReader/__init__.py

@@ -9,15 +9,15 @@ from . import ThreeMFReader
 def getMetaData():
     return {
         "plugin": {
-            "name": "3MF Reader",
+            "name": catalog.i18nc("@label", "3MF Reader"),
             "author": "Ultimaker",
             "version": "1.0",
-            "description": catalog.i18nc("3MF Reader plugin description", "Provides support for reading 3MF files."),
+            "description": catalog.i18nc("@info:whatsthis", "Provides support for reading 3MF files."),
             "api": 2
         },
         "mesh_reader": {
             "extension": "3mf",
-            "description": catalog.i18nc("3MF Reader plugin file type", "3MF File")
+            "description": catalog.i18nc("@item:inlistbox", "3MF File")
         }
     }
 

+ 0 - 1
plugins/ChangeLogPlugin/ChangeLog.qml

@@ -22,7 +22,6 @@ UM.Dialog
             text: manager.getChangeLogString()
             width:base.width - 35
             wrapMode: Text.Wrap;
-            //Component.onCompleted: console.log()
         }
     }
 }

+ 3 - 3
plugins/ChangeLogPlugin/__init__.py

@@ -1,18 +1,18 @@
 # Copyright (c) 2015 Ultimaker B.V.
 # Cura is released under the terms of the AGPLv3 or higher.
-from UM.i18n import i18nCatalog
 
 from . import ChangeLog
 
+from UM.i18n import i18nCatalog
 catalog = i18nCatalog("cura")
 
 def getMetaData():
     return {
         "plugin": {
-            "name": "Change log",
+            "name": catalog.i18nc("@label", "Change Log"),
             "author": "Ultimaker",
             "version": "1.0",
-            "description": catalog.i18nc("Change log plugin description", "Shows changes since latest checked version"),
+            "description":  catalog.i18nc("@info:whatsthis", "Shows changes since latest checked version"),
             "api": 2
         }
     }

+ 1 - 1
plugins/CuraEngineBackend/ProcessSlicedObjectListJob.py

@@ -27,7 +27,7 @@ class ProcessSlicedObjectListJob(Job):
 
     def run(self):
         if Application.getInstance().getController().getActiveView().getPluginId() == "LayerView":
-            self._progress = Message(catalog.i18nc("Layers View mode", "Layers"), 0, False, 0)
+            self._progress = Message(catalog.i18nc("@info", "Layers"), 0, False, 0)
             self._progress.show()
 
         Application.getInstance().getController().activeViewChanged.connect(self._onActiveViewChanged)

+ 2 - 2
plugins/CuraEngineBackend/__init__.py

@@ -10,9 +10,9 @@ catalog = i18nCatalog("cura")
 def getMetaData():
     return {
         "plugin": {
-            "name": "CuraEngine Backend",
+            "name": catalog.i18nc("@label", "CuraEngine Backend"),
             "author": "Ultimaker",
-            "description": catalog.i18nc("CuraEngine backend plugin description", "Provides the link to the CuraEngine slicing backend"),
+            "description": catalog.i18nc("@info:whatsthis", "Provides the link to the CuraEngine slicing backend"),
             "api": 2
         }
     }

+ 3 - 3
plugins/GCodeWriter/__init__.py

@@ -9,17 +9,17 @@ catalog = i18nCatalog("cura")
 def getMetaData():
     return {
         "plugin": {
-            "name": "GCode Writer",
+            "name": catalog.i18nc("@label", "GCode Writer"),
             "author": "Ultimaker",
             "version": "1.0",
-            "description": catalog.i18nc("GCode Writer Plugin Description", "Writes GCode to a file"),
+            "description": catalog.i18nc("@info:whatsthis", "Writes GCode to a file"),
             "api": 2
         },
 
         "mesh_writer": {
             "output": [{
                 "extension": "gcode",
-                "description": catalog.i18nc("GCode Writer File Description", "GCode File"),
+                "description": catalog.i18nc("@item:inlistbox", "GCode File"),
                 "mime_type": "text/x-gcode",
                 "mode": GCodeWriter.GCodeWriter.OutputMode.TextMode
             }]

+ 3 - 3
plugins/LayerView/__init__.py

@@ -10,14 +10,14 @@ catalog = i18nCatalog("cura")
 def getMetaData():
     return {
         "plugin": {
-            "name": "Layer View",
+            "name": catalog.i18nc("@label", "Layer View"),
             "author": "Ultimaker",
             "version": "1.0",
-            "description": catalog.i18nc("Layer View plugin description", "Provides the Layer view."),
+            "description": catalog.i18nc("@info:whatsthis", "Provides the Layer view."),
             "api": 2
         },
         "view": {
-            "name": catalog.i18nc("Layers View mode", "Layers"),
+            "name": catalog.i18nc("@item:inlistbox", "Layers"),
             "view_panel": "LayerView.qml"
         }
     }

+ 6 - 6
plugins/RemovableDriveOutputDevice/RemovableDriveOutputDevice.py

@@ -10,7 +10,7 @@ from UM.OutputDevice.OutputDevice import OutputDevice
 from UM.OutputDevice import OutputDeviceError
 
 from UM.i18n import i18nCatalog
-catalog = i18nCatalog("uranium")
+catalog = i18nCatalog("cura")
 
 class RemovableDriveOutputDevice(OutputDevice):
     def __init__(self, device_id, device_name):
@@ -18,7 +18,7 @@ class RemovableDriveOutputDevice(OutputDevice):
 
         self.setName(device_name)
         self.setShortDescription(catalog.i18nc("@action:button", "Save to Removable Drive"))
-        self.setDescription(catalog.i18nc("@info:tooltip", "Save to Removable Drive {0}").format(device_name))
+        self.setDescription(catalog.i18nc("@item:inlistbox", "Save to Removable Drive {0}").format(device_name))
         self.setIconName("save_sd")
         self.setPriority(1)
 
@@ -49,7 +49,7 @@ class RemovableDriveOutputDevice(OutputDevice):
             job.progress.connect(self._onProgress)
             job.finished.connect(self._onFinished)
 
-            message = Message(catalog.i18nc("@info:status", "Saving to Removable Drive <filename>{0}</filename>").format(self.getName()), 0, False, -1)
+            message = Message(catalog.i18nc("@info:progress", "Saving to Removable Drive <filename>{0}</filename>").format(self.getName()), 0, False, -1)
             message.show()
 
             job._message = message
@@ -70,13 +70,13 @@ class RemovableDriveOutputDevice(OutputDevice):
             job._message = None
         self.writeFinished.emit(self)
         if job.getResult():
-            message = Message(catalog.i18nc("", "Saved to Removable Drive {0} as {1}").format(self.getName(), os.path.basename(job.getFileName())))
-            message.addAction("eject", catalog.i18nc("", "Eject"), "eject", catalog.i18nc("", "Eject removable device {0}").format(self.getName()))
+            message = Message(catalog.i18nc("@info:status", "Saved to Removable Drive {0} as {1}").format(self.getName(), os.path.basename(job.getFileName())))
+            message.addAction("eject", catalog.i18nc("@action:button", "Eject"), "eject", catalog.i18nc("@action", "Eject removable device {0}").format(self.getName()))
             message.actionTriggered.connect(self._onActionTriggered)
             message.show()
             self.writeSuccess.emit(self)
         else:
-            message = Message(catalog.i18nc("", "Could not save to removable drive {0}: {1}").format(self.getName(), str(job.getError())))
+            message = Message(catalog.i18nc("@info:status", "Could not save to removable drive {0}: {1}").format(self.getName(), str(job.getError())))
             message.show()
             self.writeError.emit(self)
         job.getStream().close()

+ 3 - 3
plugins/RemovableDriveOutputDevice/RemovableDrivePlugin.py

@@ -11,7 +11,7 @@ from UM.OutputDevice.OutputDevicePlugin import OutputDevicePlugin
 from . import RemovableDriveOutputDevice
 
 from UM.i18n import i18nCatalog
-catalog = i18nCatalog("uranium")
+catalog = i18nCatalog("cura")
 
 class RemovableDrivePlugin(OutputDevicePlugin):
     def __init__(self):
@@ -39,10 +39,10 @@ class RemovableDrivePlugin(OutputDevicePlugin):
     def ejectDevice(self, device):
         result = self.performEjectDevice(device)
         if result:
-            message = Message(catalog.i18n("Ejected {0}. You can now safely remove the drive.").format(device.getName()))
+            message = Message(catalog.i18n("@info:status", "Ejected {0}. You can now safely remove the drive.").format(device.getName()))
             message.show()
         else:
-            message = Message(catalog.i18n("Failed to eject {0}. Maybe it is still in use?").format(device.getName()))
+            message = Message(catalog.i18n("@info:status", "Failed to eject {0}. Maybe it is still in use?").format(device.getName()))
             message.show()
 
     def performEjectDevice(self, device):

Some files were not shown because too many files changed in this diff