Skip to content

Commit

Permalink
Localized strings for file import #377
Browse files Browse the repository at this point in the history
  • Loading branch information
vanjac committed Jan 14, 2024
1 parent d89139c commit 7099239
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 7 deletions.
6 changes: 3 additions & 3 deletions Assets/Menu/FileReceiveGUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ public override void OnEnable()
void Start()
{
TextInputDialogGUI inputDialog = gameObject.AddComponent<TextInputDialogGUI>();
inputDialog.prompt = "Enter name for imported world...";
inputDialog.prompt = StringSet.ImportNamePrompt;
inputDialog.handler = ImportWorld;
inputDialog.cancelHandler = DestroyThis;
}
Expand All @@ -41,7 +41,7 @@ public override void WindowGUI()
{
GUILayout.BeginHorizontal();
GUILayout.FlexibleSpace();
ActionBarGUI.ActionBarLabel("Importing file...");
ActionBarGUI.ActionBarLabel(StringSet.ImportingFile);
GUILayout.FlexibleSpace();
GUILayout.EndHorizontal();
}
Expand Down Expand Up @@ -73,7 +73,7 @@ private void ImportWorld(string name)
catch (System.Exception e)
{
Debug.Log(e);
var dialog = DialogGUI.ShowMessageDialog(gameObject, "Error importing world");
var dialog = DialogGUI.ShowMessageDialog(gameObject, StringSet.ImportError);
dialog.yesButtonHandler = DestroyThis;
}
}
Expand Down
22 changes: 18 additions & 4 deletions Assets/Menu/fileReceiveScene.unity
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ RenderSettings:
--- !u!157 &3
LightmapSettings:
m_ObjectHideFlags: 0
serializedVersion: 11
serializedVersion: 12
m_GIWorkflowMode: 0
m_GISettings:
serializedVersion: 2
Expand Down Expand Up @@ -98,7 +98,8 @@ LightmapSettings:
m_TrainingDataDestination: TrainingData
m_LightProbeSampleCountMultiplier: 4
m_LightingDataAsset: {fileID: 0}
m_UseShadowmask: 1
m_LightingSettings: {fileID: 4890085278179872738, guid: 18391b01b7b052b44b49537b15bd5d46,
type: 2}
--- !u!196 &4
NavMeshSettings:
serializedVersion: 2
Expand All @@ -118,6 +119,8 @@ NavMeshSettings:
manualTileSize: 0
tileSize: 256
accuratePlacement: 0
maxJobWorkers: 0
preserveTilesOutsideBounds: 0
debug:
m_Flags: 0
m_NavMeshData: {fileID: 0}
Expand Down Expand Up @@ -233,7 +236,7 @@ MonoBehaviour:
world: {fileID: 0}
help: {fileID: 0}
helpCircle: {fileID: 0}
done: {fileID: 0}
done: {fileID: 2800000, guid: e1b609b81bf81fd4b8188b39dbbdfca4, type: 3}
rotateLeft: {fileID: 0}
rotateRight: {fileID: 0}
flipHorizontal: {fileID: 0}
Expand All @@ -254,7 +257,6 @@ MonoBehaviour:
playAudio: {fileID: 0}
reddit: {fileID: 0}
youTube: {fileID: 0}
gitHub: {fileID: 0}
undo: {fileID: 0}
import: {fileID: 0}
fill: {fileID: 0}
Expand All @@ -265,6 +267,18 @@ MonoBehaviour:
newTexture: {fileID: 0}
worldImport: {fileID: 0}
newItem: {fileID: 0}
website: {fileID: 0}
donate: {fileID: 0}
pan: {fileID: 0}
orbit: {fileID: 0}
sensor: {fileID: 0}
random: {fileID: 0}
baseLayer: {fileID: 0}
overlayLayer: {fileID: 0}
plusOne: {fileID: 0}
minusOne: {fileID: 0}
color: {fileID: 0}
camera: {fileID: 0}
indoorLarge: {fileID: 0}
floatingLarge: {fileID: 0}
newWorldLarge: {fileID: 0}
Expand Down
8 changes: 8 additions & 0 deletions Assets/VoxelEditor/GUI/localization/GUIStringSet.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,14 @@ public class GUIStringSet
public virtual string Donate =>
"Donate";

// Import
public virtual string ImportNamePrompt =>
"Enter name for imported world...";
public virtual string ImportingFile =>
"Importing file...";
public virtual string ImportError =>
"Error importing world";

// Editor action bar
public virtual string CreateObjectTitle =>
"Create";
Expand Down

0 comments on commit 7099239

Please sign in to comment.