Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Russian localization Settings Window #1799

Merged
merged 6 commits into from
Jun 12, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">

<system:String x:Key="pyRevit.Title">pyRevit</system:String>
<system:String x:Key="pyRevit.Engine">Running on IronPython {} (cpython {})</system:String>
<system:String x:Key="pyRevit.RocketMode.Enabled">Rocket-mode enabled</system:String>
<system:String x:Key="pyRevit.RocketMode.Disabled">Rocket-mode disabled</system:String>

<system:String x:Key="Button.Wiki">Wiki</system:String>
<system:String x:Key="Button.Twitter">Twitter</system:String>
<system:String x:Key="Button.Blog">Blog</system:String>
<system:String x:Key="Button.GitHub">GitHub</system:String>
<system:String x:Key="Button.YouTube">YouTube</system:String>
<system:String x:Key="Button.License">License</system:String>
<system:String x:Key="Button.Support">Support</system:String>
<system:String x:Key="Button.Credits">Credits</system:String>
<system:String x:Key="Button.ReleaseNotes">Release Notes</system:String>
</ResourceDictionary>
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:system="clr-namespace:System;assembly=mscorlib">

<system:String x:Key="pyRevit.Title">pyRevit</system:String>
<system:String x:Key="pyRevit.Engine">Запущено на IronPython {} (cpython {})</system:String>
<system:String x:Key="pyRevit.RocketMode.Enabled">Rocked-mode вкл</system:String>
<system:String x:Key="pyRevit.RocketMode.Disabled">Rocked-mode выкл</system:String>

<system:String x:Key="Button.Wiki">Wiki</system:String>
<system:String x:Key="Button.Twitter">Twitter</system:String>
<system:String x:Key="Button.Blog">Blog</system:String>
<system:String x:Key="Button.GitHub">GitHub</system:String>
<system:String x:Key="Button.YouTube">YouTube</system:String>
<system:String x:Key="Button.License">License</system:String>
<system:String x:Key="Button.Support">Support</system:String>
<system:String x:Key="Button.Credits">Credits</system:String>
<system:String x:Key="Button.ReleaseNotes">Release Notes</system:String>
</ResourceDictionary>
Original file line number Diff line number Diff line change
Expand Up @@ -212,9 +212,10 @@
VerticalAlignment="Top"
HorizontalAlignment="Center"
FontSize="44">
<Run Text="pyRevit"/><Run x:Name="short_version_info"
FontSize="20"
Text=" vX.X"/>
<Run Text="{DynamicResource pyRevit.Title}"/>
<Run x:Name="short_version_info"
FontSize="20"
Text=" vX.X"/>
</TextBlock>
<TextBlock x:Name="pyrevit_subtitle"
HorizontalAlignment="Center"
Expand Down Expand Up @@ -291,7 +292,7 @@
VerticalAlignment="Top"
FontSize="14"
LineHeight="20"
Text="Running on IronPython 2.7.7"/>
Text="{DynamicResource pyRevit.Engine}"/>
<WrapPanel HorizontalAlignment="Center">
<TextBlock x:Name="pyrevit_rmode"
HorizontalAlignment="Center"
Expand All @@ -300,7 +301,7 @@
VerticalAlignment="Top"
FontSize="14"
LineHeight="20"
Text="Rocket mode enabled"/>
Text="{DynamicResource pyRevit.RocketMode.Enabled}"/>
<ContentControl x:Name="rmode_icon" Content="{StaticResource rocketIcon}" Width="24" Height="24" Margin="5,-6,5,0">
<ContentControl.LayoutTransform>
<ScaleTransform ScaleX="0.7" ScaleY="0.7"/>
Expand All @@ -309,25 +310,25 @@
</WrapPanel>
<WrapPanel Margin="0,15,0,0"
HorizontalAlignment="Center">
<Button Content="Wiki" FontSize="14"
<Button Content="{DynamicResource Button.Wiki}" FontSize="14"
Click="openwiki"/>
<Button Content="Twitter" FontSize="14"
<Button Content="{DynamicResource Button.Twitter}" FontSize="14"
Click="opentwitter"/>
<Button Content="Blog" FontSize="14"
<Button Content="{DynamicResource Button.Blog}" FontSize="14"
Click="openblog"/>
<Button Content="Github" FontSize="14"
<Button Content="{DynamicResource Button.GitHub}" FontSize="14"
Click="opengithubrepopage"/>
<Button Content="YouTube" FontSize="14"
<Button Content="{DynamicResource Button.YouTube}" FontSize="14"
Click="openyoutubechannel"/>
</WrapPanel>
<WrapPanel HorizontalAlignment="Center">
<Button Content="License" FontSize="14"
<Button Content="{DynamicResource Button.License}" FontSize="14"
Click="openlicensepage"/>
<Button Content="Support" FontSize="14"
<Button Content="{DynamicResource Button.Support}" FontSize="14"
Click="opensupportpage"/>
<Button Content="Credits" FontSize="14"
<Button Content="{DynamicResource Button.Credits}" FontSize="14"
Click="opencredits"/>
<Button Content="Release Notes" FontSize="14"
<Button Content="{DynamicResource Button.ReleaseNotes}" FontSize="14"
Click="openreleasenotes"/>
</WrapPanel>
<WrapPanel HorizontalAlignment="Center">
Expand All @@ -354,7 +355,7 @@
Margin="0,5,0,0"
HorizontalAlignment="Center"
TextAlignment="Center"
Text="2014-2020 copyright message"
Text="2014-2023 copyright message"
MouseDown="openkeybaseprofile"/>
</StackPanel>
</Grid>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,14 +55,15 @@ def __init__(self, xaml_file_name):
cpyver = user_config.get_active_cpython_engine()
if cpyver:
self.pyrevit_engine.Text = \
'Running on IronPython {} (cpython {})'\
self.get_locale_string("pyRevit.Engine")\
.format(sys.version.split('(')[0].strip(),
'.'.join(list(str(cpyver.Version))))

rocketmodetext = \
'Rocket-mode {}' \
.format('enabled' if __cachedengine__ else 'disabled')
self.pyrevit_rmode.Text = rocketmodetext
if __cachedengine__:
self.pyrevit_rmode.Text = self.get_locale_string("pyRevit.RocketMode.Enabled")
else:
self.pyrevit_rmode.Text = self.get_locale_string("pyRevit.RocketMode.Disabled")

if not __cachedengine__:
self.hide_element(self.rmode_icon)

Expand Down
Loading