[TD]add label translation for Page and Template

This commit is contained in:
wandererfan
2023-08-17 17:26:08 -04:00
committed by WandererFan
parent 414e06d54d
commit 49a9442d61
14 changed files with 152 additions and 21 deletions

View File

@@ -41,6 +41,7 @@
#include "DrawViewDimension.h"
#include "DrawViewPart.h"
#include "Preferences.h"
#include "DrawUtil.h"
using namespace TechDraw;
@@ -468,6 +469,13 @@ bool DrawPage::AllowPageOverride(void)
return Preferences::getPreferenceGroup("General")->GetBool("AllowPageOverride", true);
}
//! get a translated label string from the context (ex TaskActiveView), the base name (ex ActiveView) and
//! the unique name within the document (ex ActiveView001), and use it to update the Label property.
void DrawPage::translateLabel(std::string context, std::string baseName, std::string uniqueName)
{
Label.setValue(DrawUtil::translateArbitrary(context, baseName, uniqueName));
}
// Python Drawing feature ---------------------------------------------------------