Comments (9)
I've known that at some point I would need to do this so thank you for your suggestion. I will look into how to do this and will provide it for the next release. If you have any further guidance please let me know.
from qgis-shapetools-plugin.
@wsk170
I'm not 100% sure I have everything correct, but there is an i18n directory with the en.ts file. I don't know how this all works especially when changes are made to the code, but you are welcome to give suggestions and prepare a translation.
from qgis-shapetools-plugin.
@hamiltoncj Thank you!And I did some research for PyQt translation and refer other QGIS plugin.
First, modify tr function's "Processing" to "@default", because context name in ts file is "@default".
Second, add the following code to class ShapeTools init method to load translation file.
# initialize plugin directory
self.plugin_dir = os.path.dirname(__file__)
# initialize locale
locale = QSettings().value('locale/userLocale')[0:2]
locale_path = os.path.join(
self.plugin_dir,
'i18n',
'shapeTools_{}.qm'.format(locale))
if os.path.exists(locale_path):
self.translator = QTranslator()
self.translator.load(locale_path)
if qVersion() > '4.3.3':
QCoreApplication.installTranslator(self.translator)
I try this method, and get the translation. yes, it's chinese. and when I finish translation, i will push to github.
from qgis-shapetools-plugin.
@hamiltoncj I have finished the chinese translation, and make a pull request. waiting for you merge it.
from qgis-shapetools-plugin.
@wsk170
I have made a number of updates. Can you check to make sure it works properly for you and if it does I will push out a new release.
Thanks!
from qgis-shapetools-plugin.
@hamiltoncj I try it, and create a pull to load the right translation. you could merge it.
from qgis-shapetools-plugin.
I did the merge. Does it work correctly now?
from qgis-shapetools-plugin.
Yes, it worked correctly. Thank your for your great work.
from qgis-shapetools-plugin.
Thank you with helping to set up translation in Shape Tools.
from qgis-shapetools-plugin.
Related Issues (20)
- Please do not include external libs HOT 6
- Plug-In installation not working HOT 2
- Arc wedge and donut creation combined HOT 6
- "XY to lines" between the points of a layer fails HOT 6
- idsbreak.svg can't be found on a case-sensitive file system HOT 4
- Add field value or Data Defined Override to scale factor for Geodesic Transformation Tool HOT 4
- Python error when edit in place is active HOT 3
- Can I call createEllipse from python shell in QGIS HOT 1
- Unable to remove dropdown buttons from toolbar HOT 3
- Improvement suggestion: Observe QGIS settings for preferred distance units HOT 2
- Improvement suggestion: provide additional format for azimuth HOT 3
- Ability to input grid reference value instead of lat/long HOT 2
- Minor usability improvement suggestions for Geodesic Measure Tool HOT 3
- Issue with creating pie wedges in Shape Tools for Telecom sectors creation HOT 15
- Couldn't load plugin 'shapetools' due to an error when calling its classFactory() method HOT 1
- User info suggestion HOT 2
- contour line free hand design HOT 2
- Create radial lines generates empty dataset HOT 3
- Pie wedge radius according to the zoom level not working properly HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from qgis-shapetools-plugin.