Skip to content

Commit

Permalink
Move version to display at bottom of settings
Browse files Browse the repository at this point in the history
  • Loading branch information
mkargus committed Sep 24, 2024
1 parent e657960 commit caae308
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/Components/PluginApp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ function PluginApp:init()
self.toolbar = self.plugin:CreateToolbar('mkargus')

self.button = self.toolbar:CreateButton(
Localization(Constants.IS_DEV_CHANNEL and 'Plugin.NameDev' or 'Plugin.Name'),
Localization('Plugin.Name') .. if Constants.IS_DEV_CHANNEL then '[DEV]' else '',
Localization('Plugin.Desc'),
Constants.PLUGIN_BUTTON_ICON
)
Expand Down Expand Up @@ -168,7 +168,7 @@ function PluginApp:render()
return React.createElement(StudioWidget, {
plugin = self.plugin,
Id = 'PartToTerrain',
Title = Localization('Plugin.NameVersion', { Constants.VERSION }),
Title = Localization('Plugin.Name') .. if Constants.IS_DEV_CHANNEL then '[DEV]' else '',

Enabled = state.guiEnabled,

Expand Down
15 changes: 14 additions & 1 deletion src/Components/SettingsPanel/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,17 @@ local Plugin = script.Parent.Parent

local React = require(Plugin.Packages.React)

local Constants = require(Plugin.Util.Constants)
local Util = Plugin.Util
local Constants = require(Util.Constants)
local Localization = require(Util.Localization)

local useTheme = require(Plugin.Hooks.useTheme)

local Components = Plugin.Components
local Item = require(script.Item)
local ScrollingFrame = require(Components.ScrollingFrame)
local Separator = require(script.Separator)
local TextLabel = require(Components.TextLabel)

local function CreateNextOrder(): () -> number
local LayoutOrder = 0
Expand All @@ -19,6 +24,7 @@ local function CreateNextOrder(): () -> number
end

local function SettingsPanel(props)
local theme = useTheme()
local NextOrder = CreateNextOrder()

local children = {
Expand All @@ -27,6 +33,13 @@ local function SettingsPanel(props)
HorizontalAlignment = Enum.HorizontalAlignment.Center,
Padding = UDim.new(0, 3),
SortOrder = Enum.SortOrder.LayoutOrder
}),
VersionText = React.createElement(TextLabel, {
BackgroundTransparency = 1,
TextColor3 = theme:GetColor(Enum.StudioStyleGuideColor.DimmedText),
Text = Localization('Plugin.Version', { Constants.VERSION }),
Size = UDim2.new(1, 0, 0, 14),
LayoutOrder = 1000
})
}

Expand Down
8 changes: 2 additions & 6 deletions src/Util/Localization/LocalizationTable.csv
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
Key,en_US,zh_CN,ko_KR,ja_JP,es_ES,pt_BR,fr_FR,it_IT,zh_TW,de_DE,vi_VN
Plugin.Name,Part to Terrain,部件至地形,파트를 지형으로,地形のパーツ,Parte en Terreno,Parte para terreno,Partie du terrrain,Parte in terreno,零件到地形,Teil zu Gelände,Chuyển đổi Bộ Phận thành Địa Hình
Plugin.NameDev,Part to Terrain [DEV],部件至地形 [DEV],파트를 지형으로 [DEV],地形のパーツ [DEV],Parte en Terreno [DEV],Parte para terreno [DEV],Partie du terrrain [DEV],Parte in terreno [DEV],零件到地形 [DEV],Teil zu Gelände [DEV],Chuyển đổi Bộ Phận thành Địa Hình [DEV]
Plugin.Desc,Convert parts into terrain with ease.,,,,,,,,,,
Plugin.NameVersion,Part to Terrain {1},部件至地形 {1},파트를 지형으로 {1},地形のパーツ {1},Parte en Terreno {1},Parte para terreno {1},Partie du terrrain {1},Parte in terreno {1},零件到地形 {1},Teil zu Gelände {1},Chuyển đổi Bộ Phận thành Địa Hình {1}
Plugin.Version,Version {1},版本 {1},버전 {1},バージョン {1},Versión {1},Versão {1},Version {1},Versione {1},版本 {1},Version {1},Phiên Bản {1}
Plugin.Search,Search,搜索,검색,サーチ,Buscar,Pesquisar,Rechercher,Cerca,搜尋,Suchen,Tìm Kiếm
Button.Materials,Materials,物料,기재,材料,Materiales,Materiais,Matériel,Materiale,材質,Materialen,Vật Liệu
Button.Settings,Settings,设置,설정,設定,Config,Config,Paramètres,Impostazioni,設定,Einstellungen,Cài Đặt
Expand All @@ -17,9 +16,6 @@ Settings.PreserveTerrainDesc,Existing terrain will not be overwritten.<br/><br/>
Settings.IgnoreInvisibleParts,Ignore Invisible Parts,,,,,,,,,,
Settings.IgnoreInvisiblePartsDesc,Parts that are invisible will converted and will not be highlighted when hover,,,,,,,,,,
Notice.Outdated,A new update is available.,,,,,,,,,,
Notice.IgnoreLockedPart,Ignoring locked part due to settings.,,,,,,,,,,
Notice.ShapeNotSupported,Part shape is not supported.,,,,,,,,,,
Notice.ClassNotSupport,Part class is not supported.,,,,,,,,,,
Notice.NoResultsFound,No results found,未找到结果,결과 없음,結果が見つかりませんでした,No se encontraron resultados,Nenhum resultado encontrado,Pas de résultats trouvés,Nessun risultato trovato,找不到結果,Keine Ergebnisse gefunden,Không tìm thấy kết quả
Materials.Air,Air,天空,공기,空気,Aire,Ar,Air,Aria,空氣,Luft,Không Khí
Materials.Asphalt,Asphalt,沥青,아스팔트,アスファルト,Asfalto,Asfalto,Asphalte,Asfalto,瀝青,Asphalt,Nhựa Đường
Expand All @@ -43,4 +39,4 @@ Materials.Sandstone,Sandstone,砂岩,사암,サンドストーン,Piedra arenisc
Materials.Slate,Slate,石板,슬레이트,スレート,Pizarra,Ardósia,Ardoise,Ardesia,板岩,Schiefer,Đá Phiến
Materials.Snow,Snow,雪,눈,雪,Nieve,Neve,Neige,Neve,雪,Schnee,Tuyết
Materials.Water,Water,水域,물,水,Agua,Água,Eau,Acqua,水域,Wasser,Nước
Materials.WoodPlanks,Wood Planks,木板,나무 판자,木の板,Tablones de madera,Tábuas,Planches de bois,Assi di legno,木板,Holzbohlen,Ván Gỗ
Materials.WoodPlanks,Wood Planks,木板,나무 판자,木の板,Tablones de madera,Tábuas,Planches de bois,Assi di legno,木板,Holzbohlen,Ván Gỗ

0 comments on commit caae308

Please sign in to comment.