Comments (12)
Labelled this as an enhancement - TBE will work if not fixed, but some strings are not translated.
from tbe.
I didn't find any issues using either
git grep static.*tr.*\(
or using
git grep QObject::tr
All occurences of the latter seem to be present in the i18n/*.ts files.
from tbe.
Yes, all strings are present in i18n/*.ts files, but it's not enough. QObject::tr allows to mark strings for lupdate, but no more. Sometimes QObject::tr is workable, but not always.
If you finish Dutch translation 100% you will see this issue. I have 100% for Russian and I see big problem with translations.
You did not understand this issue, grep will show OK, ts files is OK, but bug is present anyway.
from tbe.
OK, I've run with Russian. I see that tool tips for internal objects do not show translated text.
e.g. in level "Marble boulevard", CircleObject.cpp:65 and PolyObject.cpp:119 are not shown translated.
Is that what you are looking at?
from tbe.
Can you verify that commit [1897c8a] solves the issue for all normal balls?
I think it does :-)
from tbe.
Somehow, I'm under the impression that what is working for CircleObjects, is not working for RectObjects and PolyObjects...
The strings do not appear in the *.ts files.
Did I forget something?
from tbe.
Can you verify that commit [1897c8a] solves the issue for all normal balls?
Yes.
Somehow, I'm under the impression that what is working for CircleObjects, is not working for RectObjects and PolyObjects...
lupdate works for RectObjects, but not for CircleObjects, PolyObjects. I don't know why.
from tbe.
lupdate works for RectObjects, but not for CircleObjects, PolyObjects. I don't know why.
So apparently it only works for one file, not for more. In my case, it chose CircleObjects, in your case it chose RectObjects... Sigh...
from tbe.
My mistake.
I found reason:
diff -ur tbe-0.9-git8b8c580.orig/src/model/PolyObject.cpp tbe-0.9-git8b8c580/src/model/PolyObject.cpp
--- tbe-0.9-git8b8c580.orig/src/model/PolyObject.cpp 2015-08-15 21:36:20.000000000 +0300
+++ tbe-0.9-git8b8c580/src/model/PolyObject.cpp 2015-08-20 00:45:00.000000000 +0300
@@ -44,8 +44,8 @@
static AbstractPolyObjectFactory theBowlingPinFactory(
"BowlingPin",
- QT_TRANSLATE_NOOP(AbstractPolyObjectFactory, "Bowling Pin"),
- QT_TRANSLATE_NOOP(AbstractPolyObjectFactory, "Bowling pins are meant to be run "
+ QT_TRANSLATE_NOOP("AbstractPolyObjectFactory", "Bowling Pin"),
+ QT_TRANSLATE_NOOP("AbstractPolyObjectFactory", "Bowling pins are meant to be run "
"over - and most people prefer to do that using "
"a Bowling Ball."),
"BowlingPin",
@@ -57,8 +57,8 @@
static AbstractPolyObjectFactory theSkyhookFactory(
"Skyhook",
- QT_TRANSLATE_NOOP(AbstractPolyObjectFactory, "Skyhook"),
- QT_TRANSLATE_NOOP(AbstractPolyObjectFactory, "A skyhook just hangs in the air. And you can hang a "
+ QT_TRANSLATE_NOOP("AbstractPolyObjectFactory", "Skyhook"),
+ QT_TRANSLATE_NOOP("AbstractPolyObjectFactory", "A skyhook just hangs in the air. And you can hang a "
"lot of weight on it!"),
"Skyhook",
"(-0.03,-0.07)=(0.01,-0.11)=(0.05,-0.11)=(0.1,-0.05)=(0.1,-0.02)"
@@ -67,40 +67,40 @@
static AbstractPolyObjectFactory theWeightFactory(
"Weight",
- QT_TRANSLATE_NOOP(AbstractPolyObjectFactory, "Weight"),
- QT_TRANSLATE_NOOP(AbstractPolyObjectFactory, "A serious mass. As heavy as it looks!"),
+ QT_TRANSLATE_NOOP("AbstractPolyObjectFactory", "Weight"),
+ QT_TRANSLATE_NOOP("AbstractPolyObjectFactory", "A serious mass. As heavy as it looks!"),
"Weight",
"(-0.20,-0.20)=(0.20,-0.20)=(0.06,0.20)=(-0.06,0.20)",
0.40, 0.40, 10.0, 0.3 );
static AbstractPolyObjectFactory theLeftRampFactory(
"LeftRamp",
- QT_TRANSLATE_NOOP(AbstractPolyObjectFactory, "Left Ramp"),
- QT_TRANSLATE_NOOP(AbstractPolyObjectFactory, "This is a ramp. The left is lower than the right, so things slide to the left."),
+ QT_TRANSLATE_NOOP("AbstractPolyObjectFactory", "Left Ramp"),
+ QT_TRANSLATE_NOOP("AbstractPolyObjectFactory", "This is a ramp. The left is lower than the right, so things slide to the left."),
"LeftRamp",
"(-0.5,-0.46)=(-0.5,-0.5)=(0.13,-0.5)=(0.5,0.5)",
1.0, 1.0, 0.0, 0.2 );
static AbstractPolyObjectFactory theRightRampFactory(
"RightRamp",
- QT_TRANSLATE_NOOP(AbstractPolyObjectFactory, "Right Ramp"),
- QT_TRANSLATE_NOOP(AbstractPolyObjectFactory, "This is a ramp. The left is higher than the right, so things slide to the right."),
+ QT_TRANSLATE_NOOP("AbstractPolyObjectFactory", "Right Ramp"),
+ QT_TRANSLATE_NOOP("AbstractPolyObjectFactory", "This is a ramp. The left is higher than the right, so things slide to the right."),
"RightRamp",
"(-0.5,0.5)=(-0.13,-0.5)=(0.5,-0.5)=(0.5,-0.46)",
1.0, 1.0, 0.0, 0.2 );
static AbstractPolyObjectFactory theLeftWedgeFactory(
"LeftWedge",
- QT_TRANSLATE_NOOP(AbstractPolyObjectFactory, "Left Wedge"),
- QT_TRANSLATE_NOOP(AbstractPolyObjectFactory, "This is a wedge. The left is lower than the right, so things slide to the left."),
+ QT_TRANSLATE_NOOP("AbstractPolyObjectFactory", "Left Wedge"),
+ QT_TRANSLATE_NOOP("AbstractPolyObjectFactory", "This is a wedge. The left is lower than the right, so things slide to the left."),
"birch-wedge-left",
"(-0.5,-0.46)=(-0.5,-0.5)=(0.5,-0.5)=(0.5,0.5)",
1.0, 1.0, 0.0, 0.2 );
static AbstractPolyObjectFactory theRightWedgeFactory(
"RightWedge",
- QT_TRANSLATE_NOOP(AbstractPolyObjectFactory, "Right Wedge"),
- QT_TRANSLATE_NOOP(AbstractPolyObjectFactory, "This is a wedge. The left is higher than the right, so things slide to the right."),
+ QT_TRANSLATE_NOOP("AbstractPolyObjectFactory", "Right Wedge"),
+ QT_TRANSLATE_NOOP("AbstractPolyObjectFactory", "This is a wedge. The left is higher than the right, so things slide to the right."),
"birch-wedge-right",
"(-0.5,0.5)=(-0.5,-0.5)=(0.5,-0.5)=(0.5,-0.46)",
1.0, 1.0, 0.0, 0.2 );
@@ -109,8 +109,8 @@
// on both the inside and the outside - you can use both if you want :-)
static AbstractPolyObjectFactory the40QuarterArcFactory(
"QuarterArc40",
- QT_TRANSLATE_NOOP(AbstractPolyObjectFactory, "Quarter Arc Small"),
- QT_TRANSLATE_NOOP(AbstractPolyObjectFactory, "This is a quarter arc. Or ninety degrees, or 1.57 radians if you want."),
+ QT_TRANSLATE_NOOP("AbstractPolyObjectFactory", "Quarter Arc Small"),
+ QT_TRANSLATE_NOOP("AbstractPolyObjectFactory", "This is a quarter arc. Or ninety degrees, or 1.57 radians if you want."),
"QuarterArc",
"(0.100,-.200)=(0.200,-.200)=(0.180,-.076)=(0.085,-.107);"
"(0.085,-.107)=(0.180,-.076)=(0.124,0.035)=(0.043,-.024);"
@@ -123,8 +123,8 @@
// on both the inside and the outside - you can use both if you want :-)
static AbstractPolyObjectFactory the80QuarterArcFactory(
"QuarterArc80",
- QT_TRANSLATE_NOOP(AbstractPolyObjectFactory, "Quarter Arc Large"),
- QT_TRANSLATE_NOOP(AbstractPolyObjectFactory, "This is a quarter arc. Or ninety degrees, or 1.57 radians if you want."),
+ QT_TRANSLATE_NOOP("AbstractPolyObjectFactory", "Quarter Arc Large"),
+ QT_TRANSLATE_NOOP("AbstractPolyObjectFactory", "This is a quarter arc. Or ninety degrees, or 1.57 radians if you want."),
"QuarterArc80",
"( 0.300,-0.400)=( 0.400,-0.400)=( 0.388,-0.261)=( 0.289,-0.278);"
"( 0.289,-0.278)=( 0.388,-0.261)=( 0.352,-0.126)=( 0.258,-0.161);"
diff -ur tbe-0.9-git8b8c580.orig/src/model/RectObject.cpp tbe-0.9-git8b8c580/src/model/RectObject.cpp
--- tbe-0.9-git8b8c580.orig/src/model/RectObject.cpp 2015-08-15 21:36:20.000000000 +0300
+++ tbe-0.9-git8b8c580/src/model/RectObject.cpp 2015-08-20 00:45:39.000000000 +0300
@@ -49,27 +49,27 @@
// anImageName, aWidth,aHeight, aMass, aBounciness
static AbstractRectObjectFactory theDomRedFactory("DominoRed",
- QT_TRANSLATE_NOOP(AbstractRectObjectFactory, "Domino (Red)"),
- QT_TRANSLATE_NOOP(AbstractRectObjectFactory, "The famous plastic red domino stone"),
+ QT_TRANSLATE_NOOP("AbstractRectObjectFactory", "Domino (Red)"),
+ QT_TRANSLATE_NOOP("AbstractRectObjectFactory", "The famous plastic red domino stone"),
"DominoRed", 0.1, 0.5, 2.5, 0.1 );
static AbstractRectObjectFactory theDomBlueFactory("DominoBlue",
- QT_TRANSLATE_NOOP(AbstractRectObjectFactory, "Domino (Blue)"),
- QT_TRANSLATE_NOOP(AbstractRectObjectFactory, "The famous plastic blue domino stone"),
+ QT_TRANSLATE_NOOP("AbstractRectObjectFactory", "Domino (Blue)"),
+ QT_TRANSLATE_NOOP("AbstractRectObjectFactory", "The famous plastic blue domino stone"),
"DominoBlue", 0.1, 0.5, 2.5, 0.1 );
static AbstractRectObjectFactory theDomGreenFactory("DominoGreen",
- QT_TRANSLATE_NOOP(AbstractRectObjectFactory, "Domino (Green)"),
- QT_TRANSLATE_NOOP(AbstractRectObjectFactory, "The famous plastic green domino stone"),
+ QT_TRANSLATE_NOOP("AbstractRectObjectFactory", "Domino (Green)"),
+ QT_TRANSLATE_NOOP("AbstractRectObjectFactory", "The famous plastic green domino stone"),
"DominoGreen", 0.1, 0.5, 2.5, 0.1 );
static AbstractRectObjectFactory theFloorFactory("Floor",
- QT_TRANSLATE_NOOP(AbstractRectObjectFactory, "Floor"),
+ QT_TRANSLATE_NOOP("AbstractRectObjectFactory", "Floor"),
"",
"used_wood_bar", 1.0, 0.1, 0.0, 0.1 );
static AbstractRectObjectFactory theWallFactory("Wall",
- QT_TRANSLATE_NOOP(AbstractRectObjectFactory, "Wall"),
+ QT_TRANSLATE_NOOP("AbstractRectObjectFactory", "Wall"),
"",
"oldbrick", 0.2, 1.0, 0.0, 0.05 );
from tbe.
Changeset 825db79 (which I had to type again because copy/paste appears to not work. Thanks, github) resolves this issue.
from tbe.
QObject::tr is present in code yet. Are you sure it works? I'm not.
QT_TRANSLATE_NOOP works always, but QObject::tr not always.
from tbe.
Tested, issue was fixed.
It seems others QObject::tr are workable.
from tbe.
Related Issues (20)
- No hints HOT 1
- Object cannot be moved back to toolbox HOT 1
- No enough space for buttons HOT 3
- Hints are outside scene HOT 1
- Phone number cannot be selected HOT 1
- Switch back on stable old-ui branch HOT 30
- Incorrect scale of some object images HOT 4
- Old UI cleanup HOT 3
- [Discussion] Requirements for UI rework
- Level difficulty ratings HOT 2
- Bad collision polygons of some objects HOT 7
- Add <hints> to all levels HOT 2
- Remove install instructions from wiki HOT 2
- Redo ugly stick figures HOT 2
- Move sorting-4 to attic
- Remove skipped levels HOT 2
- Simulation is not deterministic if many explosions
- Simplify level licensing / replace “Public Domain” with all-permissive license HOT 2
- Linking error: QTest HOT 1
- Level 47 HOT 1
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 tbe.