From: plaa Date: Thu, 10 Feb 2011 06:15:27 +0000 (+0000) Subject: French translation X-Git-Tag: upstream/1.1.6^2~13^2~9 X-Git-Url: https://git.gag.com/?a=commitdiff_plain;h=00ede5818b7bb30df3864d9e5248d679e7ea9c26;p=debian%2Fopenrocket French translation git-svn-id: https://openrocket.svn.sourceforge.net/svnroot/openrocket/branches/l10n@104 180e2498-e6e9-4542-8430-84ac67f01cd8 --- diff --git a/l10n/messages.properties b/l10n/messages.properties index 9defd41b..58428c25 100644 --- a/l10n/messages.properties +++ b/l10n/messages.properties @@ -2,17 +2,802 @@ # # English base translation file # +# Should you need to add new logical keys here is the proposed method +# +# className.ComponantType.componantName +# + ! Set to the name of the current translation file (used for debugging purposes) debug.currentFile = messages.properties +! RocketActions +RocketActions.checkbox.Donotaskmeagain = Do not ask me again +RocketActions.lbl.Youcanchangedefop = You can change the default operation in the preferences. +RocketActions.showConfirmDialog.lbl1 = Delete the selected simulations? +RocketActions.showConfirmDialog.lbl2 = This operation cannot be undone. +RocketActions.showConfirmDialog.title = Delete simulations +RocketActions.DelCompAct.Delete = Delete +RocketActions.DelCompAct.ttip.Delete = Delete the selected component. +RocketActions.DelSimuAct.Delete = Delete +RocketActions.DelSimuAct.ttip.Delete = Delete the selected simulation. +RocketActions.DelAct.Delete = Delete +RocketActions.DelAct.ttip.Delete = Delete the selected component or simulation. +RocketActions.CutAction.Cut = Cut +RocketActions.CutAction.ttip.Cut = Cut this component or simulation to the clipboard and remove from this design +RocketActions.CopyAct.Copy = Copy +RocketActions.CopyAct.ttip.Copy = Copy this component (and subcomponents) to the clipboard. +RocketActions.PasteAct.Paste = Paste +RocketActions.PasteAct.ttip.Paste = Paste the component or simulation on the clipboard to the design. +RocketActions.EditAct.Edit = Edit +RocketActions.EditAct.ttip.Edit = Edit the selected component. +RocketActions.NewStageAct.Newstage = New stage +RocketActions.NewStageAct.ttip.Newstage = Add a new stage to the rocket design. +RocketActions.ActBoosterstage = Booster stage +RocketActions.MoveUpAct.Moveup = Move up +RocketActions.MoveUpAct.ttip.Moveup = Move this component upwards. +RocketActions.MoveDownAct.Movedown = Move down +RocketActions.MoveDownAct.ttip.Movedown = Move this component downwards. + +! RocketPanel +RocketPanel.FigTypeAct.Sideview = Side view +RocketPanel.FigTypeAct.ttip.Sideview = Side view +RocketPanel.FigTypeAct.Backview = Back view +RocketPanel.FigTypeAct.ttip.Backview = Rear view +RocketPanel.lbl.Motorcfg = Motor configuration: +RocketPanel.lbl.infoMessage = Click to select    Shift+click to select other    Double-click to edit    Click+drag to move + + +! BasicFrame +BasicFrame.SimpleFileFilter1 = All rocket designs (*.ork; *.rkt) +BasicFrame.SimpleFileFilter2 = OpenRocket designs (*.ork) +BasicFrame.SimpleFileFilter3 = RockSim designs (*.rkt) +BasicFrame.tab.Rocketdesign = Rocket design +BasicFrame.tab.Flightsim = Flight simulations +BasicFrame.title.Addnewcomp = Add new component +BasicFrame.item.Openrocketdesign = Open a rocket design +BasicFrame.item.Openexamplerocketdesign = Open an example rocket design +BasicFrame.item.SavecurRocketdesign = Save the current rocket design +BasicFrame.item.SavecurRocketdesnewfile = Save the current rocket design to a new file +BasicFrame.item.Printpart = Print parts list and fin template +BasicFrame.item.Closedesign = Close the current rocket design +BasicFrame.item.Quitprogram = Quit the program +BasicFrame.menu.Rocketedt = Rocket editing +BasicFrame.dlg.lbl1 = Design ' +BasicFrame.dlg.lbl2 = ' has not been saved. +BasicFrame.dlg.lbl3 = Do you want to save it? +BasicFrame.dlg.title = Design not saved ! Labels used in buttons of dialog windows button.ok = OK button.cancel = Cancel button.close = Close +! Common labels used in buttons of dialog windows +dlg.but.ok = OK +dlg.but.cancel = Cancel +dlg.but.close = Close + +! About Dialog +about.dlg.but.close = Close +about.dlg.lbl.translation = +about.dlg.lbl.transwebsite = + +! Bug Report dialog +bugreport.dlg.title = Bug report +bugreport.dlg.but.Sendbugreport = Send bug report +bugreport.dlg.but.Sendbugreport.Ttip = Automatically send the bug report to the OpenRocket developers. +bugreport.dlg.successmsg1 = Bug report successfully sent. +bugreport.dlg.successmsg2 = Thank you for helping make OpenRocket better! +bugreport.dlg.successmsg3 = Bug report sent + +! Debug log dialog +debuglogdlg.but.clear = Clear +debuglogdlg.OpenRocketdebuglog = OpenRocket debug log +debuglogdlg.Displayloglines = Display log lines: +debuglogdlg.Follow = Follow +debuglogdlg.col.Time = Time +debuglogdlg.col.Level = Level +debuglogdlg.col.Location = Location +debuglogdlg.col.Message = Message +debuglogdlg.lbl.Loglinenbr = Log line number: +debuglogdlg.lbl.Time = Time: +debuglogdlg.lbl.Level = Level: + + +! Edit Motor configuration dialog +edtmotorconfdlg.but.removemotor = Remove motor +edtmotorconfdlg.but.Selectmotor = Select motor +edtmotorconfdlg.but.Removeconfiguration = Remove configuration +edtmotorconfdlg.but.Newconfiguration = New configuration +edtmotorconfdlg.lbl.Motormounts = Motor mounts: +edtmotorconfdlg.title.Editmotorconf = Edit motor configurations +edtmotorconfdlg.selectcomp = Select which components function as motor mounts: +edtmotorconfdlg.lbl.Motorconfig = Motor configurations: +edtmotorconfdlg.lbl.Configname = Configuration name: +edtmotorconfdlg.lbl.Leavenamedefault = Leave name empty for default. + +! Example design dialog +exdesigndlg.but.open = Open + +! Print panel dialog +printdlg.but.saveaspdf = Save as PDF +printdlg.but.preview = Preview +printdlg.but.settings = Settings + +! Material edit panel +matedtpan.but.new = New +matedtpan.but.edit = Edit +matedtpan.but.delete = Delete +matedtpan.but.revertall = Revert all +matedtpan.col.Material = Material +matedtpan.col.Type = Type +matedtpan.col.Density = Density +matedtpan.col.but.ttip.New = Add a new material +matedtpan.title.Addcustmaterial = Add a custom material +matedtpan.but.ttip.edit = Edit an existing material +matedtpan.title.Editmaterial = Edit material +matedtpan.title2.Editmaterial = The built-in materials cannot be modified. +matedtpan.but.ttip.delete = Delete a user-defined material +matedtpan.but.ttip.revertall = Delete all user-defined materials +matedtpan.title.Deletealluser-defined = Delete all user-defined materials? +matedtpan.title.Revertall = Revert all? +matedtpan.lbl.edtmaterials = Editing materials will not affect existing rocket designs. + +!MaterialModel +MaterialModel.title.Material = Material +MaterialModel.title.Defcustmat = Define custom material + + +! Preference dialog +pref.dlg.but.add = Add +pref.dlg.but.reset = Reset +pref.dlg.but.checknow = Check now +pref.dlg.but.defaultmetric = Default metric +pref.dlg.but.defaultimperial = Default imperial +pref.dlg.title.Preferences = Preferences +pref.dlg.tab.Units = Units +pref.dlg.tab.Defaultunits = Default units +pref.dlg.tab.Materials = Materials +pref.dlg.tab.Custommaterials = Custom materials +pref.dlg.tab.Options = Options +pref.dlg.tab.Miscellaneousoptions = Miscellaneous options +pref.dlg.lbl.Positiontoinsert = Position to insert new body components: +pref.dlg.lbl.Confirmdeletion = Confirm deletion of simulations: +pref.dlg.lbl.User-definedthrust = User-defined thrust curves: +pref.dlg.Allthrustcurvefiles = All thrust curve files (*.eng; *.rse; *.zip; directories) +pref.dlg.RASPfiles = RASP motor files (*.eng) +pref.dlg.RockSimfiles = RockSim engine files (*.rse) +pref.dlg.ZIParchives = ZIP archives (*.zip) +pref.dlg.checkbox.Checkupdates = Check for software updates at startup +pref.dlg.ttip.Checkupdatesnow = Check for software updates now +pref.dlg.lbl.Selectprefunits = Select your preferred units: +pref.dlg.lbl.Rocketdimensions = Rocket dimensions: +pref.dlg.lbl.Linedensity = Line density: +pref.dlg.lbl.Motordimensions = Motor dimensions: +pref.dlg.lbl.Surfacedensity = Surface density: +pref.dlg.lbl.Distance = Distance: +pref.dlg.lbl.Bulkdensity = Bulk density:: +pref.dlg.lbl.Velocity = Velocity: +pref.dlg.lbl.Surfaceroughness = Surface roughness: +pref.dlg.lbl.Acceleration = Acceleration: +pref.dlg.lbl.Area = Area: +pref.dlg.lbl.Mass = Mass: +pref.dlg.lbl.Angle = Angle: +pref.dlg.lbl.Force = Force: +pref.dlg.lbl.Rollrate = Roll rate: +pref.dlg.lbl.Totalimpulse = Total impulse: +pref.dlg.lbl.Temperature = Temperature: +pref.dlg.lbl.Momentofinertia = Moment of inertia: +pref.dlg.lbl.Pressure = Pressure: +pref.dlg.lbl.Stability = Stability: +pref.dlg.lbl.effect1 = The effects will take place the next time you open a window. +pref.dlg.lbl.Checkingupdates = Checking for updates... +pref.dlg.lbl.msg1 = An error occurred while communicating with the server. +pref.dlg.lbl.msg2 = Unable to retrieve update information +pref.dlg.lbl.msg3 = You are running the latest version of OpenRocket. +pref.dlg.lbl.msg4 = No updates available + +! Simulation edit dialog +simedtdlg.but.runsimulation = Run simulation +simedtdlg.but.resettodefault = Reset to default +simedtdlg.but.add = Add +simedtdlg.but.remove = Remove +simedtdlg.title.Editsim = Edit simulation +simedtdlg.lbl.Simname = Simulation name: +simedtdlg.tab.Launchcond = Launch conditions +simedtdlg.tab.Simopt = Simulation options +simedtdlg.tab.Plotdata = Plot data +simedtdlg.tab.Exportdata = Export data +simedtdlg.lbl.Motorcfg = Motor configuration: +simedtdlg.lbl.ttip.Motorcfg = Select the motor configuration to use. +simedtdlg.combo.ttip.motorconf = Select the motor configuration to use. +simedtdlg.lbl.Wind = Wind +simedtdlg.lbl.Averwindspeed = Average windspeed: +simedtdlg.lbl.ttip.Averwindspeed = The average windspeed relative to the ground. +simedtdlg.lbl.Stddeviation = Standard deviation: +simedtdlg.lbl.ttip.Stddeviation = The standard deviation of the windspeed.
The windspeed is within twice the standard deviation from the average for 95% of the time. +simedtdlg.lbl.Turbulenceintensity = Turbulence intensity: +simedtdlg.lbl.ttip.Turbulenceintensity1 = The turbulence intensity is the standard deviation divided by the average windspeed.
+simedtdlg.lbl.ttip.Turbulenceintensity2 = Typical values range from +simedtdlg.lbl.ttip.Turbulenceintensity3 = to +simedtdlg.border.Atmoscond = Atmospheric conditions +simedtdlg.checkbox.InterStdAtmosphere = Use International Standard Atmosphere +simedtdlg.checkbox.ttip.InterStdAtmosphere1 = Select to use the International Standard Atmosphere model.
This model has a temperature of +simedtdlg.checkbox.ttip.InterStdAtmosphere2 = and a pressure of +simedtdlg.checkbox.ttip.InterStdAtmosphere3 = at sea level. +simedtdlg.lbl.Temperature = Temperature: +simedtdlg.lbl.ttip.Temperature = The temperature at the launch site. +simedtdlg.lbl.Pressure = Pressure: +simedtdlg.lbl.ttip.Pressure = The atmospheric pressure at the launch site. +simedtdlg.lbl.Launchsite = Launch site +simedtdlg.lbl.Latitude = Latitude: +simedtdlg.lbl.ttip.Latitude = The launch site latitude affects the gravitational pull of Earth.
Positive values are on the Northern hemisphere, negative values on the Southern hemisphere. +simedtdlg.lbl.Altitude = Altitude: +simedtdlg.lbl.ttip.Altitude = The launch altitude above mean sea level.
This affects the position of the rocket in the atmospheric model. +simedtdlg.border.Launchrod = Launch rod +simedtdlg.lbl.Length = Length: +simedtdlg.lbl.ttip.Length = The length of the launch rod. +simedtdlg.lbl.Angle = Angle: +simedtdlg.lbl.ttip.Angle = The angle of the launch rod from vertical. +simedtdlg.lbl.Direction = Direction: +simedtdlg.lbl.ttip.Direction1 = Direction of the launch rod relative to the wind.
+simedtdlg.lbl.ttip.Direction2 = = towards the wind, +simedtdlg.lbl.ttip.Direction3 = = downwind. +simedtdlg.border.Simopt = Simulator options +simedtdlg.lbl.Calcmethod = Calculation method: +simedtdlg.lbl.ttip.Calcmethod = The Extended Barrowman method calculates aerodynamic forces according
to the Barrowman equations extended to accommodate more components. +simedtdlg.lbl.ExtBarrowman = Extended Barrowman +simedtdlg.lbl.Simmethod = Simulation method: +simedtdlg.lbl.ttip.Simmethod1 = The six degree-of-freedom simulator allows the rocket total freedom during flight.
+simedtdlg.lbl.ttip.Simmethod2 = Integration is performed using a 4th order Runge-Kutta 4 numerical integration. +simedtdlg.lbl.Timestep = Time step: +simedtdlg.lbl.ttip.Timestep1 = The time between simulation steps.
A smaller time step results in a more accurate but slower simulation.
+simedtdlg.lbl.ttip.Timestep2 = The 4th order simulation method is quite accurate with a time step of +simedtdlg.but.ttip.resettodefault = Reset the time step to its default value ( +simedtdlg.border.Simlist = Simulator listeners +simedtdlg.txt.longA1 = Simulation listeners is an advanced feature that allows user-written code to listen to and interact with the simulation. +simedtdlg.txt.longA2 = For details on writing simulation listeners, see the OpenRocket technical documentation. +simedtdlg.lbl.Curlist = Current listeners: +simedtdlg.lbl.Addsimlist = Add simulation listener +simedtdlg.lbl.Noflightdata = No flight data available. +simedtdlg.lbl.runsimfirst = Please run the simulation first. +simedtdlg.chart.Simflight = Simulated flight +simedtdlg.dlg.Simres = Simulation results + + + +! Simulation Panel +simpanel.but.newsimulation = New simulation +simpanel.but.editsimulation = Edit simulation +simpanel.but.runsimulations = Run simulations +simpanel.but.deletesimulations = Delete simulations +simpanel.but.plotexport = Plot / export +simpanel.but.ttip.newsimulation = Add a new simulation +simpanel.but.ttip.editsim = Edit the selected simulation +simpanel.but.ttip.runsimu = Re-run the selected simulations +simpanel.but.ttip.deletesim = Delete the selected simulations +simpanel.checkbox.donotask = Do not ask me again +simpanel.lbl.defpref = You can change the default operation in the preferences. +simpanel.dlg.lbl.DeleteSim1 = Delete the selected simulations? +simpanel.dlg.lbl.DeleteSim2 = This operation cannot be undone. +simpanel.dlg.lbl.DeleteSim3 = Delete simulations +simpanel.col.Name = Name +simpanel.col.Motors = Motors +simpanel.col.Apogee = Apogee +simpanel.col.Maxvelocity = Max. velocity +simpanel.col.Maxacceleration = Max. acceleration +simpanel.col.Timetoapogee = Time to apogee +simpanel.col.Flighttime = Flight time +simpanel.col.Groundhitvelocity = Ground hit velocity + +! SimulationRunDialog +SimuRunDlg.title.RunSim = Running simulations... +SimuRunDlg.lbl.Running = Running ... +SimuRunDlg.lbl.Simutime = Simulation time: +SimuRunDlg.lbl.Altitude = Altitude: +SimuRunDlg.lbl.Velocity = Velocity: +SimuRunDlg.msg.Unabletosim = Unable to simulate: +SimuRunDlg.msg.errorOccurred = An error occurred during the simulation: +SimuRunDlg.msg.AnException1 = An exception occurred during the simulation: +SimuRunDlg.msg.AnException2 = Please report this as a bug along with the details below. +SimuRunDlg.msg.AssertionError1 = A computation error occurred during the simulation. +SimuRunDlg.msg.AssertionError2 = Please report this as a bug along with the details below. +SimuRunDlg.msg.unknownerror1 = An unknown error was encountered during the simulation. +SimuRunDlg.msg.unknownerror2 = The program may be unstable, you should save all your designs and restart OpenRocket now! + + + +! SimulationExportPanel +SimExpPan.desc = Comma Separated Files (*.csv) +SimExpPan.border.Vartoexport = Variables to export +SimExpPan.but.Selectall = Select all +SimExpPan.but.Selectnone = Select none +SimExpPan.border.Fieldsep = Field separator +SimExpPan.lbl.Fieldsepstr = Field separator string: +SimExpPan.lbl.longA1 = The string used to separate the fields in the exported file.
+SimExpPan.lbl.longA2 = Use ',' for a Comma Separated Values (CSV) file. +SimExpPan.checkbox.Includesimudesc = Include simulation description +SimExpPan.checkbox.ttip.Includesimudesc = Include a comment at the beginning of the file describing the simulation. +SimExpPan.border.Comments = Comments +SimExpPan.checkbox.Includefielddesc = Include field descriptions +SimExpPan.checkbox.ttip.Includefielddesc = Include a comment line with the descriptions of the exported variables. +SimExpPan.checkbox.Incflightevents = Include flight events +SimExpPan.checkbox.ttip.Incflightevents = Include a comment line for every flight event. +SimExpPan.lbl.Commentchar = Comment character: +SimExpPan.lbl.ttip.Commentchar = The character(s) that mark a comment line. +SimExpPan.but.Exporttofile = Export to file... + +! MotorPlot +MotorPlot.title.Motorplot = Motor plot +MotorPlot.but.Select = Select +MotorPlot.Chart.Motorthrustcurve = Motor thrust curve +MotorPlot.Chart.Time = Time / s +MotorPlot.Chart.Thrust = Thrust / N +MotorPlot.txt.Designation = Designation: +MotorPlot.txt.Manufacturer = Manufacturer: +MotorPlot.txt.Type = Type: +MotorPlot.txt.Delays = Delays: +MotorPlot.txt.Comment = Comment:\n + + + +! Simulation plot panel +simplotpanel.lbl.Presetplotconf = Preset plot configurations: +simplotpanel.lbl.Xaxistype = X axis type: +simplotpanel.lbl.Unit = Unit: +simplotpanel.lbl.Yaxistypes = Y axis types: +simplotpanel.lbl.Flightevents = Flight events: +simplotpanel.but.All = All +simplotpanel.but.None = None +simplotpanel.but.NewYaxisplottype = New Y axis plot type +simplotpanel.but.Plotflight = Plot flight +simplotpanel.lbl.Axis = Axis: +simplotpanel.but.ttip.Removethisplot = Remove this plot +simplotpanel.Desc = The data will be plotted in time order even if the X axis type is not time. +simplotpanel.OptionPane.lbl1 = A maximum of 15 plots is allowed. +simplotpanel.OptionPane.lbl2 = Cannot add plot + + +! Component add buttons +compaddbuttons.Bodycompandfinsets = Body components and fin sets +compaddbuttons.Nosecone = Nose cone +compaddbuttons.Bodytube = Body tube +compaddbuttons.Transition = Transition +compaddbuttons.Trapezoidal = Trapezoidal +compaddbuttons.Elliptical = Elliptical +compaddbuttons.Freeform = Freeform +compaddbuttons.Launchlug = Launch lug +compaddbuttons.Innercomponent = Inner component +compaddbuttons.Innertube = Inner tube +compaddbuttons.Coupler = Coupler +compaddbuttons.Centeringring = Centering\nring +compaddbuttons.Bulkhead = Bulkhead +compaddbuttons.Engineblock = Engine\nblock +compaddbuttons.Massobjects = Mass objects +compaddbuttons.Parachute = Parachute +compaddbuttons.Streamer = Streamer +compaddbuttons.Shockcord = Shock cord +compaddbuttons.Masscomponent = Mass\ncomponent +compaddbuttons.Donotaskmeagain = Do not ask me again +compaddbuttons.Selectcomppos = Select component position +compaddbuttons.lbl.Youcanchange = You can change the default operation in the preferences. +compaddbuttons.lbl.insertcomp = Insert the component after the current component or as the last component? +compaddbuttons.askPosition.Inserthere = Insert here +compaddbuttons.askPosition.Addtotheend = Add to the end +compaddbuttons.askPosition.Cancel = Cancel + +! Component Analysis Dialog +componentanalysisdlg.componentanalysis = Component analysis +componentanalysisdlg.lbl.winddir = Wind direction: +componentanalysisdlg.TitledBorder.warnings = Warnings: +componentanalysisdlg.ToggleBut.worst = Worst +componentanalysisdlg.lbl.angleofattack = Angle of attack: +componentanalysisdlg.lbl.machnumber = Mach number: +componentanalysisdlg.lbl.rollrate = Roll rate: +componentanalysisdlg.lbl.activestages = Active stages: +componentanalysisdlg.lbl.motorconf = Motor configuration: +componentanalysisdlg.TabStability.Col = Component +componentanalysisdlg.TabStability = Stability +componentanalysisdlg.TabStability.ttip = Stability information +componentanalysisdlg.dragTableModel.Col.Component = Component +componentanalysisdlg.dragTableModel.Col.Pressure = Pressure CD +componentanalysisdlg.dragTableModel.Col.Base = Base CD +componentanalysisdlg.dragTableModel.Col.friction = Friction CD +componentanalysisdlg.dragTableModel.Col.total = Total CD +componentanalysisdlg.dragTabchar = Drag characteristics +componentanalysisdlg.dragTabchar.ttip = Drag characteristics +componentanalysisdlg.rollTableModel.Col.component = Component +componentanalysisdlg.rollTableModel.Col.rollforc = Roll forcing coefficient +componentanalysisdlg.rollTableModel.Col.rolldamp = Roll damping coefficient +componentanalysisdlg.rollTableModel.Col.total = Total Cl +componentanalysisdlg.rollTableModel = Roll dynamics +componentanalysisdlg.rollTableModel.ttip = Roll dynamics +componentanalysisdlg.println.closingmethod = Closing method called: +componentanalysisdlg.println.settingnam = SETTING NAN VALUES +componentanalysisdlg.lbl.reflenght = Reference length: +componentanalysisdlg.lbl.refarea = Reference area: +!componentanalysisdlg.But.close =Close + +! Custom Material dialog +custmatdlg.title.Custommaterial = Custom material +custmatdlg.lbl.Materialname = Material name: +custmatdlg.lbl.Materialtype = Material type: +custmatdlg.lbl.Materialdensity = Material density: +custmatdlg.checkbox.Addmaterial = Add material to database + + +! Ring Component Config +ringcompcfg.OuterRadius = OuterRadius +ringcompcfg.Automatic = Automatic +ringcompcfg.InnerRadius = InnerRadius +ringcompcfg.Thickness = Thickness +ringcompcfg.Length = Length +ringcompcfg.Positionrelativeto = Position relative to: +ringcompcfg.plus = plus +ringcompcfg.PositionValue = PositionValue +ringcompcfg.Radialdistance = Radial distance: +ringcompcfg.Distancefrom = Distance from the rocket centerline +ringcompcfg.Radialdirection = Radial direction +ringcompcfg.radialdirectionfrom = The radial direction from the rocket centerline +ringcompcfg.but.Reset = Reset +ringcompcfg.but.Resetcomponant = Reset the component to the rocket centerline + +! Body Tube Config +BodyTubecfg.lbl.Bodytubelength = Body tube length: +BodyTubecfg.lbl.Outerdiameter = Outer diameter: +BodyTubecfg.lbl.Innerdiameter = Inner diameter: +BodyTubecfg.lbl.Wallthickness = Wall thickness: +BodyTubecfg.tab.General = General +BodyTubecfg.tab.Generalproperties = General properties +BodyTubecfg.tab.Motor = Motor +BodyTubecfg.tab.Motormountconf = Motor mount configuration +BodyTubecfg.checkbox.Automatic = Automatic +BodyTubecfg.checkbox.Filled = Filled + +! FinSetConfig +FinSetConfig.tab.Fintabs = Fin tabs +FinSetConfig.tab.Through-the-wall = Through-the-wall fin tabs +FinSetConfig.but.Converttofreeform = Convert to freeform +FinSetConfig.but.Converttofreeform.ttip = Convert this fin set into a freeform fin set +FinSetConfig.Convertfinset = Convert fin set +FinSetConfig.but.Splitfins = Split fins +FinSetConfig.but.Splitfins.ttip = Split the fin set into separate fins +FinSetConfig.lbl.Through-the-wall = Through-the-wall fin tabs: +FinSetConfig.lbl.Tablength = Tab length: +FinSetConfig.ttip.Tablength = The length of the fin tab. +FinSetConfig.lbl.Tabheight = Tab height: +FinSetConfig.ttip.Tabheight = The spanwise height of the fin tab. +FinSetConfig.lbl.Tabposition = Tab position: +FinSetConfig.ttip.Tabposition = The position of the fin tab. +FinSetConfig.lbl.relativeto = relative to + +! MotorDatabaseLoadingDialog +MotorDbLoadDlg.title = Loading motors +MotorDbLoadDlg.Loadingmotors = Loading motors... + +! RocketConfig +RocketCfg.lbl.Designname = Design name: +RocketCfg.lbl.Designer = Designer: +RocketCfg.lbl.Comments = Comments: +RocketCfg.lbl.Revisionhistory = Revision history: +RocketCfg.lbl.Material = Material: + +! ShockCordConfig +ShockCordCfg.lbl.Shockcordlength = Shock cord length + +! RocketComponentConfig +RocketCompCfg.lbl.Componentname = Component name: +RocketCompCfg.ttip.Thecomponentname = The component name. +RocketCompCfg.tab.Override = Override +RocketCompCfg.tab.MassandCGoverride = Mass and CG override options +RocketCompCfg.tab.Figure = Figure +RocketCompCfg.tab.Figstyleopt = Figure style options +RocketCompCfg.tab.Comment = Comment +RocketCompCfg.tab.Specifyacomment = Specify a comment for the component +RocketCompCfg.lbl.Mass = Mass: +RocketCompCfg.lbl.Componentmass = Component mass: +RocketCompCfg.lbl.overriddento = (overridden to +RocketCompCfg.lbl.overriddenby = (overridden by +RocketCompCfg.lbl.Componentmaterial = Component material: +RocketCompCfg.lbl.Componentfinish = Component finish: +RocketCompCfg.lbl.ttip.componentmaterialaffects = The component material affects the weight of the component. +RocketCompCfg.combo.ttip.componentmaterialaffects = The component material affects the weight of the component. +RocketCompCfg.lbl.longA1 = The component finish affects the aerodynamic drag of the component.
+RocketCompCfg.lbl.longA2 = The value indicated is the average roughness height of the surface. +RocketCompCfg.but.Setforall = Set for all +RocketCompCfg.but.ttip.Setforall = Set this finish for all components of the rocket. +RocketCompCfg.lbl.Overridemassorcenter = Override the mass or center of gravity of the +RocketCompCfg.checkbox.Overridemass = Override mass: +RocketCompCfg.checkbox.Overridecenterofgrav = Override center of gravity: +RocketCompCfg.checkbox.OverridemassandCG = Override mass and CG of all subcomponents +RocketCompCfg.lbl.longB1 = The overridden mass does not include motors.
+RocketCompCfg.lbl.longB2 = The center of gravity is measured from the front end of the +RocketCompCfg.lbl.Commentsonthe = Comments on the +RocketCompCfg.lbl.Figurestyle = Figure style: +RocketCompCfg.lbl.Componentcolor = Component color: +RocketCompCfg.lbl.Choosecolor = Choose color +RocketCompCfg.checkbox.Usedefaultcolor = Use default color +RocketCompCfg.lbl.Complinestyle = Component line style: +RocketCompCfg.but.Saveasdefstyle = Save as default style +RocketCompCfg.lbl.Diameter = Diameter: +RocketCompCfg.lbl.Length = Length: +RocketCompCfg.lbl.Thickness = Thickness: +RocketCompCfg.checkbox.Endcapped = End capped +RocketCompCfg.ttip.Endcapped = Whether the end of the shoulder is capped. +RocketCompCfg.title.Noseconeshoulder = Nose cone shoulder +RocketCompCfg.title.Aftshoulder = Aft shoulder +RocketCompCfg.border.Foreshoulder = Fore shoulder +!RocketCompCfg.lbl.Length = Length: + +! BulkheadConfig +BulkheadCfg.tab.Radius = Radius: +BulkheadCfg.tab.Thickness = Thickness: +BulkheadCfg.tab.General = General +BulkheadCfg.tab.Generalproperties = General properties + +!CenteringRingConfig +CenteringRingCfg.tab.Outerdiam = Outer diameter: +CenteringRingCfg.tab.Innerdiam = Inner diameter: +CenteringRingCfg.tab.Thickness = Thickness: +CenteringRingCfg.tab.General = General +CenteringRingCfg.tab.Generalproperties = General properties + +!ComponentConfigDialog +ComponentCfgDlg.configuration = configuration +ComponentCfgDlg.Modify = Modify + +!EllipticalFinSetConfig +EllipticalFinSetCfg.Nbroffins = Number of fins: +EllipticalFinSetCfg.Rotation = Rotation: +EllipticalFinSetCfg.Fincant = Fin cant: +EllipticalFinSetCfg.Rootchord = Root chord: +EllipticalFinSetCfg.Height = Height: +EllipticalFinSetCfg.Positionrelativeto = Position relative to: +EllipticalFinSetCfg.plus = plus +EllipticalFinSetCfg.FincrossSection = Fin cross section: +EllipticalFinSetCfg.Thickness = Thickness: +EllipticalFinSetCfg.General = General +EllipticalFinSetCfg.Generalproperties = General properties +EllipticalFinSetCfg.ttip.Fincant = The angle that the fins are canted with respect to the rocket body. + +!FreeformFinSetConfig +FreeformFinSetCfg.tab.General = General +FreeformFinSetCfg.tab.ttip.General = General properties +FreeformFinSetCfg.tab.Shape = Shape +FreeformFinSetCfg.tab.ttip.Finshape = Fin shape +FreeformFinSetCfg.lbl.Numberoffins = Number of fins: +FreeformFinSetCfg.lbl.Finrotation = Fin rotation: +FreeformFinSetCfg.lbl.Fincant = Fin cant: +FreeformFinSetCfg.lbl.ttip.Fincant = The angle that the fins are canted with respect to the rocket body. +FreeformFinSetCfg.lbl.Posrelativeto = Position relative to: +FreeformFinSetCfg.lbl.plus = plus +FreeformFinSetCfg.lbl.FincrossSection = Fin cross section: +FreeformFinSetCfg.lbl.Thickness = Thickness: + +!InnerTubeConfig +InnerTubeCfg.tab.Motor = Motor +InnerTubeCfg.tab.ttip.Motor = Motor mount configuration +InnerTubeCfg.tab.Cluster = Cluster +InnerTubeCfg.tab.ttip.Cluster = Cluster configuration +InnerTubeCfg.tab.Radialpos = Radial position +InnerTubeCfg.tab.ttip.Radialpos = Radial position +InnerTubeCfg.lbl.Selectclustercfg = Select cluster configuration: +InnerTubeCfg.lbl.TubeSep = Tube separation: +InnerTubeCfg.lbl.ttip.TubeSep = The separation of the tubes, 1.0 = touching each other +InnerTubeCfg.lbl.Rotation = Rotation: +InnerTubeCfg.lbl.ttip.Rotation = Rotation angle of the cluster configuration +InnerTubeCfg.lbl.Rotangle = Rotation angle of the cluster configuration +InnerTubeCfg.but.Splitcluster = Split cluster +InnerTubeCfg.lbl.longA1 = Split the cluster into separate components.
+InnerTubeCfg.lbl.longA2 = This also duplicates all components attached to this inner tube. +InnerTubeCfg.but.Resetsettings = Reset settings +InnerTubeCfg.but.ttip.Resetsettings = Reset the separation and rotation to the default values + +! LaunchLugConfig +LaunchLugCfg.lbl.Length = Length: +LaunchLugCfg.lbl.Outerdiam = Outer diameter: +LaunchLugCfg.lbl.Innerdiam = Inner diameter: +LaunchLugCfg.lbl.Thickness = Thickness: +LaunchLugCfg.lbl.Radialpos = Radial position: +LaunchLugCfg.lbl.Posrelativeto = Position relative to: +LaunchLugCfg.lbl.plus = plus +LaunchLugCfg.tab.General = General +LaunchLugCfg.tab.Generalprop = General properties + +! MassComponentConfig +MassComponentCfg.lbl.Mass = Mass +MassComponentCfg.lbl.Length = Length +MassComponentCfg.lbl.Diameter = Diameter +MassComponentCfg.lbl.PosRelativeto = Position relative to: +MassComponentCfg.lbl.plus = plus +MassComponentCfg.tab.General = General +MassComponentCfg.tab.ttip.General = General properties +MassComponentCfg.tab.Radialpos = Radial position +MassComponentCfg.tab.ttip.Radialpos = Radial position configuration +MassComponentCfg.lbl.Radialdistance = Radial distance: +MassComponentCfg.lbl.Radialdirection = Radial direction: +MassComponentCfg.but.Reset = Reset + +! MotorConfig +MotorCfg.checkbox.compmotormount = This component is a motor mount +MotorCfg.lbl.Motorcfg = Motor configuration: +MotorCfg.but.New = New +MotorCfg.lbl.Currentmotor = Current motor: +MotorCfg.lbl.Motoroverhang = Motor overhang: +MotorCfg.lbl.Ignitionat = Ignition at: +MotorCfg.lbl.plus = plus +MotorCfg.lbl.seconds = seconds +MotorCfg.lbl.longA1 = The current design has only one stage. +MotorCfg.lbl.longA2 = Stages can be added by clicking \"New stage\". +MotorCfg.lbl.longB1 = The current design has +MotorCfg.lbl.longB2 = stages. +MotorCfg.but.Selectmotor = Select motor +MotorCfg.but.Removemotor = Remove motor +MotorCfg.lbl.motorLabel = None + +! NoseConeConfig +NoseConeCfg.lbl.Noseconeshape = Nose cone shape: +NoseConeCfg.lbl.Shapeparam = Shape parameter: +NoseConeCfg.lbl.Noseconelength = Nose cone length: +NoseConeCfg.lbl.Basediam = Base diameter: +NoseConeCfg.checkbox.Automatic = Automatic +NoseConeCfg.lbl.Wallthickness = Wall thickness: +NoseConeCfg.checkbox.Filled = Filled +NoseConeCfg.tab.General = General +NoseConeCfg.tab.ttip.General = General properties +NoseConeCfg.tab.Shoulder = Shoulder +NoseConeCfg.tab.ttip.Shoulder = Shoulder properties + +! ParachuteConfig +ParachuteCfg.lbl.Canopy = Canopy: +ParachuteCfg.lbl.Diameter = Diameter: +ParachuteCfg.lbl.Material = Material: +ParachuteCfg.combo.MaterialModel = The component material affects the weight of the component. +ParachuteCfg.lbl.longA1 = Drag coefficient CD: +ParachuteCfg.lbl.longB1 = The drag coefficient relative to the total area of the parachute.
+ParachuteCfg.lbl.longB2 = A larger drag coefficient yields a slowed descent rate. +ParachuteCfg.lbl.longB3 = A typical value for parachutes is 0.8. +ParachuteCfg.but.Reset = Reset +ParachuteCfg.lbl.Shroudlines = Shroud lines: +ParachuteCfg.lbl.Numberoflines = Number of lines: +ParachuteCfg.lbl.Linelength = Line length: +ParachuteCfg.lbl.Material = Material: +ParachuteCfg.lbl.Posrelativeto = Position relative to: +ParachuteCfg.lbl.plus = plus +ParachuteCfg.lbl.Packedlength = Packed length: +ParachuteCfg.lbl.Packeddiam = Packed diameter: +ParachuteCfg.lbl.Deploysat = Deploys at: +ParachuteCfg.lbl.seconds = seconds +ParachuteCfg.lbl.Altitude = Altitude: +ParachuteCfg.tab.General = General +ParachuteCfg.tab.ttip.General = General properties +ParachuteCfg.tab.Radialpos = Radial position +ParachuteCfg.tab.ttip.Radialpos = Radial position configuration +ParachuteCfg.lbl.Radialdistance = Radial distance: +ParachuteCfg.lbl.Radialdirection = Radial direction: +ParachuteCfg.but.Reset = Reset + +! ShockCordConfig +ShockCordCfg.lbl.Shockcordlength = Shock cord length +ShockCordCfg.lbl.Shockcordmaterial = Shock cord material: +ShockCordCfg.lbl.Posrelativeto = Position relative to: +ShockCordCfg.lbl.plus = plus +ShockCordCfg.lbl.Packedlength = Packed length: +ShockCordCfg.lbl.Packeddiam = Packed diameter: +ShockCordCfg.tab.General = General +ShockCordCfg.tab.ttip.General = General properties + +!SleeveConfig +SleeveCfg.tab.Outerdiam = Outer diameter: +SleeveCfg.tab.Innerdiam = Inner diameter: +SleeveCfg.tab.Wallthickness = Wall thickness: +SleeveCfg.tab.Length = Length: +SleeveCfg.tab.General = General +SleeveCfg.tab.Generalproperties = General properties + +! StreamerConfig +StreamerCfg.lbl.Striplength = Strip length: +StreamerCfg.lbl.Stripwidth = Strip width: +StreamerCfg.lbl.Striparea = Strip area: +StreamerCfg.lbl.Aspectratio = Aspect ratio: +StreamerCfg.lbl.Material = Material: +StreamerCfg.combo.ttip.MaterialModel = The component material affects the weight of the component. +StreamerCfg.lbl.longA1 = Drag coefficient CD: +StreamerCfg.lbl.longB1 = The drag coefficient relative to the total area of the streamer.
+StreamerCfg.lbl.longB2 = A larger drag coefficient yields a slowed descent rate. +StreamerCfg.lbl.Automatic = Automatic +StreamerCfg.lbl.longC1 = The drag coefficient is relative to the area of the streamer. +StreamerCfg.lbl.Posrelativeto = Position relative to: +StreamerCfg.lbl.plus = plus +StreamerCfg.lbl.Packedlength = Packed length: +StreamerCfg.lbl.Packeddiam = Packed diameter: +StreamerCfg.lbl.Deploysat = Deploys at: +StreamerCfg.lbl.seconds = seconds +StreamerCfg.lbl.Altitude = Altitude: +StreamerCfg.tab.General = General +StreamerCfg.tab.ttip.General = General properties +StreamerCfg.tab.Radialpos = Radial position +StreamerCfg.tab.ttip.Radialpos = Radial position configuration +StreamerCfg.lbl.Radialdistance = Radial distance: +StreamerCfg.lbl.Radialdirection = Radial direction: +StreamerCfg.but.Reset = Reset + +! ThicknessRingComponentConfig +ThicknessRingCompCfg.tab.Outerdiam = Outer diameter: +ThicknessRingCompCfg.tab.Innerdiam = Inner diameter: +ThicknessRingCompCfg.tab.Wallthickness = Wall thickness: +ThicknessRingCompCfg.tab.Length = Length: +ThicknessRingCompCfg.tab.General = General +ThicknessRingCompCfg.tab.Generalprop = General properties + +! TransitionConfig +TransitionCfg.lbl.Transitionshape = Transition shape: +TransitionCfg.checkbox.Clipped = Clipped +TransitionCfg.lbl.Shapeparam = Shape parameter: +TransitionCfg.lbl.Transitionlength = Transition length: +TransitionCfg.lbl.Forediam = Fore diameter: +TransitionCfg.checkbox.Automatic = Automatic +TransitionCfg.lbl.Aftdiam = Aft diameter: +TransitionCfg.lbl.Wallthickness = Wall thickness: +TransitionCfg.checkbox.Filled = Filled +TransitionCfg.tab.General = General +TransitionCfg.tab.Generalproperties = General properties +TransitionCfg.tab.Shoulder = Shoulder +TransitionCfg.tab.Shoulderproperties = Shoulder properties + +! TrapezoidFinSetConfig +TrapezoidFinSetCfg.lbl.Nbroffins = Number of fins: +TrapezoidFinSetCfg.lbl.ttip.Nbroffins = The number of fins in the fin set. +TrapezoidFinSetCfg.lbl.Finrotation = Fin rotation: +TrapezoidFinSetCfg.lbl.ttip.Finrotation = The angle of the first fin in the fin set. +TrapezoidFinSetCfg.lbl.Fincant = Fin cant: +TrapezoidFinSetCfg.lbl.ttip.Fincant =The angle that the fins are canted with respect to the rocket body. +TrapezoidFinSetCfg.lbl.Rootchord = Root chord: +TrapezoidFinSetCfg.lbl.Tipchord = Tip chord: +TrapezoidFinSetCfg.lbl.Height = Height: +TrapezoidFinSetCfg.lbl.Sweeplength = Sweep length: +TrapezoidFinSetCfg.lbl.Sweepangle = Sweep angle: +TrapezoidFinSetCfg.lbl.FincrossSection = Fin cross section: +TrapezoidFinSetCfg.lbl.Thickness = Thickness: +TrapezoidFinSetCfg.lbl.Posrelativeto = Position relative to: +TrapezoidFinSetCfg.lbl.plus = plus +TrapezoidFinSetCfg.tab.General = General +TrapezoidFinSetCfg.tab.Generalproperties = General properties + +!MotorConfigurationModel +MotorCfgModel.Editcfg = Edit configurations + +! StorageOptionChooser +StorageOptChooser.lbl.Simdatatostore = Simulated data to store: +StorageOptChooser.rdbut.Allsimdata = All simulated data +StorageOptChooser.lbl.longA1 = Store all simulated data.
+StorageOptChooser.lbl.longA2 = This can result in very large files! +StorageOptChooser.rdbut.Every = Every +StorageOptChooser.lbl.longB1 = Store plottable values approximately this far apart.
+StorageOptChooser.lbl.longB2 = Larger values result in smaller files. +StorageOptChooser.lbl.seconds = seconds +StorageOptChooser.rdbut.Onlyprimfig = Only primary figures +StorageOptChooser.lbl.longC1 = Store only the values shown in the summary table.
+StorageOptChooser.lbl.longC2 = This results in the smallest files. +StorageOptChooser.checkbox.Compfile = Compress file +StorageOptChooser.lbl.UsingComp = Using compression reduces the file size significantly. +StorageOptChooser.lbl.longD1 = An estimate on how large the resulting file would be with the present options. +StorageOptChooser.ttip.Saveopt = Save options +StorageOptChooser.lbl.Estfilesize = Estimated file size: +StorageOptChooser.lbl.Saveopt = Save options + +! ThrustCurveMotorSelectionPanel +TCMotorSelPan.lbl.Selrocketmotor = Select rocket motor: +TCMotorSelPan.checkbox.hideSimilar = Hide very similar thrust curves + +! PlotDialog +PlotDialog.title.Flightdataplot = Flight data plot +PlotDialog.Chart.Simulatedflight = Simulated flight +PlotDialog.CheckBox.Showdatapoints = Show data points +PlotDialog.lbl.Chart = Click+drag down+right to zoom in, up+left to zoom out + ! "main" prefix is used for the main application dialog @@ -22,6 +807,7 @@ main.menu.file.open = Open... main.menu.file.openExample = Open example... main.menu.file.save = Save main.menu.file.saveAs = Save as... +main.menu.file.print = Print... main.menu.file.close = Close main.menu.file.quit = Quit @@ -41,7 +827,8 @@ main.menu.help = Help main.menu.help.license = License main.menu.help.bugReport = Bug report main.menu.help.debugLog = Debug log -main.menu.help. = About - - +main.menu.help.about = About +main.menu.debug = Debug +main.menu.debug.whatisthismenu = What is this menu? +main.menu.debug.createtestrocket = Create test rocket diff --git a/l10n/messages_fr.properties b/l10n/messages_fr.properties new file mode 100644 index 00000000..fdf971b4 --- /dev/null +++ b/l10n/messages_fr.properties @@ -0,0 +1,829 @@ + +# +# French base translation file +# Translated by Tripoli France + + +! Set to the name of the current translation file (used for debugging purposes) +debug.currentFile = messages_fr.properties + +! RocketActions +RocketActions.checkbox.Donotaskmeagain = Ne plus me demander +RocketActions.lbl.Youcanchangedefop = Vous pouvez changer le mode opératoire par defaut dans les préferences. +RocketActions.showConfirmDialog.lbl1 = Effacer les simulations sélectionnées? +RocketActions.showConfirmDialog.lbl2 = Cette opération n'est pas réversible. +RocketActions.showConfirmDialog.title = Effacer les simulations +RocketActions.DelCompAct.Delete = Effacer +RocketActions.DelCompAct.ttip.Delete = Effacer la pièce sélectionnée. +RocketActions.DelSimuAct.Delete = Effacer +RocketActions.DelSimuAct.ttip.Delete = Effacer la simulation sélectionnée. +RocketActions.DelAct.Delete = Effacer +RocketActions.DelAct.ttip.Delete = Effacer la pièce ou la simulation sélectionnée. +RocketActions.CutAction.Cut = Couper +RocketActions.CutAction.ttip.Cut = Couper cette pièce ou simulation, l'ajouter au presse papier et l'enlever du projet +RocketActions.CopyAct.Copy = Copier +RocketActions.CopyAct.ttip.Copy = Copier les pièces (et les pièces liées) dans le presse papier. +RocketActions.PasteAct.Paste = Coller +RocketActions.PasteAct.ttip.Paste = Coller la pièce ou simulation présente dans le presse papier dans le projet. +RocketActions.EditAct.Edit = Modifier +RocketActions.EditAct.ttip.Edit = Modifier la pièce sélectionnée. +RocketActions.NewStageAct.Newstage = Nouvel étage +RocketActions.NewStageAct.ttip.Newstage = Ajouter un nouvel étage au projet. +RocketActions.ActBoosterstage = Etage Booster +RocketActions.MoveUpAct.Moveup = Monter +RocketActions.MoveUpAct.ttip.Moveup = Monter la pièce. +RocketActions.MoveDownAct.Movedown = Descendre +RocketActions.MoveDownAct.ttip.Movedown = Descendre la pièce. + +! RocketPanel +RocketPanel.FigTypeAct.Sideview = Vue de coté +RocketPanel.FigTypeAct.ttip.Sideview = Vue de coté +RocketPanel.FigTypeAct.Backview = Vue arrière +RocketPanel.FigTypeAct.ttip.Backview = Vue arrière +RocketPanel.lbl.Motorcfg = Configuration Moteur: +RocketPanel.lbl.infoMessage = Cliquer pour sélectionner    Shift+cliquer pour sélectionner plusieur    Double-cliquer pour modifier    Click+déplacer pour déplacer + + +! BasicFrame +BasicFrame.SimpleFileFilter1 = Tous les fichiers fusée (*.ork; *.rkt) +BasicFrame.SimpleFileFilter2 = Fichiers OpenRocket (*.ork) +BasicFrame.SimpleFileFilter3 = Fichiers RockSim (*.rkt) +BasicFrame.tab.Rocketdesign = Projet fusée +BasicFrame.tab.Flightsim = Simulations de vol +BasicFrame.title.Addnewcomp = Ajouter une nouvelle pièce +BasicFrame.item.Openrocketdesign = Ouvrir un projet fusée +BasicFrame.item.Openexamplerocketdesign = Ouvrir un exemple de projet fusée +BasicFrame.item.SavecurRocketdesign = Sauvegarder le projet fusée courant +BasicFrame.item.SavecurRocketdesnewfile = Sauvegarder le projet fusée courant dans un nouveau fichier +BasicFrame.item.Printpart = Imprimer la liste des pièces et les modèles d'ailerons +BasicFrame.item.Closedesign = Fermer le projet fusée courant +BasicFrame.item.Quitprogram = Quitter le programme +BasicFrame.menu.Rocketedt = Modification de la fusée +BasicFrame.dlg.lbl1 = Le projet ' +BasicFrame.dlg.lbl2 = ' N'a pas été sauvegardé. +BasicFrame.dlg.lbl3 = Voulez vous le sauvegarder? +BasicFrame.dlg.title = Projet non sauvegardé + +! Labels used in buttons of dialog windows +button.ok = OK +button.cancel = Annuler +button.close = Fermer + +! Common labels used in buttons of dialog windows +dlg.but.ok = Accepter +dlg.but.cancel = Annuler +dlg.but.close = Fermer + +! About Dialog +about.dlg.but.close = Fermer +about.dlg.lbl.translation = Traduit en français par Tripoli France +about.dlg.lbl.transwebsite = http://tripoli.france.free.fr/ + +! Bug Report dialog +bugreport.dlg.title = Rapport d'erreurs +bugreport.dlg.but.Sendbugreport = Envoyer un rapport d'erreurs +bugreport.dlg.but.Sendbugreport.Ttip = Envoyer automatiquement un rapport d'erreurs aux developpeurs d'OpenRocket +bugreport.dlg.successmsg1 = Rapport d'erreurs envoyé avec succès. +bugreport.dlg.successmsg2 = Merci d'avoir contribué à l'amélioration d'OpenRocket! +bugreport.dlg.successmsg3 = Rapport d'erreurs envoyé + +! Debug log dialog +debuglogdlg.but.clear = Effacer +debuglogdlg.OpenRocketdebuglog = Fichier debug d'OpenRocket +debuglogdlg.Displayloglines = Afficher les numéros des lignes: +debuglogdlg.Follow = Suivre +debuglogdlg.col.Time = Heure +debuglogdlg.col.Level = Niveau +debuglogdlg.col.Location = Emplacement +debuglogdlg.col.Message = Message +debuglogdlg.lbl.Loglinenbr = Numéro de la ligne: +debuglogdlg.lbl.Time = Heure: +debuglogdlg.lbl.Level = Niveau: + + +! Edit Motor configuration dialog +edtmotorconfdlg.but.removemotor = Enlever le moteur +edtmotorconfdlg.but.Selectmotor = Choisir le moteur +edtmotorconfdlg.but.Removeconfiguration = Supprimer la configuration +edtmotorconfdlg.but.Newconfiguration = Nouvelle configuration +edtmotorconfdlg.lbl.Motormounts = Portes moteur: +edtmotorconfdlg.title.Editmotorconf = Changer la configuration moteur +edtmotorconfdlg.selectcomp = Choisir les pièces utilisées par le porte moteur: +edtmotorconfdlg.lbl.Motorconfig = Configurations moteur: +edtmotorconfdlg.lbl.Configname = Nom de la configuration: +edtmotorconfdlg.lbl.Leavenamedefault = Laisser le champ vide par défaut. + +! Example design dialog +exdesigndlg.but.open = Ouvrir + +! Print panel dialog +printdlg.but.saveaspdf = Sauvegarder en PDF +printdlg.but.preview = Prévisualisation +printdlg.but.settings = Configuration + +! Material edit panel +matedtpan.but.new = Nouveau +matedtpan.but.edit = Editer +matedtpan.but.delete = Effacer +matedtpan.but.revertall = Revenir aux valeurs précédente +matedtpan.col.Material = Matériaux +matedtpan.col.Type = Type +matedtpan.col.Density = Densité +matedtpan.col.but.ttip.New = Ajouter un nouveau matériau +matedtpan.title.Addcustmaterial = Ajouter un matériau personnalisé +matedtpan.but.ttip.edit = Modifier un matériau existant +matedtpan.title.Editmaterial = Modifier un matériau +matedtpan.title2.Editmaterial = Les matériaux prédéfini ne peuvent pas être modifiés. +matedtpan.but.ttip.delete = Effacer un matériau personnalisé +matedtpan.but.ttip.revertall = Effacer tous les materiaux personnalisés +matedtpan.title.Deletealluser-defined = Effacer tous les matériaux personalisés? +matedtpan.title.Revertall = Revenir aux valeurs précédente? +matedtpan.lbl.edtmaterials = Modifier les matériaux n'affectera pas les projets fusée existant. + +!MaterialModel +MaterialModel.title.Material = Matériau +MaterialModel.title.Defcustmat = Définir un matériau personnalisé + + +! Preference dialog +pref.dlg.but.add = Ajouter +pref.dlg.but.reset = Réinitialiser +pref.dlg.but.checknow = Vérifier maintenant +pref.dlg.but.defaultmetric = Système métrique +pref.dlg.but.defaultimperial = Système imperial +pref.dlg.title.Preferences = Préférences +pref.dlg.tab.Units = Unités +pref.dlg.tab.Defaultunits = Unités par défaut +pref.dlg.tab.Materials = Matériaux +pref.dlg.tab.Custommaterials = Matériaux personnalisé +pref.dlg.tab.Options = Options +pref.dlg.tab.Miscellaneousoptions = Autres options +pref.dlg.lbl.Positiontoinsert = Position pour insérer des composants internes: +pref.dlg.lbl.Confirmdeletion = Confirmer l'effacement des simulations: +pref.dlg.lbl.User-definedthrust = Courbes de poussée personnalisées: +pref.dlg.Allthrustcurvefiles = Tous les fichiers de courbes de poussée (*.eng; *.rse; *.zip; répertoires) +pref.dlg.RASPfiles = Fichiers moteur RASP (*.eng) +pref.dlg.RockSimfiles = Fichiers moteur RockSim (*.rse) +pref.dlg.ZIParchives = Archives ZIP (*.zip) +pref.dlg.checkbox.Checkupdates = Rechercher les mises à jour au démarrage +pref.dlg.ttip.Checkupdatesnow = Recherchez les mises à jour maintenant +pref.dlg.lbl.Selectprefunits = Choisissez vos unités favorites: +pref.dlg.lbl.Rocketdimensions = Dimensions de la fusée: +pref.dlg.lbl.Linedensity = Epaisseur des lignes: +pref.dlg.lbl.Motordimensions = Dimensions du moteur: +pref.dlg.lbl.Surfacedensity = Densité de la Surface: +pref.dlg.lbl.Distance = Distance: +pref.dlg.lbl.Bulkdensity = Bulk density: +pref.dlg.lbl.Velocity = Vélocité: +pref.dlg.lbl.Surfaceroughness = Rugosité de la Surface: +pref.dlg.lbl.Acceleration = Accélération: +pref.dlg.lbl.Area = Aire: +pref.dlg.lbl.Mass = Masse: +pref.dlg.lbl.Angle = Angle: +pref.dlg.lbl.Force = Force: +pref.dlg.lbl.Rollrate = Taux de roulis: +pref.dlg.lbl.Totalimpulse = Impulsion totale: +pref.dlg.lbl.Temperature = Température: +pref.dlg.lbl.Momentofinertia = Moment d'inertie: +pref.dlg.lbl.Pressure = Pression: +pref.dlg.lbl.Stability = Stabilité: +pref.dlg.lbl.effect1 = Les changements prendront effet la prochaine fois que vous ouvrirez une fenêtre. +pref.dlg.lbl.Checkingupdates = Recherche des mises à jour... +pref.dlg.lbl.msg1 = Une erreur est survenue durant la communication avec le serveur. +pref.dlg.lbl.msg2 = Incapable de récupérer les informations de mise à jour +pref.dlg.lbl.msg3 = Vous utilisez la dernière version d'OpenRocket. +pref.dlg.lbl.msg4 = Pas de mises à jour disponible + +! Simulation edit dialog +simedtdlg.but.runsimulation = Lancer la simulation +simedtdlg.but.resettodefault = Restaurer les paramètres par défaut +simedtdlg.but.add = Ajouter +simedtdlg.but.remove = Enlever +simedtdlg.title.Editsim = Modifier la simulation +simedtdlg.lbl.Simname = Nom de la simulation: +simedtdlg.tab.Launchcond = Conditions de lancement +simedtdlg.tab.Simopt = Options de simulation +simedtdlg.tab.Plotdata = Tracer les données +simedtdlg.tab.Exportdata = Exporter les données +simedtdlg.lbl.Motorcfg = Configuration moteur: +simedtdlg.lbl.ttip.Motorcfg = Choisir la configuration moteur à utiliser. +simedtdlg.combo.ttip.motorconf = Choisir la configuration moteur à utiliser. +simedtdlg.lbl.Wind = Vent +simedtdlg.lbl.Averwindspeed = Vitesse moyenne du vent: +simedtdlg.lbl.ttip.Averwindspeed = Vitesse moyenne du vent par rapport au sol. +simedtdlg.lbl.Stddeviation = Dérive standard: +simedtdlg.lbl.ttip.Stddeviation = La dérive standard de la vitesse du vent.
La vitesse du vent est le double de l'écart-type de la moyenne dans 95% des cas. +simedtdlg.lbl.Turbulenceintensity = Intensité de la turbulence: +simedtdlg.lbl.ttip.Turbulenceintensity1 = L'intensité de la turbulence résulte de la division de la dérive par la vitesse moyenne de vent.
+simedtdlg.lbl.ttip.Turbulenceintensity2 = Les valeurs typiques vont de +simedtdlg.lbl.ttip.Turbulenceintensity3 = à +simedtdlg.border.Atmoscond = Conditions atmosphérique +simedtdlg.checkbox.InterStdAtmosphere = Utiliser les paramètres de l'Atmosphère Standard +simedtdlg.checkbox.ttip.InterStdAtmosphere1 = Sélectionner pour utiliser les paramètres de l'Atmosphère Standard.
Ce modèle à une température de +simedtdlg.checkbox.ttip.InterStdAtmosphere2 = et une pression de +simedtdlg.checkbox.ttip.InterStdAtmosphere3 = au niveau de la mer. +simedtdlg.lbl.Temperature = Température: +simedtdlg.lbl.ttip.Temperature = Température du site de lancement. +simedtdlg.lbl.Pressure = Pression: +simedtdlg.lbl.ttip.Pressure = Pression atmosphérique du site de lancement. +simedtdlg.lbl.Launchsite = Site de lancement +simedtdlg.lbl.Latitude = Latitude: +simedtdlg.lbl.ttip.Latitude = La latitude du site de lancement affecte l'attraction gravitationnelle de la Terre.
> Les valeurs positives sont dans l'hémisphère Nord, les valeurs négatives sur l'hémisphère Sud. +simedtdlg.lbl.Altitude = Altitude: +simedtdlg.lbl.ttip.Altitude = Altitude du site de lancement par rapport au niveau de la mer.
Cela affecte la position de la fusée dans le modèle atmosphérique. +simedtdlg.border.Launchrod = Rampe de lancement +simedtdlg.lbl.Length = Longueur: +simedtdlg.lbl.ttip.Length = Longueur de la rampe. +simedtdlg.lbl.Angle = Angle: +simedtdlg.lbl.ttip.Angle = Angle de la rampe de lancement par rapport à la verticale. +simedtdlg.lbl.Direction = Direction: +simedtdlg.lbl.ttip.Direction1 = Direction de la rampe de lance par rapport au vent.
+simedtdlg.lbl.ttip.Direction2 = = Face au vent, +simedtdlg.lbl.ttip.Direction3 = = vent arrière. +simedtdlg.border.Simopt = Options de simulation +simedtdlg.lbl.Calcmethod = Méthode de calcul: +simedtdlg.lbl.ttip.Calcmethod = The Extended Barrowman method calculates aerodynamic forces according
to the Barrowman equations extended to accommodate more components. +simedtdlg.lbl.ExtBarrowman = Barrowman étendu +simedtdlg.lbl.Simmethod = Méthode de Simulation: +simedtdlg.lbl.ttip.Simmethod1 = Le simulateur de six degrés de liberté permet la liberté totale de fusée en vol.
+simedtdlg.lbl.ttip.Simmethod2 = Integration is performed using a 4th order Runge-Kutta 4 numerical integration. +simedtdlg.lbl.Timestep = Règlage du pas de temps: +simedtdlg.lbl.ttip.Timestep1 = Le temps entre les étapes de la simulation.
Avec un pas de temps plus petit la simulation est plus lente mais également plus précise.
+simedtdlg.lbl.ttip.Timestep2 = The 4th order simulation method is quite accurate with a time step of +simedtdlg.but.ttip.resettodefault = Réinitialiser le pas de temps à sa valeur par défaut ( +simedtdlg.border.Simlist = Simulator listeners +simedtdlg.txt.longA1 = Simulation listeners is an advanced feature that allows user-written code to listen to and interact with the simulation. +simedtdlg.txt.longA2 = For details on writing simulation listeners, see the OpenRocket technical documentation. +simedtdlg.lbl.Curlist = Current listeners: +simedtdlg.lbl.Addsimlist = Add simulation listener +simedtdlg.lbl.Noflightdata = Aucune donnée de vol disponible. +simedtdlg.lbl.runsimfirst = S'il vous plait faites tourner la simulation d'abord. +simedtdlg.chart.Simflight = Vol simulé +simedtdlg.dlg.Simres = Résultats de la simulation + + + + +! Simulation Panel +simpanel.but.newsimulation = Nouvelle simulation +simpanel.but.editsimulation = Modifier la simulation +simpanel.but.runsimulations = Lancer les simulations +simpanel.but.deletesimulations = Effacer les simulations +simpanel.but.plotexport = Tracer / exporter +simpanel.but.ttip.newsimulation = Ajouter une nouvelle simulation +simpanel.but.ttip.editsim = Modifier la simulation sélectionnée +simpanel.but.ttip.runsimu = Recommencer la simulation sélectionnée +simpanel.but.ttip.deletesim = Effacer les simulations sélectionnées +simpanel.checkbox.donotask = Ne plus me demander +simpanel.lbl.defpref = Vous pouvez changer le mode opératoire par défaut dans préferences. +simpanel.dlg.lbl.DeleteSim1 = Effacer les simulations sélectionnées? +simpanel.dlg.lbl.DeleteSim2 = Cette opération n'est pas réversible. +simpanel.dlg.lbl.DeleteSim3 = Effacer les simulations +simpanel.col.Name = Nom +simpanel.col.Motors = Moteurs +simpanel.col.Apogee = Apogée +simpanel.col.Maxvelocity = Vélocité Max. +simpanel.col.Maxacceleration = Accélération Max. +simpanel.col.Timetoapogee = Temps pour atteindre l'apogée +simpanel.col.Flighttime = Temps de vol + +! SimulationRunDialog +SimuRunDlg.title.RunSim = Simulations en cour... +SimuRunDlg.lbl.Running = En cour ... +SimuRunDlg.lbl.Simutime = Temps de simulation: +SimuRunDlg.lbl.Altitude = Altitude: +SimuRunDlg.lbl.Velocity = Vélocité: +SimuRunDlg.msg.Unabletosim = Impossible de simuler: +SimuRunDlg.msg.errorOccurred = Une erreur s'est produite durant la simulation: +SimuRunDlg.msg.AnException1 = Une exception s'est produite lors de la simulation: +SimuRunDlg.msg.AnException2 = S'il vous plaît faites un rapport d'erreurs avec les détails ci-dessous. +SimuRunDlg.msg.AssertionError1 = Une erreur de calcul s'est produite lors de la simulation. +SimuRunDlg.msg.AssertionError2 = S'il vous plaît faites un rapport d'erreurs avec les détails ci-dessous. +SimuRunDlg.msg.unknownerror1 = Une erreur inconue s'est produite lors de la simulation. +SimuRunDlg.msg.unknownerror2 = Le programme peut être instable, vous devez enregistrer toutes vos créations et redémarrez OpenRocket maintenant! + + +! SimulationExportPanel +SimExpPan.desc = Fichiers dont les données sont séparées par une virgule (*.csv) +SimExpPan.border.Vartoexport = Variables à exporter +SimExpPan.but.Selectall = Tout sélectionner +SimExpPan.but.Selectnone = Ne rien sélectionner +SimExpPan.border.Fieldsep = Séparateur de champ +SimExpPan.lbl.Fieldsepstr = Séparateur de champ: +SimExpPan.lbl.longA1 = La chaîne utilisée pour séparer les champs dans le fichier exporté.
+SimExpPan.lbl.longA2 = Utiliser ',' pour un fichier (CSV). +SimExpPan.checkbox.Includesimudesc = Inclure la description de la simulation +SimExpPan.checkbox.ttip.Includesimudesc = Inclure un commentaire au début du fichier pour décrire la simulation. +SimExpPan.border.Comments = Commentaires +SimExpPan.checkbox.Includefielddesc = Inclure les descriptions des champs +SimExpPan.checkbox.ttip.Includefielddesc = Inclure une ligne de commentaire avec la description des variables exportées. +SimExpPan.checkbox.Incflightevents = Inclure les évenements de vol +SimExpPan.checkbox.ttip.Incflightevents = Inclure une ligne de commentaire pour chaque évènement de vol. +SimExpPan.lbl.Commentchar = Symbole pour les commentaires: +SimExpPan.lbl.ttip.Commentchar = Le symbole utilisé pour une ligne de commentaires. +SimExpPan.but.Exporttofile = Exporter dans un fichier... + +! MotorPlot +MotorPlot.title.Motorplot = Courbe du moteur +MotorPlot.but.Select = Selection +MotorPlot.Chart.Motorthrustcurve = Courbe de poussée moteur +MotorPlot.Chart.Time = Temps / s +MotorPlot.Chart.Thrust = Poussée / N +MotorPlot.txt.Designation = Désignation: +MotorPlot.txt.Manufacturer = Manufacturer: +MotorPlot.txt.Type = Type: +MotorPlot.txt.Delays = Retards: +MotorPlot.txt.Comment = Commentaires:\n + + + +! Simulation plot panel +simplotpanel.lbl.Presetplotconf = Prédéfinir les paramètres du tracé: +simplotpanel.lbl.Xaxistype = Axe des X: +simplotpanel.lbl.Unit = Unités: +simplotpanel.lbl.Yaxistypes = Axe des Y: +simplotpanel.lbl.Flightevents = Evénements du vol: +simplotpanel.but.All = Tous +simplotpanel.but.None = Aucun +simplotpanel.but.NewYaxisplottype = Nouveau type de tracé de l'axe Y +simplotpanel.but.Plotflight = Tracer le vol +simplotpanel.lbl.Axis = Axes: +simplotpanel.but.ttip.Removethisplot = Effacer le tracé +simplotpanel.Desc = The data will be plotted in time order even if the X axis type is not time. +simplotpanel.OptionPane.lbl1 = Un maximum de 15 tracés est permis. +simplotpanel.OptionPane.lbl2 = Impossible d'ajouter le tracé + + + +! Component add buttons +compaddbuttons.Bodycompandfinsets = Pièces du corps et ailerons +compaddbuttons.Nosecone = Nez de\nfusée +compaddbuttons.Bodytube = Tube du\ncorps +compaddbuttons.Transition = Transition +compaddbuttons.Trapezoidal = Trapézoïdale +compaddbuttons.Elliptical = Elliptique +compaddbuttons.Freeform = Forme libre +compaddbuttons.Launchlug = Tube de\nguidage +compaddbuttons.Innercomponent = Pièces internes +compaddbuttons.Innertube = Tube interne +compaddbuttons.Coupler = Coupleur +compaddbuttons.Centeringring = Anneau\nde centrage +compaddbuttons.Bulkhead = Cloison +compaddbuttons.Engineblock = Bague de\nrétention\nmoteur +compaddbuttons.Massobjects = Pièces pleines +compaddbuttons.Parachute = Parachute +compaddbuttons.Streamer = Banderole +compaddbuttons.Shockcord = Cordon\namortisseur +compaddbuttons.Masscomponent = Poids +compaddbuttons.Donotaskmeagain = Ne plus me poser la question +compaddbuttons.Selectcomppos = Position de la pièce +compaddbuttons.lbl.Youcanchange = Vous pouvez modifier le fonctionnement par défaut dans les préférences. +compaddbuttons.lbl.insertcomp = Insérez la pièce après l'élément actuel ou en tant que dernier élément? +compaddbuttons.askPosition.Inserthere = Ajouter ici +compaddbuttons.askPosition.Addtotheend = Ajouter à la fin +compaddbuttons.askPosition.Cancel = Annuler + +! Component Analysis Dialog +componentanalysisdlg.Componentanalysis = Analyse pièce +componentanalysisdlg.lbl.winddir = Direction du vent: +componentanalysisdlg.TitledBorder.warnings = Avertissements: +componentanalysisdlg.ToggleBut.worst = Pire +componentanalysisdlg.lbl.angleofattack = Angle d'attaque: +componentanalysisdlg.lbl.machnumber = Mach number: +componentanalysisdlg.lbl.rollrate = Taux de roulis: +componentanalysisdlg.lbl.activestages = Etages actif: +componentanalysisdlg.lbl.motorconf = Configuration moteur: +componentanalysisdlg.TabStability.Col.Component = Pièce +componentanalysisdlg.TabStability = Stabilité +componentanalysisdlg.TabStability.ttip = Information de stabilité +componentanalysisdlg.dragTableModel.Col.Component = Pièce +componentanalysisdlg.dragTableModel.Col.Pressure = Pression CD +componentanalysisdlg.dragTableModel.Col.Base = Base CD +componentanalysisdlg.dragTableModel.Col.friction = Friction CD +componentanalysisdlg.dragTableModel.Col.total = Total CD +componentanalysisdlg.dragTabchar = Caractéristiques de traînée +componentanalysisdlg.dragTabchar.ttip = Caractéristiques de traînée +componentanalysisdlg.rollTableModel.Col.component = Pièce +componentanalysisdlg.rollTableModel.Col.rollforc = Roll forcing coefficient +componentanalysisdlg.rollTableModel.Col.rolldamp = Roll damping coefficient +componentanalysisdlg.rollTableModel.Col.total = Total Cl +componentanalysisdlg.rollTableModel = Roll dynamics +componentanalysisdlg.rollTableModel.ttip = Roll dynamics +componentanalysisdlg.println.closingmethod = Méthode de clôture appelée: +componentanalysisdlg.println.settingnam = SETTING NAN VALUES +componentanalysisdlg.lbl.reflenght = Longueur de référence: +componentanalysisdlg.lbl.refarea = Aire de référence: +!componentanalysisdlg.but.close =Fermer + +! Custom Material dialog +custmatdlg.title.Custommaterial = Matériau personalisé +custmatdlg.lbl.Materialname = Nom du matériau: +custmatdlg.lbl.Materialtype = Type de matériau : +custmatdlg.lbl.Materialdensity = Densité du matériau: +custmatdlg.checkbox.Addmaterial = Ajouter la pièce dans la base de données + + +! Ring Component Config +ringcompcfg.OuterRadius = Diamètre extérieur +ringcompcfg.Automatic = Automatique +ringcompcfg.InnerRadius = Diamètre intérieur +ringcompcfg.Thickness = Epaisseur +ringcompcfg.Length = Longueur +ringcompcfg.Positionrelativeto = Position relative à: +ringcompcfg.plus = plus +!ringcompcfg.PositionValue = PositionValue +ringcompcfg.Radialdistance = Rayon: +ringcompcfg.Distancefrom = Distance de l'axe central de la fusée +ringcompcfg.Radialdirection = Azimut +ringcompcfg.radialdirectionfrom = Sens par rapport à l'axe central de la fusée +ringcompcfg.but.Reset = Réinitialisation +ringcompcfg.but.Resetcomponant = Réinitialiser la pièce à l'axe de la fusée + +! Body Tube Config +BodyTubecfg.lbl.Bodytubelength = Longueur du tube: +BodyTubecfg.lbl.Outerdiameter = Diamètre externe: +BodyTubecfg.lbl.Innerdiameter = Diamètre interne: +BodyTubecfg.lbl.Wallthickness = Epaisseur des parois: +BodyTubecfg.tab.General = Général +BodyTubecfg.tab.Generalproperties = Propriétés générales +BodyTubecfg.tab.Motor = Moteur +BodyTubecfg.tab.Motormountconf = Configuration porte moteur +BodyTubecfg.checkbox.Automatic = Automatique +!BodyTubecfg.checkbox.Filled = Remplie + +! FinSetConfig +FinSetConfig.tab.Fintabs = Fin tabs +FinSetConfig.tab.Through-the-wall = Ailerons traversant le fuselage +FinSetConfig.but.Converttofreeform = Convertir en forme libre +FinSetConfig.but.Converttofreeform.ttip = Convertir ce jeux d'ailerons en forme libre +FinSetConfig.Convertfinset = Convertir le jeux d'ailerons +FinSetConfig.but.Splitfins = Séparer les ailerons +FinSetConfig.but.Splitfins.ttip = Diviser le jeux d'ailerons en aileron indépendant +FinSetConfig.lbl.Through-the-wall = Ailerons traversant le fuselage: +FinSetConfig.lbl.Tablength = Tab length: +FinSetConfig.ttip.Tablength = The length of the fin tab. +FinSetConfig.lbl.Tabheight = Tab height: +FinSetConfig.ttip.Tabheight = The spanwise height of the fin tab. +FinSetConfig.lbl.Tabposition = Tab position: +FinSetConfig.ttip.Tabposition = The position of the fin tab. +FinSetConfig.lbl.relativeto = relative à + +! MotorDatabaseLoadingDialog +MotorDbLoadDlg.title = Chargement des moteurs +MotorDbLoadDlg.Loadingmotors = Chargement des moteurs... + +! RocketConfig +RocketCfg.lbl.Designname = Nom du projet: +RocketCfg.lbl.Designer = Concepteur: +RocketCfg.lbl.Comments = Commentaires: +RocketCfg.lbl.Revisionhistory = Historique des modifications: +RocketCfg.lbl.Material = Matériaux: + +! ShockCordConfig +ShockCordCfg.lbl.Shockcordlength = Longueur du cordon amortisseur + +! RocketComponentConfig +RocketCompCfg.lbl.Componentname = Nom de la pièce: +RocketCompCfg.ttip.Thecomponentname = Le nom de la pièce. +RocketCompCfg.tab.Override = Forcer la valeur +RocketCompCfg.tab.MassandCGoverride = Forçage de la Masse et du CG +RocketCompCfg.tab.Figure = Forme +RocketCompCfg.tab.Figstyleopt = Options de la forme +RocketCompCfg.tab.Comment = Commentaires +RocketCompCfg.tab.Specifyacomment = Commentaires concernant la pièce +RocketCompCfg.lbl.Mass = Masse: +RocketCompCfg.lbl.Componentmass = Masse de la pièce: +RocketCompCfg.lbl.overriddento = (forcé à +RocketCompCfg.lbl.overriddenby = (forcé par +RocketCompCfg.lbl.Componentmaterial = Matériaux composant la pièce: +RocketCompCfg.lbl.Componentfinish = Finition de la pièce: +RocketCompCfg.lbl.ttip.componentmaterialaffects = Les matériaux utilisés pour la pièce affectent le poid de la pièce. +RocketCompCfg.combo.ttip.componentmaterialaffects = Les matériaux utilisés pour la pièce affectent le poid de la pièce. +RocketCompCfg.lbl.longA1 = La finition de la pièce affecte l'aérodynamisme de la pièce.
+RocketCompCfg.lbl.longA2 = La valeur indiquée est la hauteur moyenne de la rugosité de la surface. +RocketCompCfg.but.Setforall = Appliquer à tous +RocketCompCfg.but.ttip.Setforall = Régler la finition pour tous les composants de la fusée. +RocketCompCfg.lbl.Overridemassorcenter = Forcer la masse ou le centre de gravité du +RocketCompCfg.checkbox.Overridemass = Forcer la masse: +RocketCompCfg.checkbox.Overridecenterofgrav = Forcer le centre de gravité: +RocketCompCfg.checkbox.OverridemassandCG = Forcer la masse et le centre de gravité de tous les sous composants +RocketCompCfg.lbl.longB1 = Le forçage de la masse n'inclus pas le ou les moteurs.
+RocketCompCfg.lbl.longB2 = Le centre de gravité est mesuré à partir de l'extrémité avant de la fusée +RocketCompCfg.lbl.Commentsonthe = Commentaires à propos du +RocketCompCfg.lbl.Figurestyle = Modèle de forme: +RocketCompCfg.lbl.Componentcolor = Couleur de la pièce: +RocketCompCfg.lbl.Choosecolor = Choisir la couleur +RocketCompCfg.checkbox.Usedefaultcolor = Utiliser la couleur par défaut +RocketCompCfg.lbl.Complinestyle = Style de lignes pour les pièces: +RocketCompCfg.but.Saveasdefstyle = Sauver le modèle par défaut +RocketCompCfg.lbl.Diameter = Diamètre: +RocketCompCfg.lbl.Length = Longueur: +RocketCompCfg.lbl.Thickness = Epaisseur: +RocketCompCfg.checkbox.Endcapped = Arrière clos +RocketCompCfg.ttip.Endcapped = Whether the end of the shoulder is capped. +RocketCompCfg.title.Noseconeshoulder = accotement du cône +RocketCompCfg.title.Aftshoulder = accotement arrière +RocketCompCfg.border.Foreshoulder = Fore shoulder +!RocketCompCfg.lbl.Length = Length: + +! BulkheadConfig +BulkheadCfg.tab.Radius = Rayon: +BulkheadCfg.tab.Thickness = Epaisseur: +BulkheadCfg.tab.General = Général +BulkheadCfg.tab.Generalproperties = Propriétés générales + +!CenteringRingConfig +CenteringRingCfg.tab.Outerdiam = Diamètre externe: +CenteringRingCfg.tab.Innerdiam = Diamètre interne: +CenteringRingCfg.tab.Thickness = Epaisseur: +CenteringRingCfg.tab.General = Général +CenteringRingCfg.tab.Generalproperties = Propriétés Générales + +!ComponentConfigDialog +ComponentCfgDlg.configuration = configuration +ComponentCfgDlg.Modify = Modifier + +!EllipticalFinSetConfig +EllipticalFinSetCfg.Nbroffins = Nombre d'ailerons: +EllipticalFinSetCfg.Rotation = Rotation: +EllipticalFinSetCfg.Fincant = Inclinaison de l'aileron: +EllipticalFinSetCfg.Rootchord = Emplanture: +EllipticalFinSetCfg.Height = Hauteur: +EllipticalFinSetCfg.Positionrelativeto = Position relative à: +EllipticalFinSetCfg.plus = plus +EllipticalFinSetCfg.FincrossSection = Coupe de l'aileron: +EllipticalFinSetCfg.Thickness = Epaisseur: +EllipticalFinSetCfg.General = Général +EllipticalFinSetCfg.Generalproperties = Propriétés Générales +EllipticalFinSetCfg.ttip.Fincant = Angle d'inclinaison des ailerons par rapport au corps de la fusée + +!FreeformFinSetConfig +FreeformFinSetCfg.tab.General = Général +FreeformFinSetCfg.tab.ttip.General = Propriétés générales +FreeformFinSetCfg.tab.Shape = Forme +FreeformFinSetCfg.tab.ttip.Finshape = Forme de l'aileron +FreeformFinSetCfg.lbl.Numberoffins = Nombre d'ailerons: +FreeformFinSetCfg.lbl.Finrotation = Rotation des ailerons: +FreeformFinSetCfg.lbl.Fincant = Inclinaison de l'aileron: +FreeformFinSetCfg.lbl.ttip.Fincant = angle d'inclinaison des ailerons par rapport au corps de la fusée. +FreeformFinSetCfg.lbl.Posrelativeto = Position par rapport à: +FreeformFinSetCfg.lbl.plus = plus +FreeformFinSetCfg.lbl.FincrossSection = Coupe de l'aileron: +FreeformFinSetCfg.lbl.Thickness = Epaisseur: + +!InnerTubeConfig +InnerTubeCfg.tab.Motor = Moteur +InnerTubeCfg.tab.ttip.Motor = Configuration du porte moteur +InnerTubeCfg.tab.Cluster = Cluster +InnerTubeCfg.tab.ttip.Cluster = Configuration du cluster +InnerTubeCfg.tab.Radialpos = Position circulaire +InnerTubeCfg.tab.ttip.Radialpos = Position circulaire +InnerTubeCfg.lbl.Selectclustercfg = Choisir la configuration du cluster: +InnerTubeCfg.lbl.TubeSep = Séparation du tube: +InnerTubeCfg.lbl.ttip.TubeSep = La Séparation des tubes, 1.0 = chacun se touche +InnerTubeCfg.lbl.Rotation = Rotation: +InnerTubeCfg.lbl.ttip.Rotation = Angle de rotation du cluster +InnerTubeCfg.lbl.Rotangle = Angle de rotation de la configuration du cluster +InnerTubeCfg.but.Splitcluster = Séparer le cluster +InnerTubeCfg.lbl.longA1 = séparer le cluster en pièces distinctes.
+InnerTubeCfg.lbl.longA2 = Cela duplique également tous les composants rattacher à ce tube interne. +InnerTubeCfg.but.Resetsettings = Réinitialiser les réglages +InnerTubeCfg.but.ttip.Resetsettings = Réinitialiser la séparation et la rotation aux valeurs par défauts + +! LaunchLugConfig +LaunchLugCfg.lbl.Length = Longueur: +LaunchLugCfg.lbl.Outerdiam = Diamètre externe: +LaunchLugCfg.lbl.Innerdiam = Diamètre interne: +LaunchLugCfg.lbl.Thickness = Epaisseur: +LaunchLugCfg.lbl.Radialpos = Position circulaire: +LaunchLugCfg.lbl.Posrelativeto = Position relative à: +LaunchLugCfg.lbl.plus = plus +LaunchLugCfg.tab.General = Général +LaunchLugCfg.tab.Generalprop = Propriétés Générales + +! MassComponentConfig +MassComponentCfg.lbl.Mass = Masse +MassComponentCfg.lbl.Length = Longueur +MassComponentCfg.lbl.Diameter = Diamètre +MassComponentCfg.lbl.PosRelativeto = Position relative à: +MassComponentCfg.lbl.plus = plus +MassComponentCfg.tab.General = Général +MassComponentCfg.tab.ttip.General = Propriétés Générales +MassComponentCfg.tab.Radialpos = Position sur le périmètre +MassComponentCfg.tab.ttip.Radialpos = Configuration de la position sur le périmètre +MassComponentCfg.lbl.Radialdistance = Rayon: +MassComponentCfg.lbl.Radialdirection = Azimut: +MassComponentCfg.but.Reset = Réinitialiser + +! MotorConfig +MotorCfg.checkbox.compmotormount = Cette pièce est un porte moteur +MotorCfg.lbl.Motorcfg = Configuration du moteur: +MotorCfg.but.New = Nouveau +MotorCfg.lbl.Currentmotor = Moteur actuel: +MotorCfg.lbl.Motoroverhang = Surplomb du moteur: +MotorCfg.lbl.Ignitionat = Allumage à: +MotorCfg.lbl.plus = plus +MotorCfg.lbl.seconds = secondes +MotorCfg.lbl.longA1 = Le projet actuel n'a qu'un étage. +MotorCfg.lbl.longA2 = Des étages peuvent-être ajoutés en cliquant \"Nouvel étage\". +MotorCfg.lbl.longB1 = Le projet actuel a +MotorCfg.lbl.longB2 = étage(s). +MotorCfg.but.Selectmotor = Choisir le moteur +MotorCfg.but.Removemotor = Enlever le moteur +MotorCfg.lbl.motorLabel = Aucun + +! NoseConeConfig +NoseConeCfg.lbl.Noseconeshape = Forme du nez de la fusée: +NoseConeCfg.lbl.Shapeparam = Paramètre de la forme: +NoseConeCfg.lbl.Noseconelength = Longueur du nez de la fusée: +NoseConeCfg.lbl.Basediam = Diamètre de la base: +NoseConeCfg.checkbox.Automatic = Automatique +NoseConeCfg.lbl.Wallthickness = Epaisseur de la paroi: +!NoseConeCfg.checkbox.Filled = Remplie +NoseConeCfg.tab.General = Général +NoseConeCfg.tab.ttip.General = Propriétés générales +NoseConeCfg.tab.Shoulder = Accotement +NoseConeCfg.tab.ttip.Shoulder = Propriétés de l'accotement + +! ParachuteConfig +ParachuteCfg.lbl.Canopy = Canopée: +ParachuteCfg.lbl.Diameter = Diamètre: +ParachuteCfg.lbl.Material = Matériau: +ParachuteCfg.combo.MaterialModel = Le matériau de la pièce affecte son poids. +ParachuteCfg.lbl.longA1 = Coefficient de traînée CD: +ParachuteCfg.lbl.longB1 = Le coefficient de traînée dépend de la surface totale du parachute.
+ParachuteCfg.lbl.longB2 = Un plus grand coefficient de trainée produit une descente plus lente. +ParachuteCfg.lbl.longB3 = Une valeur standard pour le parachute est 0.8. +ParachuteCfg.but.Reset = Réinitialiser +ParachuteCfg.lbl.Shroudlines = Suspentes: +ParachuteCfg.lbl.Numberoflines = Nombre de suspentes: +ParachuteCfg.lbl.Linelength = Longueur des suspentes: +ParachuteCfg.lbl.Material = Matériau: +ParachuteCfg.lbl.Posrelativeto = Position relative à: +ParachuteCfg.lbl.plus = plus +ParachuteCfg.lbl.Packedlength = Longueur emballé: +ParachuteCfg.lbl.Packeddiam = Diamètre emballé: +ParachuteCfg.lbl.Deploysat = Déploiement à: +ParachuteCfg.lbl.seconds = secondes +ParachuteCfg.lbl.Altitude = Altitude: +ParachuteCfg.tab.General = Général +ParachuteCfg.tab.ttip.General = Propriétés générales +ParachuteCfg.tab.Radialpos = Position sur le périmètre +ParachuteCfg.tab.ttip.Radialpos = Configuration de la position radial +ParachuteCfg.lbl.Radialdistance = Rayon: +ParachuteCfg.lbl.Radialdirection = Azimut: +ParachuteCfg.but.Reset = Réinitialiser + +! ShockCordConfig +ShockCordCfg.lbl.Shockcordlength = Longueur du cordon amortisseur +ShockCordCfg.lbl.Shockcordmaterial = Matériau du cordon amortisseur: +ShockCordCfg.lbl.Posrelativeto = Position relative à: +ShockCordCfg.lbl.plus = plus +ShockCordCfg.lbl.Packedlength = Longueur emballé: +ShockCordCfg.lbl.Packeddiam = Diamètre emballé: +ShockCordCfg.tab.General = Général +ShockCordCfg.tab.ttip.General = Propriétés générales + +!SleeveConfig +SleeveCfg.tab.Outerdiam = Diamètre externe: +SleeveCfg.tab.Innerdiam = Diamètre interne: +SleeveCfg.tab.Wallthickness = Epaisseur des parois: +SleeveCfg.tab.Length = Longueur: +SleeveCfg.tab.General = Général +SleeveCfg.tab.Generalproperties = Propriétés générales + +! StreamerConfig +StreamerCfg.lbl.Striplength = Longueur de la bande: +StreamerCfg.lbl.Stripwidth = Largeur de la bande: +StreamerCfg.lbl.Striparea = Surface de la bande: +StreamerCfg.lbl.Aspectratio = Aspect ratio: +StreamerCfg.lbl.Material = Matériau: +StreamerCfg.combo.ttip.MaterialModel = La nature du matériau affect le poids de la pièce. +StreamerCfg.lbl.longA1 = Coefficient de traînée CD: +StreamerCfg.lbl.longB1 = Le coefficient de trainée dépend de la surface totale de la banderole.
+StreamerCfg.lbl.longB2 = Un plus grand coefficient de trainée produit une descente plus lente. +StreamerCfg.lbl.Automatic = Automatique +StreamerCfg.lbl.longC1 = le coefficient de trainée dépend de la surface totale de la banderole. +StreamerCfg.lbl.Posrelativeto = Position relative à: +StreamerCfg.lbl.plus = plus +StreamerCfg.lbl.Packedlength = Longueur emballé: +StreamerCfg.lbl.Packeddiam = Diamètre emballé: +StreamerCfg.lbl.Deploysat = Déploiement à: +StreamerCfg.lbl.seconds = secondes +StreamerCfg.lbl.Altitude = Altitude: +StreamerCfg.tab.General = Général +StreamerCfg.tab.ttip.General = Propriétés générales +StreamerCfg.tab.Radialpos = Position sur le périmètre +StreamerCfg.tab.ttip.Radialpos = Configuration de la position sur le périmètre +StreamerCfg.lbl.Radialdistance = Rayon: +StreamerCfg.lbl.Radialdirection = Azimut: +StreamerCfg.but.Reset = Réinitialiser + +! ThicknessRingComponentConfig +ThicknessRingCompCfg.tab.Outerdiam = Diamètre externe: +ThicknessRingCompCfg.tab.Innerdiam = Diamètre interne: +ThicknessRingCompCfg.tab.Wallthickness = Epaisseur de la paroi: +ThicknessRingCompCfg.tab.Length = Longueur: +ThicknessRingCompCfg.tab.General = Général +ThicknessRingCompCfg.tab.Generalprop = Propriétés générales + +! TransitionConfig +TransitionCfg.lbl.Transitionshape = Forme de la transition: +TransitionCfg.checkbox.Clipped = Clipped +TransitionCfg.lbl.Shapeparam = Paramètre de la forme: +TransitionCfg.lbl.Transitionlength = Longueur de la transition: +TransitionCfg.lbl.Forediam = Diamètre avant: +TransitionCfg.checkbox.Automatic = Automatique +TransitionCfg.lbl.Aftdiam = Diamètre arrière: +TransitionCfg.lbl.Wallthickness = Epaisseur de la paroi: +!TransitionCfg.checkbox.Filled = Remplie +TransitionCfg.tab.General = Général +TransitionCfg.tab.Generalproperties = Propriétés Générales +TransitionCfg.tab.Shoulder = Accotement +TransitionCfg.tab.Shoulderproperties = Propriétés de l'accotement + +! TrapezoidFinSetConfig +TrapezoidFinSetCfg.lbl.Nbroffins = Nombre d'ailerons: +TrapezoidFinSetCfg.lbl.ttip.Nbroffins = Le nombre d'ailerons composant le jeux. +TrapezoidFinSetCfg.lbl.Finrotation = Rotation de l'aileron: +TrapezoidFinSetCfg.lbl.ttip.Finrotation = Angle du premier aileron dans le jeux. +TrapezoidFinSetCfg.lbl.Fincant = Inclinaison de l'aileron: +TrapezoidFinSetCfg.lbl.ttip.Fincant = The angle that the fins are canted with respect to the rocket body. +TrapezoidFinSetCfg.lbl.Rootchord = Longueur de la base de l'aileron: +TrapezoidFinSetCfg.lbl.Tipchord = Longueur du bout de l'aileron: +TrapezoidFinSetCfg.lbl.Height = Hauteur: +TrapezoidFinSetCfg.lbl.Sweeplength = Longueur du bord d'attaque: +TrapezoidFinSetCfg.lbl.Sweepangle = Angle du bord d'attaque: +TrapezoidFinSetCfg.lbl.FincrossSection = Coupe de l'aileron: +TrapezoidFinSetCfg.lbl.Thickness = Epaisseur: +TrapezoidFinSetCfg.lbl.Posrelativeto = Position relative à: +TrapezoidFinSetCfg.lbl.plus = plus +TrapezoidFinSetCfg.tab.General = Général +TrapezoidFinSetCfg.tab.Generalproperties = Propriétés générales + +!MotorConfigurationModel +MotorCfgModel.Editcfg = Modifier les configurations + +! StorageOptionChooser +StorageOptChooser.lbl.Simdatatostore = Données simulées à stocker: +StorageOptChooser.rdbut.Allsimdata = Toutes les données des simulations +StorageOptChooser.lbl.longA1 = Enregistrer toutes les données des simulations.
+StorageOptChooser.lbl.longA2 = Cela peut entraîner de très gros fichiers! +StorageOptChooser.rdbut.Every = Every +StorageOptChooser.lbl.longB1 = Store plottable values approximately this far apart.
+StorageOptChooser.lbl.longB2 = Larger values result in smaller files. +StorageOptChooser.lbl.seconds = secondes +StorageOptChooser.rdbut.Onlyprimfig = Only primary figures +StorageOptChooser.lbl.longC1 = Stocker seulement les valeurs montrées dans le tableau récapitulatif.
+StorageOptChooser.lbl.longC2 = Cela produira des fichiers plus petit. +StorageOptChooser.checkbox.Compfile = Compresse le fichier +StorageOptChooser.lbl.UsingComp = Utiliser la compression réduit significativement la taille du fichier. +StorageOptChooser.lbl.longD1 = Une estimation sur la taille qu'aurai le fichier résultant avec les options actuelles. +StorageOptChooser.ttip.Saveopt = Options de sauvegarde +StorageOptChooser.lbl.Estfilesize = Taille estimé du fichier: +StorageOptChooser.lbl.Saveopt = Options de sauvegarde + +! ThrustCurveMotorSelectionPanel +TCMotorSelPan.lbl.Selrocketmotor = Choisir le moteur fusée: +TCMotorSelPan.checkbox.hideSimilar = Cacher les courbes de pousées similaires + +! PlotDialog +PlotDialog.title.Flightdataplot = Flight data plot +PlotDialog.Chart.Simulatedflight = Simulated flight +PlotDialog.CheckBox.Showdatapoints = Show data points +PlotDialog.lbl.Chart = Click+drag down+right to zoom in, up+left to zoom out + +! "main" prefix is used for the main application dialog + +main.menu.file = Fichier +main.menu.file.new = Nouveau +main.menu.file.open = Ouvrir... +main.menu.file.openExample = Ouvrir exemple... +main.menu.file.save = Sauvegarder +main.menu.file.saveAs = Sauvegarder sous... +main.menu.file.print = Imprimer... +main.menu.file.close = Fermer +main.menu.file.quit = Quitter + +main.menu.edit = Editer +main.menu.edit.undo = Annuler modification +main.menu.edit.redo = Refaire modification +main.menu.edit.cut = Couper +main.menu.edit.copy = Copier +main.menu.edit.paste = Coller +main.menu.edit.delete = Effacer +main.menu.edit.preferences = Préférences + +main.menu.analyze = Analyse +main.menu.analyze.componentAnalysis = Analyse des Pièces + +main.menu.help = Aide +main.menu.help.license = Licence +main.menu.help.bugReport = Rapport d'erreurs +main.menu.help.debugLog = Debug log +main.menu.help.about = A propos + +main.menu.debug = Debug +main.menu.debug.whatisthismenu = Quel est ce menu? +main.menu.debug.createtestrocket = Créer une fusée test + diff --git a/src/net/sf/openrocket/gui/StorageOptionChooser.java b/src/net/sf/openrocket/gui/StorageOptionChooser.java index dc9901b0..49b21974 100644 --- a/src/net/sf/openrocket/gui/StorageOptionChooser.java +++ b/src/net/sf/openrocket/gui/StorageOptionChooser.java @@ -22,8 +22,10 @@ import net.sf.openrocket.document.Simulation; import net.sf.openrocket.document.StorageOptions; import net.sf.openrocket.file.RocketSaver; import net.sf.openrocket.file.openrocket.OpenRocketSaver; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.simulation.FlightData; import net.sf.openrocket.simulation.FlightDataBranch; +import net.sf.openrocket.startup.Application; public class StorageOptionChooser extends JPanel { @@ -43,6 +45,7 @@ public class StorageOptionChooser extends JPanel { private boolean artificialEvent = false; + private static final Translator trans = Application.getTranslator(); public StorageOptionChooser(OpenRocketDocument doc, StorageOptions opts) { super(new MigLayout()); @@ -67,19 +70,25 @@ public class StorageOptionChooser extends JPanel { ButtonGroup buttonGroup = new ButtonGroup(); String tip; - this.add(new JLabel("Simulated data to store:"), "spanx, wrap unrel"); + //// Simulated data to store: + this.add(new JLabel(trans.get("StorageOptChooser.lbl.Simdatatostore")), "spanx, wrap unrel"); - allButton = new JRadioButton("All simulated data"); - allButton.setToolTipText("Store all simulated data.
" + - "This can result in very large files!"); + //// All simulated data + allButton = new JRadioButton(trans.get("StorageOptChooser.rdbut.Allsimdata")); + //// Store all simulated data.
+ //// This can result in very large files! + allButton.setToolTipText(trans.get("StorageOptChooser.lbl.longA1") + + trans.get("StorageOptChooser.lbl.longA2")); buttonGroup.add(allButton); allButton.addActionListener(actionUpdater); this.add(allButton, "spanx, wrap rel"); - - someButton = new JRadioButton("Every"); - tip = "Store plottable values approximately this far apart.
" + - "Larger values result in smaller files."; + //// Every + someButton = new JRadioButton(trans.get("StorageOptChooser.rdbut.Every")); + //// Store plottable values approximately this far apart.
" + //// Larger values result in smaller files. + tip = trans.get("StorageOptChooser.lbl.longB1") + + trans.get("StorageOptChooser.lbl.longB2"); someButton.setToolTipText(tip); buttonGroup.add(someButton); someButton.addActionListener(actionUpdater); @@ -98,36 +107,42 @@ public class StorageOptionChooser extends JPanel { this.add(timeSpinner, "wmin 55lp"); timeSpinner.addChangeListener(changeUpdater); - JLabel label = new JLabel("seconds"); + //// seconds + JLabel label = new JLabel(trans.get("StorageOptChooser.lbl.seconds")); label.setToolTipText(tip); this.add(label, "wrap rel"); - - noneButton = new JRadioButton("Only primary figures"); - noneButton.setToolTipText("Store only the values shown in the summary table.
" + - "This results in the smallest files."); + //// Only primary figures + noneButton = new JRadioButton(trans.get("StorageOptChooser.rdbut.Onlyprimfig")); + //// Store only the values shown in the summary table.
+ //// This results in the smallest files. + noneButton.setToolTipText(trans.get("StorageOptChooser.lbl.longC1") + + trans.get("StorageOptChooser.lbl.longC2")); buttonGroup.add(noneButton); noneButton.addActionListener(actionUpdater); this.add(noneButton, "spanx, wrap 20lp"); - - compressButton = new JCheckBox("Compress file"); - compressButton.setToolTipText("Using compression reduces the file size significantly."); + //// Compress file + compressButton = new JCheckBox(trans.get("StorageOptChooser.checkbox.Compfile")); + //// Using compression reduces the file size significantly. + compressButton.setToolTipText(trans.get("StorageOptChooser.lbl.UsingComp")); compressButton.addActionListener(actionUpdater); this.add(compressButton, "spanx, wrap para"); // Estimate is updated in loadOptions(opts) estimateLabel = new JLabel(""); - estimateLabel.setToolTipText("An estimate on how large the resulting file would " + - "be with the present options."); + //// An estimate on how large the resulting file would + //// be with the present options. + estimateLabel.setToolTipText(trans.get("StorageOptChooser.lbl.longD1")); this.add(estimateLabel, "spanx"); this.setBorder(BorderFactory.createCompoundBorder( BorderFactory.createEmptyBorder(0, 10, 0, 0), - BorderFactory.createTitledBorder("Save options"))); + //// Save options + BorderFactory.createTitledBorder(trans.get("StorageOptChooser.ttip.Saveopt")))); loadOptions(opts); } @@ -202,7 +217,8 @@ public class StorageOptionChooser extends JPanel { formatted = size + " kB"; } - estimateLabel.setText("Estimated file size: " + formatted); + //// Estimated file size: + estimateLabel.setText(trans.get("StorageOptChooser.lbl.Estfilesize") + " " + formatted); } @@ -256,7 +272,8 @@ public class StorageOptionChooser extends JPanel { StorageOptionChooser chooser = new StorageOptionChooser(document, options); - if (JOptionPane.showConfirmDialog(parent, chooser, "Save options", + //// Save options + if (JOptionPane.showConfirmDialog(parent, chooser, trans.get("StorageOptChooser.lbl.Saveopt"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE) != JOptionPane.OK_OPTION) { // User cancelled diff --git a/src/net/sf/openrocket/gui/adaptors/MaterialModel.java b/src/net/sf/openrocket/gui/adaptors/MaterialModel.java index 1defc447..a914df00 100644 --- a/src/net/sf/openrocket/gui/adaptors/MaterialModel.java +++ b/src/net/sf/openrocket/gui/adaptors/MaterialModel.java @@ -11,10 +11,12 @@ import net.sf.openrocket.database.Database; import net.sf.openrocket.database.DatabaseListener; import net.sf.openrocket.database.Databases; import net.sf.openrocket.gui.dialogs.CustomMaterialDialog; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.material.Material; import net.sf.openrocket.rocketcomponent.ComponentChangeEvent; import net.sf.openrocket.rocketcomponent.ComponentChangeListener; import net.sf.openrocket.rocketcomponent.RocketComponent; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.util.Reflection; public class MaterialModel extends AbstractListModel implements @@ -31,9 +33,12 @@ public class MaterialModel extends AbstractListModel implements private final Reflection.Method getMethod; private final Reflection.Method setMethod; + private static final Translator trans = Application.getTranslator(); public MaterialModel(Component parent, RocketComponent component, Material.Type type) { + //// Material + //this(parent, component, type, trans.get("MaterialModel.title.Material")); this(parent, component, type, "Material"); } @@ -94,7 +99,8 @@ public class MaterialModel extends AbstractListModel implements CustomMaterialDialog dialog = new CustomMaterialDialog( SwingUtilities.getWindowAncestor(parentComponent), (Material) getSelectedItem(), true, - "Define custom material"); + //// Define custom material + trans.get("MaterialModel.title.Defcustmat")); dialog.setVisible(true); diff --git a/src/net/sf/openrocket/gui/adaptors/MotorConfigurationModel.java b/src/net/sf/openrocket/gui/adaptors/MotorConfigurationModel.java index 5c013487..d2b2a9fc 100644 --- a/src/net/sf/openrocket/gui/adaptors/MotorConfigurationModel.java +++ b/src/net/sf/openrocket/gui/adaptors/MotorConfigurationModel.java @@ -14,13 +14,16 @@ import javax.swing.event.ListDataListener; import net.sf.openrocket.gui.dialogs.EditMotorConfigurationDialog; import net.sf.openrocket.gui.main.BasicFrame; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.rocketcomponent.ComponentChangeEvent; import net.sf.openrocket.rocketcomponent.Configuration; import net.sf.openrocket.rocketcomponent.Rocket; +import net.sf.openrocket.startup.Application; public class MotorConfigurationModel implements ComboBoxModel, ChangeListener { + private static final Translator trans = Application.getTranslator(); - private static final String EDIT = "Edit configurations"; + private static final String EDIT = trans.get("MotorCfgModel.Editcfg"); private EventListenerList listenerList = new EventListenerList(); diff --git a/src/net/sf/openrocket/gui/components/SimulationExportPanel.java b/src/net/sf/openrocket/gui/components/SimulationExportPanel.java index f3323114..ffdfa148 100644 --- a/src/net/sf/openrocket/gui/components/SimulationExportPanel.java +++ b/src/net/sf/openrocket/gui/components/SimulationExportPanel.java @@ -25,9 +25,11 @@ import javax.swing.table.TableColumnModel; import net.miginfocom.swing.MigLayout; import net.sf.openrocket.document.Simulation; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.simulation.FlightData; import net.sf.openrocket.simulation.FlightDataBranch; import net.sf.openrocket.simulation.FlightDataType; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.unit.Unit; import net.sf.openrocket.unit.UnitGroup; import net.sf.openrocket.util.GUIUtil; @@ -38,11 +40,13 @@ public class SimulationExportPanel extends JPanel { private static final String SPACE = "SPACE"; private static final String TAB = "TAB"; + private static final Translator trans = Application.getTranslator(); private static final FileFilter CSV_FILE_FILTER = new FileFilter() { @Override public String getDescription() { - return "Comma Separated Files (*.csv)"; + //// Comma Separated Files (*.csv) + return trans.get("SimExpPan.desc"); } @Override public boolean accept(File f) { @@ -147,12 +151,12 @@ public class SimulationExportPanel extends JPanel { // Add table panel = new JPanel(new MigLayout("fill")); - panel.setBorder(BorderFactory.createTitledBorder("Variables to export")); + panel.setBorder(BorderFactory.createTitledBorder(trans.get("SimExpPan.border.Vartoexport"))); panel.add(new JScrollPane(table), "wmin 300lp, width 300lp, height 1, grow 100, wrap"); // Select all/none buttons - button = new JButton("Select all"); + button = new JButton(trans.get("SimExpPan.but.Selectall")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -161,7 +165,7 @@ public class SimulationExportPanel extends JPanel { }); panel.add(button, "split 2, growx 1, sizegroup selectbutton"); - button = new JButton("Select none"); + button = new JButton(trans.get("SimExpPan.but.Selectnone")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -181,11 +185,13 @@ public class SimulationExportPanel extends JPanel { // Field separator panel panel = new JPanel(new MigLayout("fill")); - panel.setBorder(BorderFactory.createTitledBorder("Field separator")); + panel.setBorder(BorderFactory.createTitledBorder(trans.get("SimExpPan.border.Fieldsep"))); - label = new JLabel("Field separator string:"); - tip = "The string used to separate the fields in the exported file.
" + - "Use ',' for a Comma Separated Values (CSV) file."; + label = new JLabel(trans.get("SimExpPan.lbl.Fieldsepstr")); + //// The string used to separate the fields in the exported file.
+ //// Use ',' for a Comma Separated Values (CSV) file. + tip = trans.get("SimExpPan.lbl.longA1") + + trans.get("SimExpPan.lbl.longA2"); label.setToolTipText(tip); panel.add(label); @@ -203,31 +209,33 @@ public class SimulationExportPanel extends JPanel { // Comments separator panel panel = new JPanel(new MigLayout("fill")); - panel.setBorder(BorderFactory.createTitledBorder("Comments")); + //// Comments + panel.setBorder(BorderFactory.createTitledBorder(trans.get("SimExpPan.border.Comments"))); - simulationComments = new JCheckBox("Include simulation description"); - simulationComments.setToolTipText("Include a comment at the beginning of the file " + - "describing the simulation."); + //// Include simulation description + simulationComments = new JCheckBox(trans.get("SimExpPan.checkbox.Includesimudesc")); + //// Include a comment at the beginning of the file describing the simulation. + simulationComments.setToolTipText(trans.get("SimExpPan.checkbox.ttip.Includesimudesc")); simulationComments.setSelected(Prefs.getBoolean(Prefs.EXPORT_SIMULATION_COMMENT, true)); panel.add(simulationComments, "wrap"); - - fieldNameComments = new JCheckBox("Include field descriptions"); - fieldNameComments.setToolTipText("Include a comment line with the descriptions of " + - "the exported variables."); + //// Include field descriptions + fieldNameComments = new JCheckBox(trans.get("SimExpPan.checkbox.Includefielddesc")); + //// Include a comment line with the descriptions of the exported variables. + fieldNameComments.setToolTipText(trans.get("SimExpPan.checkbox.ttip.Includefielddesc")); fieldNameComments.setSelected(Prefs.getBoolean(Prefs.EXPORT_FIELD_NAME_COMMENT, true)); panel.add(fieldNameComments, "wrap"); - eventComments = new JCheckBox("Include flight events"); - eventComments.setToolTipText("Include a comment line for every flight event."); + eventComments = new JCheckBox(trans.get("SimExpPan.checkbox.Incflightevents")); + eventComments.setToolTipText(trans.get("SimExpPan.checkbox.ttip.Incflightevents")); eventComments.setSelected(Prefs.getBoolean(Prefs.EXPORT_EVENT_COMMENTS, true)); panel.add(eventComments, "wrap"); - label = new JLabel("Comment character:"); - tip = "The character(s) that mark a comment line."; + label = new JLabel(trans.get("SimExpPan.lbl.Commentchar")); + tip = trans.get("SimExpPan.lbl.ttip.Commentchar"); label.setToolTipText(tip); panel.add(label, "split 2"); @@ -246,7 +254,7 @@ public class SimulationExportPanel extends JPanel { // Export button - button = new JButton("Export to file..."); + button = new JButton(trans.get("SimExpPan.but.Exporttofile")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { diff --git a/src/net/sf/openrocket/gui/configdialog/BodyTubeConfig.java b/src/net/sf/openrocket/gui/configdialog/BodyTubeConfig.java index ebc490ac..f876d6fa 100644 --- a/src/net/sf/openrocket/gui/configdialog/BodyTubeConfig.java +++ b/src/net/sf/openrocket/gui/configdialog/BodyTubeConfig.java @@ -7,9 +7,11 @@ import net.sf.openrocket.gui.adaptors.BooleanModel; import net.sf.openrocket.gui.adaptors.DoubleModel; import net.sf.openrocket.gui.components.BasicSlider; import net.sf.openrocket.gui.components.UnitSelector; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.material.Material; import net.sf.openrocket.rocketcomponent.BodyTube; import net.sf.openrocket.rocketcomponent.RocketComponent; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.unit.UnitGroup; import javax.swing.JCheckBox; @@ -20,6 +22,7 @@ import javax.swing.JSpinner; public class BodyTubeConfig extends RocketComponentConfig { private MotorConfig motorConfigPane = null; + private static final Translator trans = Application.getTranslator(); public BodyTubeConfig(RocketComponent c) { super(c); @@ -27,7 +30,7 @@ public class BodyTubeConfig extends RocketComponentConfig { JPanel panel = new JPanel(new MigLayout("gap rel unrel","[][65lp::][30lp::][]","")); //// Body tube length - panel.add(new JLabel("Body tube length:")); + panel.add(new JLabel(trans.get("BodyTubecfg.lbl.Bodytubelength"))); DoubleModel m = new DoubleModel(component,"Length",UnitGroup.UNITS_LENGTH,0); @@ -40,7 +43,7 @@ public class BodyTubeConfig extends RocketComponentConfig { //// Body tube diameter - panel.add(new JLabel("Outer diameter:")); + panel.add(new JLabel(trans.get("BodyTubecfg.lbl.Outerdiameter"))); DoubleModel od = new DoubleModel(component,"OuterRadius",2,UnitGroup.UNITS_LENGTH,0); // Diameter = 2*Radius @@ -53,12 +56,13 @@ public class BodyTubeConfig extends RocketComponentConfig { panel.add(new BasicSlider(od.getSliderModel(0, 0.04, 0.2)),"w 100lp, wrap 0px"); JCheckBox check = new JCheckBox(od.getAutomaticAction()); - check.setText("Automatic"); + //// Automatic + check.setText(trans.get("BodyTubecfg.checkbox.Automatic")); panel.add(check,"skip, span 2, wrap"); //// Inner diameter - panel.add(new JLabel("Inner diameter:")); + panel.add(new JLabel(trans.get("BodyTubecfg.lbl.Innerdiameter"))); // Diameter = 2*Radius m = new DoubleModel(component,"InnerRadius",2,UnitGroup.UNITS_LENGTH,0); @@ -73,7 +77,7 @@ public class BodyTubeConfig extends RocketComponentConfig { //// Wall thickness - panel.add(new JLabel("Wall thickness:")); + panel.add(new JLabel(trans.get("BodyTubecfg.lbl.Wallthickness"))); m = new DoubleModel(component,"Thickness",UnitGroup.UNITS_LENGTH,0); @@ -84,9 +88,9 @@ public class BodyTubeConfig extends RocketComponentConfig { panel.add(new UnitSelector(m),"growx"); panel.add(new BasicSlider(m.getSliderModel(0,0.01)),"w 100lp, wrap 0px"); - + //// Filled check = new JCheckBox(new BooleanModel(component,"Filled")); - check.setText("Filled"); + check.setText(trans.get("BodyTubecfg.checkbox.Filled")); panel.add(check,"skip, span 2, wrap"); @@ -94,10 +98,13 @@ public class BodyTubeConfig extends RocketComponentConfig { panel.add(materialPanel(new JPanel(new MigLayout()), Material.Type.BULK), "cell 4 0, gapleft paragraph, aligny 0%, spany"); - - tabbedPane.insertTab("General", null, panel, "General properties", 0); + //// General and General properties + tabbedPane.insertTab(trans.get("BodyTubecfg.tab.General"), null, panel, + trans.get("BodyTubecfg.tab.Generalproperties"), 0); motorConfigPane = new MotorConfig((BodyTube)c); - tabbedPane.insertTab("Motor", null, motorConfigPane, "Motor mount configuration", 1); + //// Motor and Motor mount configuration + tabbedPane.insertTab(trans.get("BodyTubecfg.tab.Motor"), null, motorConfigPane, + trans.get("BodyTubecfg.tab.Motormountconf"), 1); tabbedPane.setSelectedIndex(0); } diff --git a/src/net/sf/openrocket/gui/configdialog/BulkheadConfig.java b/src/net/sf/openrocket/gui/configdialog/BulkheadConfig.java index c8130421..a8b9dec4 100644 --- a/src/net/sf/openrocket/gui/configdialog/BulkheadConfig.java +++ b/src/net/sf/openrocket/gui/configdialog/BulkheadConfig.java @@ -3,19 +3,26 @@ package net.sf.openrocket.gui.configdialog; import javax.swing.JPanel; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.rocketcomponent.RocketComponent; +import net.sf.openrocket.startup.Application; public class BulkheadConfig extends RingComponentConfig { + private static final Translator trans = Application.getTranslator(); public BulkheadConfig(RocketComponent c) { super(c); JPanel tab; - tab = generalTab("Radius:", null, null, "Thickness:"); - tabbedPane.insertTab("General", null, tab, "General properties", 0); + //// Radius: and "Thickness: + tab = generalTab(trans.get("BulkheadCfg.tab.Radius"), null, null, + trans.get("BulkheadCfg.tab.Thickness")); + //// General and General properties + tabbedPane.insertTab(trans.get("BulkheadCfg.tab.General"), null, tab, + trans.get("BulkheadCfg.tab.Generalproperties"), 0); tabbedPane.setSelectedIndex(0); } diff --git a/src/net/sf/openrocket/gui/configdialog/CenteringRingConfig.java b/src/net/sf/openrocket/gui/configdialog/CenteringRingConfig.java index 7abedfae..7d336b88 100644 --- a/src/net/sf/openrocket/gui/configdialog/CenteringRingConfig.java +++ b/src/net/sf/openrocket/gui/configdialog/CenteringRingConfig.java @@ -3,19 +3,27 @@ package net.sf.openrocket.gui.configdialog; import javax.swing.JPanel; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.rocketcomponent.RocketComponent; +import net.sf.openrocket.startup.Application; public class CenteringRingConfig extends RingComponentConfig { + private static final Translator trans = Application.getTranslator(); public CenteringRingConfig(RocketComponent c) { super(c); JPanel tab; - tab = generalTab("Outer diameter:", "Inner diameter:", null, "Thickness:"); - tabbedPane.insertTab("General", null, tab, "General properties", 0); + //// Outer diameter: and Inner diameter: and Thickness: + tab = generalTab(trans.get("CenteringRingCfg.tab.Outerdiam"), + trans.get("CenteringRingCfg.tab.Innerdiam"), null, + trans.get("CenteringRingCfg.tab.Thickness")); + //// General and General properties + tabbedPane.insertTab(trans.get("CenteringRingCfg.tab.General"), null, tab, + trans.get("CenteringRingCfg.tab.Generalproperties"), 0); tabbedPane.setSelectedIndex(0); } diff --git a/src/net/sf/openrocket/gui/configdialog/ComponentConfigDialog.java b/src/net/sf/openrocket/gui/configdialog/ComponentConfigDialog.java index 4b4db2d8..7e526ee5 100644 --- a/src/net/sf/openrocket/gui/configdialog/ComponentConfigDialog.java +++ b/src/net/sf/openrocket/gui/configdialog/ComponentConfigDialog.java @@ -11,9 +11,11 @@ import java.lang.reflect.InvocationTargetException; import javax.swing.JDialog; import net.sf.openrocket.document.OpenRocketDocument; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.rocketcomponent.ComponentChangeEvent; import net.sf.openrocket.rocketcomponent.ComponentChangeListener; import net.sf.openrocket.rocketcomponent.RocketComponent; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.util.BugException; import net.sf.openrocket.util.GUIUtil; import net.sf.openrocket.util.Prefs; @@ -41,7 +43,8 @@ public class ComponentConfigDialog extends JDialog implements ComponentChangeLis private RocketComponentConfig configurator = null; private final Window parent; - + private static final Translator trans = Application.getTranslator(); + private ComponentConfigDialog(Window parent, OpenRocketDocument document, RocketComponent component) { super(parent); @@ -93,7 +96,8 @@ public class ComponentConfigDialog extends JDialog implements ComponentChangeLis this.setContentPane(configurator); configurator.updateFields(); - setTitle(component.getComponentName() + " configuration"); + //// configuration + setTitle(component.getComponentName() + " " + trans.get("ComponentCfgDlg.configuration")); // Dimension pref = getPreferredSize(); // Dimension real = getSize(); @@ -207,7 +211,8 @@ public class ComponentConfigDialog extends JDialog implements ComponentChangeLis dialog = new ComponentConfigDialog(parent, document, component); dialog.setVisible(true); - document.addUndoPosition("Modify " + component.getComponentName()); + ////Modify + document.addUndoPosition(trans.get("ComponentCfgDlg.Modify") + " " + component.getComponentName()); } diff --git a/src/net/sf/openrocket/gui/configdialog/EllipticalFinSetConfig.java b/src/net/sf/openrocket/gui/configdialog/EllipticalFinSetConfig.java index e0939146..cfb70b35 100644 --- a/src/net/sf/openrocket/gui/configdialog/EllipticalFinSetConfig.java +++ b/src/net/sf/openrocket/gui/configdialog/EllipticalFinSetConfig.java @@ -15,12 +15,15 @@ import net.sf.openrocket.gui.adaptors.EnumModel; import net.sf.openrocket.gui.adaptors.IntegerModel; import net.sf.openrocket.gui.components.BasicSlider; import net.sf.openrocket.gui.components.UnitSelector; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.material.Material; import net.sf.openrocket.rocketcomponent.FinSet; import net.sf.openrocket.rocketcomponent.RocketComponent; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.unit.UnitGroup; public class EllipticalFinSetConfig extends FinSetConfig { + private static final Translator trans = Application.getTranslator(); public EllipticalFinSetConfig(final RocketComponent component) { super(component); @@ -36,7 +39,7 @@ public class EllipticalFinSetConfig extends FinSetConfig { JPanel panel = new JPanel(new MigLayout("gap rel unrel","[][65lp::][30lp::]","")); //// Number of fins - panel.add(new JLabel("Number of fins:")); + panel.add(new JLabel(trans.get("EllipticalFinSetCfg.Nbroffins"))); IntegerModel im = new IntegerModel(component,"FinCount",1,8); @@ -46,7 +49,7 @@ public class EllipticalFinSetConfig extends FinSetConfig { //// Base rotation - panel.add(new JLabel("Rotation:")); + panel.add(new JLabel(trans.get("EllipticalFinSetCfg.Rotation"))); m = new DoubleModel(component, "BaseRotation", UnitGroup.UNITS_ANGLE,-Math.PI,Math.PI); @@ -59,9 +62,9 @@ public class EllipticalFinSetConfig extends FinSetConfig { //// Fin cant - JLabel label = new JLabel("Fin cant:"); - label.setToolTipText("The angle that the fins are canted with respect to the rocket " + - "body."); + JLabel label = new JLabel(trans.get("EllipticalFinSetCfg.Fincant")); + //// "The angle that the fins are canted with respect to the rocket + label.setToolTipText(trans.get("EllipticalFinSetCfg.ttip.Fincant")); panel.add(label); m = new DoubleModel(component, "CantAngle", UnitGroup.UNITS_ANGLE, @@ -78,7 +81,7 @@ public class EllipticalFinSetConfig extends FinSetConfig { //// Root chord - panel.add(new JLabel("Root chord:")); + panel.add(new JLabel(trans.get("EllipticalFinSetCfg.Rootchord"))); m = new DoubleModel(component,"Length",UnitGroup.UNITS_LENGTH,0); @@ -91,7 +94,7 @@ public class EllipticalFinSetConfig extends FinSetConfig { //// Height - panel.add(new JLabel("Height:")); + panel.add(new JLabel(trans.get("EllipticalFinSetCfg.Height"))); m = new DoubleModel(component,"Height",UnitGroup.UNITS_LENGTH,0); @@ -104,8 +107,8 @@ public class EllipticalFinSetConfig extends FinSetConfig { //// Position - - panel.add(new JLabel("Position relative to:")); + //// Position relative to: + panel.add(new JLabel(trans.get("EllipticalFinSetCfg.Positionrelativeto"))); combo = new JComboBox( new EnumModel(component, "RelativePosition", @@ -117,7 +120,8 @@ public class EllipticalFinSetConfig extends FinSetConfig { })); panel.add(combo,"spanx, growx, wrap"); - panel.add(new JLabel("plus"),"right"); + //// plus + panel.add(new JLabel(trans.get("EllipticalFinSetCfg.plus")),"right"); m = new DoubleModel(component,"PositionValue",UnitGroup.UNITS_LENGTH); spin = new JSpinner(m.getSpinnerModel()); @@ -143,14 +147,15 @@ public class EllipticalFinSetConfig extends FinSetConfig { //// Cross section - panel.add(new JLabel("Fin cross section:"),"span, split"); + //// Fin cross section: + panel.add(new JLabel(trans.get("EllipticalFinSetCfg.FincrossSection")),"span, split"); combo = new JComboBox( new EnumModel(component,"CrossSection")); panel.add(combo,"growx, wrap unrel"); - //// Thickness - panel.add(new JLabel("Thickness:")); + //// Thickness: + panel.add(new JLabel(trans.get("EllipticalFinSetCfg.Thickness"))); m = new DoubleModel(component,"Thickness",UnitGroup.UNITS_LENGTH,0); @@ -174,8 +179,9 @@ public class EllipticalFinSetConfig extends FinSetConfig { addFinSetButtons(); - - tabbedPane.insertTab("General", null, mainPanel, "General properties", 0); + //// General and General properties + tabbedPane.insertTab(trans.get("EllipticalFinSetCfg.General"), null, mainPanel, + trans.get("EllipticalFinSetCfg.Generalproperties"), 0); tabbedPane.setSelectedIndex(0); } diff --git a/src/net/sf/openrocket/gui/configdialog/FinSetConfig.java b/src/net/sf/openrocket/gui/configdialog/FinSetConfig.java index c4e85985..da124327 100644 --- a/src/net/sf/openrocket/gui/configdialog/FinSetConfig.java +++ b/src/net/sf/openrocket/gui/configdialog/FinSetConfig.java @@ -18,6 +18,7 @@ import net.sf.openrocket.gui.components.BasicSlider; import net.sf.openrocket.gui.components.StyledLabel; import net.sf.openrocket.gui.components.StyledLabel.Style; import net.sf.openrocket.gui.components.UnitSelector; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.logging.LogHelper; import net.sf.openrocket.rocketcomponent.FinSet; import net.sf.openrocket.rocketcomponent.FreeformFinSet; @@ -28,13 +29,16 @@ import net.sf.openrocket.unit.UnitGroup; public abstract class FinSetConfig extends RocketComponentConfig { private static final LogHelper log = Application.getLogger(); - + private static final Translator trans = Application.getTranslator(); + private JButton split = null; public FinSetConfig(RocketComponent component) { super(component); - tabbedPane.insertTab("Fin tabs", null, finTabPanel(), "Through-the-wall fin tabs", 0); + //// Fin tabs and Through-the-wall fin tabs + tabbedPane.insertTab(trans.get("FinSetConfig.tab.Fintabs"), null, finTabPanel(), + trans.get("FinSetConfig.tab.Through-the-wall"), 0); } @@ -44,8 +48,10 @@ public abstract class FinSetConfig extends RocketComponentConfig { //// Convert buttons if (!(component instanceof FreeformFinSet)) { - convert = new JButton("Convert to freeform"); - convert.setToolTipText("Convert this fin set into a freeform fin set"); + //// Convert to freeform + convert = new JButton(trans.get("FinSetConfig.but.Converttofreeform")); + //// Convert this fin set into a freeform fin set + convert.setToolTipText(trans.get("FinSetConfig.but.Converttofreeform.ttip")); convert.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -55,7 +61,8 @@ public abstract class FinSetConfig extends RocketComponentConfig { SwingUtilities.invokeLater(new Runnable() { @Override public void run() { - ComponentConfigDialog.addUndoPosition("Convert fin set"); + //// Convert fin set + ComponentConfigDialog.addUndoPosition(trans.get("FinSetConfig.Convertfinset")); RocketComponent freeform = FreeformFinSet.convertFinSet((FinSet) component); ComponentConfigDialog.showDialog(freeform); @@ -67,8 +74,10 @@ public abstract class FinSetConfig extends RocketComponentConfig { }); } - split = new JButton("Split fins"); - split.setToolTipText("Split the fin set into separate fins"); + //// Split fins + split = new JButton(trans.get("FinSetConfig.but.Splitfins")); + //// Split the fin set into separate fins + split.setToolTipText(trans.get("FinSetConfig.but.Splitfins.ttip")); split.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -117,7 +126,8 @@ public abstract class FinSetConfig extends RocketComponentConfig { // JPanel panel = new JPanel(new MigLayout("fillx, align 20% 20%, gap rel unrel", // "[40lp][80lp::][30lp::][100lp::]","")); - panel.add(new StyledLabel("Through-the-wall fin tabs:", Style.BOLD), + //// Through-the-wall fin tabs: + panel.add(new StyledLabel(trans.get("FinSetConfig.lbl.Through-the-wall"), Style.BOLD), "spanx, wrap 30lp"); JLabel label; @@ -136,8 +146,10 @@ public abstract class FinSetConfig extends RocketComponentConfig { register(length_2); //// Tab length - label = new JLabel("Tab length:"); - label.setToolTipText("The length of the fin tab."); + //// Tab length: + label = new JLabel(trans.get("FinSetConfig.lbl.Tablength")); + //// The length of the fin tab. + label.setToolTipText(trans.get("FinSetConfig.ttip.Tablength")); panel.add(label, "gapleft para, gapright 40lp, growx 1"); m = new DoubleModel(component, "TabLength", UnitGroup.UNITS_LENGTH, 0); @@ -152,8 +164,10 @@ public abstract class FinSetConfig extends RocketComponentConfig { //// Tab length - label = new JLabel("Tab height:"); - label.setToolTipText("The spanwise height of the fin tab."); + //// Tab height: + label = new JLabel(trans.get("FinSetConfig.lbl.Tabheight")); + //// The spanwise height of the fin tab. + label.setToolTipText(trans.get("FinSetConfig.ttip.Tabheight")); panel.add(label, "gapleft para"); m = new DoubleModel(component, "TabHeight", UnitGroup.UNITS_LENGTH, 0); @@ -167,9 +181,10 @@ public abstract class FinSetConfig extends RocketComponentConfig { "w 100lp, growx 5, wrap para"); - //// Tab position - label = new JLabel("Tab position:"); - label.setToolTipText("The position of the fin tab."); + //// Tab position: + label = new JLabel(trans.get("FinSetConfig.lbl.Tabposition")); + //// The position of the fin tab. + label.setToolTipText(trans.get("FinSetConfig.ttip.Tabposition")); panel.add(label, "gapleft para"); m = new DoubleModel(component, "TabShift", UnitGroup.UNITS_LENGTH); @@ -182,8 +197,8 @@ public abstract class FinSetConfig extends RocketComponentConfig { panel.add(new BasicSlider(m.getSliderModel(length_2, length2)), "w 100lp, growx 5, wrap"); - - label = new JLabel("relative to"); + //// relative to + label = new JLabel(trans.get("FinSetConfig.lbl.relativeto")); panel.add(label, "right, gapright unrel"); EnumModel em = diff --git a/src/net/sf/openrocket/gui/configdialog/FreeformFinSetConfig.java b/src/net/sf/openrocket/gui/configdialog/FreeformFinSetConfig.java index 369b09b6..87be5fb4 100644 --- a/src/net/sf/openrocket/gui/configdialog/FreeformFinSetConfig.java +++ b/src/net/sf/openrocket/gui/configdialog/FreeformFinSetConfig.java @@ -27,11 +27,13 @@ import net.sf.openrocket.gui.components.UnitSelector; import net.sf.openrocket.gui.scalefigure.FinPointFigure; import net.sf.openrocket.gui.scalefigure.ScaleScrollPane; import net.sf.openrocket.gui.scalefigure.ScaleSelector; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.material.Material; import net.sf.openrocket.rocketcomponent.FinSet; import net.sf.openrocket.rocketcomponent.FreeformFinSet; import net.sf.openrocket.rocketcomponent.IllegalFinPointException; import net.sf.openrocket.rocketcomponent.RocketComponent; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.unit.UnitGroup; import net.sf.openrocket.util.Coordinate; @@ -42,15 +44,19 @@ public class FreeformFinSetConfig extends FinSetConfig { private FinPointTableModel tableModel = null; private FinPointFigure figure = null; - + private static final Translator trans = Application.getTranslator(); + public FreeformFinSetConfig(RocketComponent component) { super(component); this.finset = (FreeformFinSet)component; - - tabbedPane.insertTab("General", null, generalPane(), "General properties", 0); - tabbedPane.insertTab("Shape", null, shapePane(), "Fin shape", 1); + //// General and General properties + tabbedPane.insertTab(trans.get("FreeformFinSetCfg.tab.General"), null, generalPane(), + trans.get("FreeformFinSetCfg.tab.ttip.General"), 0); + //// Shape and Fin shape + tabbedPane.insertTab(trans.get("FreeformFinSetCfg.tab.Shape"), null, shapePane(), + trans.get("FreeformFinSetCfg.tab.ttip.Finshape"), 1); tabbedPane.setSelectedIndex(0); addFinSetButtons(); @@ -70,8 +76,8 @@ public class FreeformFinSetConfig extends FinSetConfig { - //// Number of fins - panel.add(new JLabel("Number of fins:")); + //// Number of fins: + panel.add(new JLabel(trans.get("FreeformFinSetCfg.lbl.Numberoffins"))); IntegerModel im = new IntegerModel(component,"FinCount",1,8); @@ -81,7 +87,7 @@ public class FreeformFinSetConfig extends FinSetConfig { //// Base rotation - panel.add(new JLabel("Fin rotation:")); + panel.add(new JLabel(trans.get("FreeformFinSetCfg.lbl.Finrotation"))); m = new DoubleModel(component, "BaseRotation", UnitGroup.UNITS_ANGLE,-Math.PI,Math.PI); @@ -95,9 +101,9 @@ public class FreeformFinSetConfig extends FinSetConfig { //// Fin cant - JLabel label = new JLabel("Fin cant:"); - label.setToolTipText("The angle that the fins are canted with respect to the rocket " + - "body."); + JLabel label = new JLabel(trans.get("FreeformFinSetCfg.lbl.Fincant")); + //// The angle that the fins are canted with respect to the rocket body. + label.setToolTipText(trans.get("FreeformFinSetCfg.lbl.ttip.Fincant")); panel.add(label); m = new DoubleModel(component, "CantAngle", UnitGroup.UNITS_ANGLE, @@ -114,7 +120,8 @@ public class FreeformFinSetConfig extends FinSetConfig { //// Position - panel.add(new JLabel("Position relative to:")); + //// Position relative to: + panel.add(new JLabel("FreeformFinSetCfg.lbl.Posrelativeto")); combo = new JComboBox( new EnumModel(component, "RelativePosition", @@ -125,8 +132,8 @@ public class FreeformFinSetConfig extends FinSetConfig { RocketComponent.Position.ABSOLUTE })); panel.add(combo,"spanx 3, growx, wrap"); - - panel.add(new JLabel("plus"),"right"); + //// plus + panel.add(new JLabel("FreeformFinSetCfg.lbl.plus"),"right"); m = new DoubleModel(component,"PositionValue",UnitGroup.UNITS_LENGTH); spin = new JSpinner(m.getSpinnerModel()); @@ -153,14 +160,15 @@ public class FreeformFinSetConfig extends FinSetConfig { //// Cross section - panel.add(new JLabel("Fin cross section:"),"span, split"); + //// Fin cross section: + panel.add(new JLabel(trans.get("FreeformFinSetCfg.lbl.FincrossSection")),"span, split"); combo = new JComboBox( new EnumModel(component,"CrossSection")); panel.add(combo,"growx, wrap unrel"); - //// Thickness - panel.add(new JLabel("Thickness:")); + //// Thickness: + panel.add(new JLabel(trans.get("FreeformFinSetCfg.lbl.Thickness"))); m = new DoubleModel(component,"Thickness",UnitGroup.UNITS_LENGTH,0); diff --git a/src/net/sf/openrocket/gui/configdialog/InnerTubeConfig.java b/src/net/sf/openrocket/gui/configdialog/InnerTubeConfig.java index 751aa86b..35347fd3 100644 --- a/src/net/sf/openrocket/gui/configdialog/InnerTubeConfig.java +++ b/src/net/sf/openrocket/gui/configdialog/InnerTubeConfig.java @@ -32,17 +32,20 @@ import net.sf.openrocket.gui.SpinnerEditor; import net.sf.openrocket.gui.adaptors.DoubleModel; import net.sf.openrocket.gui.components.BasicSlider; import net.sf.openrocket.gui.components.UnitSelector; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.rocketcomponent.ClusterConfiguration; import net.sf.openrocket.rocketcomponent.Clusterable; import net.sf.openrocket.rocketcomponent.InnerTube; import net.sf.openrocket.rocketcomponent.MotorMount; import net.sf.openrocket.rocketcomponent.RocketComponent; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.unit.UnitGroup; import net.sf.openrocket.util.BugException; import net.sf.openrocket.util.Coordinate; public class InnerTubeConfig extends ThicknessRingComponentConfig { + private static final Translator trans = Application.getTranslator(); public InnerTubeConfig(RocketComponent c) { @@ -51,13 +54,19 @@ public class InnerTubeConfig extends ThicknessRingComponentConfig { JPanel tab; tab = new MotorConfig((MotorMount) c); - tabbedPane.insertTab("Motor", null, tab, "Motor mount configuration", 1); + //// Motor and Motor mount configuration + tabbedPane.insertTab(trans.get("InnerTubeCfg.tab.Motor"), null, tab, + trans.get("InnerTubeCfg.tab.ttip.Motor"), 1); tab = clusterTab(); - tabbedPane.insertTab("Cluster", null, tab, "Cluster configuration", 2); + //// Cluster and Cluster configuration + tabbedPane.insertTab(trans.get("InnerTubeCfg.tab.Cluster"), null, tab, + trans.get("InnerTubeCfg.tab.ttip.Cluster"), 2); tab = positionTab(); - tabbedPane.insertTab("Radial position", null, tab, "Radial position", 3); + //// Radial position + tabbedPane.insertTab(trans.get("InnerTubeCfg.tab.Radialpos"), null, tab, + trans.get("InnerTubeCfg.tab.ttip.Radialpos"), 3); tabbedPane.setSelectedIndex(0); } @@ -69,7 +78,8 @@ public class InnerTubeConfig extends ThicknessRingComponentConfig { JPanel subPanel = new JPanel(new MigLayout()); // Cluster type selection - subPanel.add(new JLabel("Select cluster configuration:"), "spanx, wrap"); + //// Select cluster configuration: + subPanel.add(new JLabel(trans.get("InnerTubeCfg.lbl.Selectclustercfg")), "spanx, wrap"); subPanel.add(new ClusterSelectionPanel((InnerTube) component), "spanx, wrap"); // JPanel clusterSelection = new ClusterSelectionPanel((InnerTube)component); // clusterSelection.setBackground(Color.blue); @@ -81,43 +91,53 @@ public class InnerTubeConfig extends ThicknessRingComponentConfig { subPanel = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::]")); // Tube separation scale - JLabel l = new JLabel("Tube separation:"); - l.setToolTipText("The separation of the tubes, 1.0 = touching each other"); + //// Tube separation: + JLabel l = new JLabel(trans.get("InnerTubeCfg.lbl.TubeSep")); + //// The separation of the tubes, 1.0 = touching each other + l.setToolTipText(trans.get("InnerTubeCfg.lbl.ttip.TubeSep")); subPanel.add(l); DoubleModel dm = new DoubleModel(component, "ClusterScale", 1, UnitGroup.UNITS_NONE, 0); JSpinner spin = new JSpinner(dm.getSpinnerModel()); spin.setEditor(new SpinnerEditor(spin)); - spin.setToolTipText("The separation of the tubes, 1.0 = touching each other"); + //// The separation of the tubes, 1.0 = touching each other + spin.setToolTipText(trans.get("InnerTubeCfg.lbl.ttip.TubeSep")); subPanel.add(spin, "growx"); BasicSlider bs = new BasicSlider(dm.getSliderModel(0, 1, 4)); - bs.setToolTipText("The separation of the tubes, 1.0 = touching each other"); + //// The separation of the tubes, 1.0 = touching each other + bs.setToolTipText(trans.get("InnerTubeCfg.lbl.ttip.TubeSep")); subPanel.add(bs, "skip,w 100lp, wrap"); - // Rotation - l = new JLabel("Rotation:"); - l.setToolTipText("Rotation angle of the cluster configuration"); + // Rotation: + l = new JLabel(trans.get("InnerTubeCfg.lbl.Rotation")); + //// Rotation angle of the cluster configuration + l.setToolTipText(trans.get("InnerTubeCfg.lbl.ttip.Rotation")); subPanel.add(l); dm = new DoubleModel(component, "ClusterRotation", 1, UnitGroup.UNITS_ANGLE, -Math.PI, Math.PI); spin = new JSpinner(dm.getSpinnerModel()); spin.setEditor(new SpinnerEditor(spin)); - spin.setToolTipText("Rotation angle of the cluster configuration"); + //// Rotation angle of the cluster configuration + spin.setToolTipText(trans.get("InnerTubeCfg.lbl.ttip.Rotation")); subPanel.add(spin, "growx"); subPanel.add(new UnitSelector(dm), "growx"); bs = new BasicSlider(dm.getSliderModel(-Math.PI, 0, Math.PI)); - bs.setToolTipText("Rotation angle of the cluster configuration"); + //// Rotation angle of the cluster configuration + bs.setToolTipText(trans.get("InnerTubeCfg.lbl.ttip.Rotation")); subPanel.add(bs, "w 100lp, wrap para"); // Split button - JButton split = new JButton("Split cluster"); - split.setToolTipText("Split the cluster into separate components.
" + - "This also duplicates all components attached to this inner tube."); + //// Split cluster + JButton split = new JButton(trans.get("InnerTubeCfg.but.Splitcluster")); + //// Split the cluster into separate components.
+ //// This also duplicates all components attached to this inner tube. + split.setToolTipText(trans.get("InnerTubeCfg.lbl.longA1") + + trans.get("InnerTubeCfg.lbl.longA2")); split.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -159,8 +179,10 @@ public class InnerTubeConfig extends ThicknessRingComponentConfig { // Reset button - JButton reset = new JButton("Reset settings"); - reset.setToolTipText("Reset the separation and rotation to the default values"); + ///// Reset settings + JButton reset = new JButton(trans.get("InnerTubeCfg.but.Resetsettings")); + //// Reset the separation and rotation to the default values + reset.setToolTipText(trans.get("InnerTubeCfg.but.ttip.Resetsettings")); reset.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { diff --git a/src/net/sf/openrocket/gui/configdialog/LaunchLugConfig.java b/src/net/sf/openrocket/gui/configdialog/LaunchLugConfig.java index 893917a6..56f1231f 100644 --- a/src/net/sf/openrocket/gui/configdialog/LaunchLugConfig.java +++ b/src/net/sf/openrocket/gui/configdialog/LaunchLugConfig.java @@ -7,8 +7,10 @@ import net.sf.openrocket.gui.adaptors.DoubleModel; import net.sf.openrocket.gui.adaptors.EnumModel; import net.sf.openrocket.gui.components.BasicSlider; import net.sf.openrocket.gui.components.UnitSelector; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.material.Material; import net.sf.openrocket.rocketcomponent.RocketComponent; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.unit.UnitGroup; import javax.swing.JComboBox; @@ -19,6 +21,7 @@ import javax.swing.JSpinner; public class LaunchLugConfig extends RocketComponentConfig { private MotorConfig motorConfigPane = null; + private static final Translator trans = Application.getTranslator(); public LaunchLugConfig(RocketComponent c) { super(c); @@ -29,7 +32,8 @@ public class LaunchLugConfig extends RocketComponentConfig { JPanel panel = new JPanel(new MigLayout("gap rel unrel","[][65lp::][30lp::][]","")); //// Body tube length - panel.add(new JLabel("Length:")); + //// Length: + panel.add(new JLabel(trans.get("LaunchLugCfg.lbl.Length"))); DoubleModel m = new DoubleModel(component,"Length",UnitGroup.UNITS_LENGTH,0); @@ -42,7 +46,8 @@ public class LaunchLugConfig extends RocketComponentConfig { //// Body tube diameter - panel.add(new JLabel("Outer diameter:")); + //// Outer diameter: + panel.add(new JLabel(trans.get("LaunchLugCfg.lbl.Outerdiam"))); DoubleModel od = new DoubleModel(component,"OuterRadius",2,UnitGroup.UNITS_LENGTH,0); // Diameter = 2*Radius @@ -55,8 +60,8 @@ public class LaunchLugConfig extends RocketComponentConfig { panel.add(new BasicSlider(od.getSliderModel(0, 0.04, 0.2)),"w 100lp, wrap rel"); - //// Inner diameter - panel.add(new JLabel("Inner diameter:")); + //// Inner diameter: + panel.add(new JLabel(trans.get("LaunchLugCfg.lbl.Innerdiam"))); // Diameter = 2*Radius m = new DoubleModel(component,"InnerRadius",2,UnitGroup.UNITS_LENGTH,0); @@ -71,7 +76,8 @@ public class LaunchLugConfig extends RocketComponentConfig { //// Wall thickness - panel.add(new JLabel("Thickness:")); + //// Thickness: + panel.add(new JLabel(trans.get("LaunchLugCfg.lbl.Thickness"))); m = new DoubleModel(component,"Thickness",UnitGroup.UNITS_LENGTH,0); @@ -83,8 +89,8 @@ public class LaunchLugConfig extends RocketComponentConfig { panel.add(new BasicSlider(m.getSliderModel(0,0.01)),"w 100lp, wrap 20lp"); - //// Radial direction - panel.add(new JLabel("Radial position:")); + //// Radial position: + panel.add(new JLabel(trans.get("LaunchLugCfg.lbl.Radialpos"))); m = new DoubleModel(component,"RadialDirection",UnitGroup.UNITS_ANGLE, -Math.PI, Math.PI); @@ -104,8 +110,8 @@ public class LaunchLugConfig extends RocketComponentConfig { - - panel.add(new JLabel("Position relative to:")); + //// Position relative to: + panel.add(new JLabel(trans.get("LaunchLugCfg.lbl.Posrelativeto"))); JComboBox combo = new JComboBox( new EnumModel(component, "RelativePosition", @@ -117,7 +123,8 @@ public class LaunchLugConfig extends RocketComponentConfig { })); panel.add(combo,"spanx, growx, wrap"); - panel.add(new JLabel("plus"),"right"); + //// plus + panel.add(new JLabel(trans.get("LaunchLugCfg.lbl.plus")),"right"); m = new DoubleModel(component,"PositionValue",UnitGroup.UNITS_LENGTH); spin = new JSpinner(m.getSpinnerModel()); @@ -138,8 +145,9 @@ public class LaunchLugConfig extends RocketComponentConfig { primary.add(panel,"grow"); - - tabbedPane.insertTab("General", null, primary, "General properties", 0); + //// General and General properties + tabbedPane.insertTab(trans.get("LaunchLugCfg.tab.General"), null, primary, + trans.get("LaunchLugCfg.tab.Generalprop"), 0); tabbedPane.setSelectedIndex(0); } diff --git a/src/net/sf/openrocket/gui/configdialog/MassComponentConfig.java b/src/net/sf/openrocket/gui/configdialog/MassComponentConfig.java index 5bff03a0..659714f4 100644 --- a/src/net/sf/openrocket/gui/configdialog/MassComponentConfig.java +++ b/src/net/sf/openrocket/gui/configdialog/MassComponentConfig.java @@ -16,12 +16,15 @@ import net.sf.openrocket.gui.adaptors.DoubleModel; import net.sf.openrocket.gui.adaptors.EnumModel; import net.sf.openrocket.gui.components.BasicSlider; import net.sf.openrocket.gui.components.UnitSelector; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.rocketcomponent.MassComponent; import net.sf.openrocket.rocketcomponent.RocketComponent; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.unit.UnitGroup; public class MassComponentConfig extends RocketComponentConfig { + private static final Translator trans = Application.getTranslator(); public MassComponentConfig(RocketComponent component) { super(component); @@ -32,7 +35,7 @@ public class MassComponentConfig extends RocketComponentConfig { //// Mass - panel.add(new JLabel("Mass")); + panel.add(new JLabel(trans.get("MassComponentCfg.lbl.Mass"))); DoubleModel m = new DoubleModel(component,"ComponentMass",UnitGroup.UNITS_MASS,0); @@ -46,7 +49,8 @@ public class MassComponentConfig extends RocketComponentConfig { //// Mass length - panel.add(new JLabel("Length")); + //// Length + panel.add(new JLabel(trans.get("MassComponentCfg.lbl.Length"))); m = new DoubleModel(component,"Length",UnitGroup.UNITS_LENGTH,0); @@ -59,7 +63,8 @@ public class MassComponentConfig extends RocketComponentConfig { //// Tube diameter - panel.add(new JLabel("Diameter:")); + //// Diameter: + panel.add(new JLabel(trans.get("MassComponentCfg.lbl.Diameter"))); DoubleModel od = new DoubleModel(component,"Radius",2,UnitGroup.UNITS_LENGTH,0); // Diameter = 2*Radius @@ -73,8 +78,8 @@ public class MassComponentConfig extends RocketComponentConfig { //// Position - - panel.add(new JLabel("Position relative to:")); + //// Position relative to: + panel.add(new JLabel(trans.get("MassComponentCfg.lbl.PosRelativeto"))); JComboBox combo = new JComboBox( new EnumModel(component, "RelativePosition", @@ -85,8 +90,8 @@ public class MassComponentConfig extends RocketComponentConfig { RocketComponent.Position.ABSOLUTE })); panel.add(combo,"spanx, growx, wrap"); - - panel.add(new JLabel("plus"),"right"); + //// plus + panel.add(new JLabel(trans.get("MassComponentCfg.lbl.plus")),"right"); m = new DoubleModel(component,"PositionValue",UnitGroup.UNITS_LENGTH); spin = new JSpinner(m.getSpinnerModel()); @@ -99,10 +104,12 @@ public class MassComponentConfig extends RocketComponentConfig { new DoubleModel(component.getParent(), "Length"))), "w 100lp, wrap"); - - tabbedPane.insertTab("General", null, panel, "General properties", 0); - tabbedPane.insertTab("Radial position", null, positionTab(), - "Radial position configuration", 1); + //// General and General properties + tabbedPane.insertTab(trans.get("MassComponentCfg.tab.General"), null, panel, + trans.get("MassComponentCfg.tab.ttip.General"), 0); + //// Radial position and Radial position configuration + tabbedPane.insertTab(trans.get("MassComponentCfg.tab.Radialpos"), null, positionTab(), + trans.get("MassComponentCfg.tab.ttip.Radialpos"), 1); tabbedPane.setSelectedIndex(0); } @@ -111,7 +118,8 @@ public class MassComponentConfig extends RocketComponentConfig { JPanel panel = new JPanel(new MigLayout("gap rel unrel","[][65lp::][30lp::]","")); //// Radial position - panel.add(new JLabel("Radial distance:")); + //// Radial distance: + panel.add(new JLabel(trans.get("MassComponentCfg.lbl.Radialdistance"))); DoubleModel m = new DoubleModel(component,"RadialPosition",UnitGroup.UNITS_LENGTH,0); @@ -123,8 +131,8 @@ public class MassComponentConfig extends RocketComponentConfig { panel.add(new BasicSlider(m.getSliderModel(0, 0.1, 1.0)),"w 100lp, wrap"); - //// Radial direction - panel.add(new JLabel("Radial direction:")); + //// Radial direction: + panel.add(new JLabel(trans.get("MassComponentCfg.lbl.Radialdirection"))); m = new DoubleModel(component,"RadialDirection",UnitGroup.UNITS_ANGLE,0); @@ -137,7 +145,7 @@ public class MassComponentConfig extends RocketComponentConfig { //// Reset button - JButton button = new JButton("Reset"); + JButton button = new JButton(trans.get("MassComponentCfg.but.Reset")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { diff --git a/src/net/sf/openrocket/gui/configdialog/MotorConfig.java b/src/net/sf/openrocket/gui/configdialog/MotorConfig.java index 45a134a2..8ac39d44 100644 --- a/src/net/sf/openrocket/gui/configdialog/MotorConfig.java +++ b/src/net/sf/openrocket/gui/configdialog/MotorConfig.java @@ -27,6 +27,7 @@ import net.sf.openrocket.gui.components.BasicSlider; import net.sf.openrocket.gui.components.StyledLabel; import net.sf.openrocket.gui.components.UnitSelector; import net.sf.openrocket.gui.dialogs.motor.MotorChooserDialog; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.motor.Motor; import net.sf.openrocket.motor.ThrustCurveMotor; import net.sf.openrocket.rocketcomponent.Configuration; @@ -34,6 +35,7 @@ import net.sf.openrocket.rocketcomponent.MotorMount; import net.sf.openrocket.rocketcomponent.Rocket; import net.sf.openrocket.rocketcomponent.RocketComponent; import net.sf.openrocket.rocketcomponent.MotorMount.IgnitionEvent; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.unit.UnitGroup; public class MotorConfig extends JPanel { @@ -43,7 +45,8 @@ public class MotorConfig extends JPanel { private final Configuration configuration; private JPanel panel; private JLabel motorLabel; - + private static final Translator trans = Application.getTranslator(); + public MotorConfig(MotorMount motorMount) { super(new MigLayout("fill")); @@ -55,7 +58,8 @@ public class MotorConfig extends JPanel { model = new BooleanModel(motorMount, "MotorMount"); JCheckBox check = new JCheckBox(model); - check.setText("This component is a motor mount"); + ////This component is a motor mount + check.setText(trans.get("MotorCfg.checkbox.compmotormount")); this.add(check, "wrap"); @@ -64,7 +68,8 @@ public class MotorConfig extends JPanel { // Motor configuration selector - panel.add(new JLabel("Motor configuration:"), "shrink"); + //// Motor configuration: + panel.add(new JLabel(trans.get("MotorCfg.lbl.Motorcfg")), "shrink"); JComboBox combo = new JComboBox(new MotorConfigurationModel(configuration)); panel.add(combo, "growx"); @@ -76,7 +81,8 @@ public class MotorConfig extends JPanel { } }); - JButton button = new JButton("New"); + //// New button + JButton button = new JButton(trans.get("MotorCfg.but.New")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -87,8 +93,8 @@ public class MotorConfig extends JPanel { panel.add(button, "wrap unrel"); - // Current motor - panel.add(new JLabel("Current motor:"), "shrink"); + // Current motor: + panel.add(new JLabel(trans.get("MotorCfg.lbl.Currentmotor")), "shrink"); motorLabel = new JLabel(); motorLabel.setFont(motorLabel.getFont().deriveFont(Font.BOLD)); @@ -98,7 +104,8 @@ public class MotorConfig extends JPanel { // Overhang - panel.add(new JLabel("Motor overhang:")); + //// Motor overhang: + panel.add(new JLabel(trans.get("MotorCfg.lbl.Motoroverhang"))); DoubleModel dm = new DoubleModel(motorMount, "MotorOverhang", UnitGroup.UNITS_LENGTH); @@ -112,20 +119,23 @@ public class MotorConfig extends JPanel { // Select ignition event - panel.add(new JLabel("Ignition at:"), ""); + //// Ignition at: + panel.add(new JLabel(trans.get("MotorCfg.lbl.Ignitionat")), ""); combo = new JComboBox(new EnumModel(mount, "IgnitionEvent")); panel.add(combo, "growx, wrap"); // ... and delay - panel.add(new JLabel("plus"), "gap indent, skip 1, span, split"); + //// plus + panel.add(new JLabel(trans.get("MotorCfg.lbl.plus")), "gap indent, skip 1, span, split"); dm = new DoubleModel(mount, "IgnitionDelay", 0); spin = new JSpinner(dm.getSpinnerModel()); spin.setEditor(new SpinnerEditor(spin)); panel.add(spin, "gap rel rel"); - panel.add(new JLabel("seconds"), "wrap unrel"); + //// seconds + panel.add(new JLabel(trans.get("MotorCfg.lbl.seconds")), "wrap unrel"); @@ -135,17 +145,24 @@ public class MotorConfig extends JPanel { int stages = c.getChildCount(); if (stages == 1) { - panel.add(new StyledLabel("The current design has only one stage. " + - "Stages can be added by clicking \"New stage\".", -1), + //// The current design has only one stage. + //// Stages can be added by clicking \"New stage\". + + panel.add(new StyledLabel(trans.get("MotorCfg.lbl.longA1") + + trans.get("MotorCfg.lbl.longA2"), -1), "spanx, right, wrap para"); } else { - panel.add(new StyledLabel("The current design has " + stages + " stages.", -1), + //// The current design has + //// stages. + panel.add(new StyledLabel(trans.get("MotorCfg.lbl.longB1") + " " + stages +" " + + trans.get("MotorCfg.lbl.longB2"), -1), "skip 1, spanx, wrap para"); } // Select etc. buttons - button = new JButton("Select motor"); + //// Select motor + button = new JButton(trans.get("MotorCfg.but.Selectmotor")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -171,7 +188,8 @@ public class MotorConfig extends JPanel { }); panel.add(button, "span, split, growx"); - button = new JButton("Remove motor"); + //// Remove motor + button = new JButton(trans.get("MotorCfg.but.Removemotor")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -201,7 +219,8 @@ public class MotorConfig extends JPanel { String id = configuration.getMotorConfigurationID(); Motor m = mount.getMotor(id); if (m == null) { - motorLabel.setText("None"); + //// None + motorLabel.setText(trans.get("MotorCfg.lbl.motorLabel")); } else { String str = ""; if (m instanceof ThrustCurveMotor) diff --git a/src/net/sf/openrocket/gui/configdialog/NoseConeConfig.java b/src/net/sf/openrocket/gui/configdialog/NoseConeConfig.java index 14ccb9e4..a9d4f61a 100644 --- a/src/net/sf/openrocket/gui/configdialog/NoseConeConfig.java +++ b/src/net/sf/openrocket/gui/configdialog/NoseConeConfig.java @@ -18,10 +18,12 @@ import net.sf.openrocket.gui.adaptors.DoubleModel; import net.sf.openrocket.gui.components.BasicSlider; import net.sf.openrocket.gui.components.DescriptionArea; import net.sf.openrocket.gui.components.UnitSelector; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.material.Material; import net.sf.openrocket.rocketcomponent.NoseCone; import net.sf.openrocket.rocketcomponent.RocketComponent; import net.sf.openrocket.rocketcomponent.Transition; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.unit.UnitGroup; public class NoseConeConfig extends RocketComponentConfig { @@ -33,7 +35,8 @@ public class NoseConeConfig extends RocketComponentConfig { private JLabel shapeLabel; private JSpinner shapeSpinner; private JSlider shapeSlider; - + private static final Translator trans = Application.getTranslator(); + // Prepended to the description from NoseCone.DESCRIPTIONS private static final String PREDESC = ""; @@ -47,8 +50,8 @@ public class NoseConeConfig extends RocketComponentConfig { //// Shape selection - - panel.add(new JLabel("Nose cone shape:")); + //// Nose cone shape: + panel.add(new JLabel(trans.get("NoseConeCfg.lbl.Noseconeshape"))); Transition.Shape selected = ((NoseCone)component).getType(); Transition.Shape[] typeList = Transition.Shape.values(); @@ -70,7 +73,8 @@ public class NoseConeConfig extends RocketComponentConfig { //// Shape parameter - shapeLabel = new JLabel("Shape parameter:"); + //// Shape parameter: + shapeLabel = new JLabel(trans.get("NoseConeCfg.lbl.Shapeparam")); panel.add(shapeLabel); m = new DoubleModel(component,"ShapeParameter"); @@ -88,8 +92,8 @@ public class NoseConeConfig extends RocketComponentConfig { //// Length - - panel.add(new JLabel("Nose cone length:")); + //// Nose cone length: + panel.add(new JLabel(trans.get("NoseConeCfg.lbl.Noseconelength"))); m = new DoubleModel(component,"Length",UnitGroup.UNITS_LENGTH,0); JSpinner spin = new JSpinner(m.getSpinnerModel()); @@ -100,8 +104,8 @@ public class NoseConeConfig extends RocketComponentConfig { panel.add(new BasicSlider(m.getSliderModel(0, 0.1, 0.7)),"w 100lp, wrap"); //// Diameter - - panel.add(new JLabel("Base diameter:")); + //// Base diameter: + panel.add(new JLabel(trans.get("NoseConeCfg.lbl.Basediam"))); m = new DoubleModel(component,"AftRadius",2.0,UnitGroup.UNITS_LENGTH,0); // Diameter = 2*Radius spin = new JSpinner(m.getSpinnerModel()); @@ -112,12 +116,13 @@ public class NoseConeConfig extends RocketComponentConfig { panel.add(new BasicSlider(m.getSliderModel(0, 0.04, 0.2)),"w 100lp, wrap 0px"); JCheckBox check = new JCheckBox(m.getAutomaticAction()); - check.setText("Automatic"); + //// Automatic + check.setText(trans.get("NoseConeCfg.checkbox.Automatic")); panel.add(check,"skip, span 2, wrap"); - //// Wall thickness - panel.add(new JLabel("Wall thickness:")); + //// Wall thickness: + panel.add(new JLabel(trans.get("NoseConeCfg.lbl.Wallthickness"))); m = new DoubleModel(component,"Thickness",UnitGroup.UNITS_LENGTH,0); @@ -130,7 +135,8 @@ public class NoseConeConfig extends RocketComponentConfig { check = new JCheckBox(new BooleanModel(component,"Filled")); - check.setText("Filled"); + //// Filled + check.setText(trans.get("NoseConeCfg.checkbox.Filled")); panel.add(check,"skip, span 2, wrap"); @@ -154,9 +160,12 @@ public class NoseConeConfig extends RocketComponentConfig { panel.add(panel2, "cell 4 0, gapleft paragraph, aligny 0%, spany"); - - tabbedPane.insertTab("General", null, panel, "General properties", 0); - tabbedPane.insertTab("Shoulder", null, shoulderTab(), "Shoulder properties", 1); + //// General and General properties + tabbedPane.insertTab(trans.get("NoseConeCfg.tab.General"), null, panel, + trans.get("NoseConeCfg.tab.ttip.General"), 0); + //// Shoulder and Shoulder properties + tabbedPane.insertTab(trans.get("NoseConeCfg.tab.Shoulder"), null, shoulderTab(), + trans.get("NoseConeCfg.tab.ttip.Shoulder"), 1); tabbedPane.setSelectedIndex(0); } diff --git a/src/net/sf/openrocket/gui/configdialog/ParachuteConfig.java b/src/net/sf/openrocket/gui/configdialog/ParachuteConfig.java index d498d827..4536288e 100644 --- a/src/net/sf/openrocket/gui/configdialog/ParachuteConfig.java +++ b/src/net/sf/openrocket/gui/configdialog/ParachuteConfig.java @@ -21,14 +21,17 @@ import net.sf.openrocket.gui.components.HtmlLabel; import net.sf.openrocket.gui.components.StyledLabel; import net.sf.openrocket.gui.components.UnitSelector; import net.sf.openrocket.gui.components.StyledLabel.Style; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.material.Material; import net.sf.openrocket.rocketcomponent.MassObject; import net.sf.openrocket.rocketcomponent.Parachute; import net.sf.openrocket.rocketcomponent.RocketComponent; import net.sf.openrocket.rocketcomponent.MotorMount.IgnitionEvent; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.unit.UnitGroup; public class ParachuteConfig extends RecoveryDeviceConfig { + private static final Translator trans = Application.getTranslator(); public ParachuteConfig(final RocketComponent component) { super(component); @@ -39,10 +42,10 @@ public class ParachuteConfig extends RecoveryDeviceConfig { //// Canopy - panel.add(new StyledLabel("Canopy:", Style.BOLD), "wrap unrel"); + panel.add(new StyledLabel(trans.get("ParachuteCfg.lbl.Canopy"), Style.BOLD), "wrap unrel"); - - panel.add(new JLabel("Diameter:")); + //// Diameter: + panel.add(new JLabel(trans.get("ParachuteCfg.lbl.Diameter"))); DoubleModel m = new DoubleModel(component,"Diameter",UnitGroup.UNITS_LENGTH,0); @@ -52,12 +55,13 @@ public class ParachuteConfig extends RecoveryDeviceConfig { panel.add(new UnitSelector(m),"growx"); panel.add(new BasicSlider(m.getSliderModel(0, 0.4, 1.5)),"w 100lp, wrap"); - - panel.add(new JLabel("Material:")); + //// Material: + panel.add(new JLabel(trans.get("ParachuteCfg.lbl.Material"))); JComboBox combo = new JComboBox(new MaterialModel(panel, component, Material.Type.SURFACE)); - combo.setToolTipText("The component material affects the weight of the component."); + //// The component material affects the weight of the component. + combo.setToolTipText(trans.get("ParachuteCfg.combo.MaterialModel")); panel.add(combo,"spanx 3, growx, wrap paragraph"); // materialPanel(panel, Material.Type.SURFACE, "Material:", null); @@ -65,10 +69,11 @@ public class ParachuteConfig extends RecoveryDeviceConfig { // CD - JLabel label = new HtmlLabel("Drag coefficient CD:"); - String tip = "The drag coefficient relative to the total area of the parachute.
" + - "A larger drag coefficient yields a slowed descent rate. " + - "A typical value for parachutes is 0.8."; + //// Drag coefficient CD: + JLabel label = new HtmlLabel(trans.get("ParachuteCfg.lbl.longA1")); + String tip = trans.get("ParachuteCfg.lbl.longB1") + + trans.get("ParachuteCfg.lbl.longB2") + " " + + trans.get("ParachuteCfg.lbl.longB3"); label.setToolTipText(tip); panel.add(label); @@ -79,7 +84,8 @@ public class ParachuteConfig extends RecoveryDeviceConfig { spin.setEditor(new SpinnerEditor(spin)); panel.add(spin,"growx"); - JButton button = new JButton("Reset"); + //// Reset button + JButton button = new JButton(trans.get("ParachuteCfg.but.Reset")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -92,18 +98,18 @@ public class ParachuteConfig extends RecoveryDeviceConfig { //// Shroud lines - panel.add(new StyledLabel("Shroud lines:", Style.BOLD), "wrap unrel"); - + panel.add(new StyledLabel(trans.get("ParachuteCfg.lbl.Shroudlines"), Style.BOLD), "wrap unrel"); - panel.add(new JLabel("Number of lines:")); + //// Number of lines: + panel.add(new JLabel(trans.get("ParachuteCfg.lbl.Numberoflines"))); IntegerModel im = new IntegerModel(component,"LineCount",0); spin = new JSpinner(im.getSpinnerModel()); spin.setEditor(new SpinnerEditor(spin)); panel.add(spin,"growx, wrap"); - - panel.add(new JLabel("Line length:")); + //// Line length: + panel.add(new JLabel(trans.get("ParachuteCfg.lbl.Linelength"))); m = new DoubleModel(component,"LineLength",UnitGroup.UNITS_LENGTH,0); @@ -113,8 +119,8 @@ public class ParachuteConfig extends RecoveryDeviceConfig { panel.add(new UnitSelector(m),"growx"); panel.add(new BasicSlider(m.getSliderModel(0, 0.4, 1.5)),"w 100lp, wrap"); - - panel.add(new JLabel("Material:")); + //// Material: + panel.add(new JLabel(trans.get("ParachuteCfg.lbl.Material"))); combo = new JComboBox(new MaterialModel(panel, component, Material.Type.LINE, "LineMaterial")); @@ -129,8 +135,8 @@ public class ParachuteConfig extends RecoveryDeviceConfig { //// Position - - panel.add(new JLabel("Position relative to:")); + //// Position relative to: + panel.add(new JLabel(trans.get("ParachuteCfg.lbl.Posrelativeto"))); combo = new JComboBox( new EnumModel(component, "RelativePosition", @@ -142,7 +148,8 @@ public class ParachuteConfig extends RecoveryDeviceConfig { })); panel.add(combo,"spanx, growx, wrap"); - panel.add(new JLabel("plus"),"right"); + //// plus + panel.add(new JLabel(trans.get("ParachuteCfg.lbl.plus")),"right"); m = new DoubleModel(component,"PositionValue",UnitGroup.UNITS_LENGTH); spin = new JSpinner(m.getSpinnerModel()); @@ -157,7 +164,8 @@ public class ParachuteConfig extends RecoveryDeviceConfig { //// Spatial length - panel.add(new JLabel("Packed length:")); + //// Packed length: + panel.add(new JLabel(trans.get("ParachuteCfg.lbl.Packedlength"))); m = new DoubleModel(component,"Length",UnitGroup.UNITS_LENGTH,0); @@ -170,7 +178,8 @@ public class ParachuteConfig extends RecoveryDeviceConfig { //// Tube diameter - panel.add(new JLabel("Packed diameter:")); + //// Packed diameter: + panel.add(new JLabel(trans.get("ParachuteCfg.lbl.Packeddiam"))); DoubleModel od = new DoubleModel(component,"Radius",2,UnitGroup.UNITS_LENGTH,0); // Diameter = 2*Radius @@ -184,24 +193,26 @@ public class ParachuteConfig extends RecoveryDeviceConfig { //// Deployment - - panel.add(new JLabel("Deploys at:"),""); + //// Deploys at: + panel.add(new JLabel(trans.get("ParachuteCfg.lbl.Deploysat")),""); combo = new JComboBox(new EnumModel(component, "DeployEvent")); panel.add(combo,"spanx 3, growx, wrap"); // ... and delay - panel.add(new JLabel("plus"),"right"); + //// plus + panel.add(new JLabel(trans.get("ParachuteCfg.lbl.plus")),"right"); m = new DoubleModel(component,"DeployDelay",0); spin = new JSpinner(m.getSpinnerModel()); spin.setEditor(new SpinnerEditor(spin)); panel.add(spin,"spanx, split"); - panel.add(new JLabel("seconds"),"wrap paragraph"); + //// seconds + panel.add(new JLabel(trans.get("ParachuteCfg.lbl.seconds")),"wrap paragraph"); - // Altitude - label = new JLabel("Altitude:"); + // Altitude: + label = new JLabel(trans.get("ParachuteCfg.lbl.Altitude")); altitudeComponents.add(label); panel.add(label); @@ -223,9 +234,11 @@ public class ParachuteConfig extends RecoveryDeviceConfig { updateFields(); - tabbedPane.insertTab("General", null, primary, "General properties", 0); - tabbedPane.insertTab("Radial position", null, positionTab(), - "Radial position configuration", 1); + //// General and General properties + tabbedPane.insertTab(trans.get("ParachuteCfg.tab.General"), null, primary, trans.get("ParachuteCfg.tab.ttip.General"), 0); + //// Radial position and Radial position configuration + tabbedPane.insertTab(trans.get("ParachuteCfg.tab.Radialpos"), null, positionTab(), + trans.get("ParachuteCfg.tab.ttip.Radialpos"), 1); tabbedPane.setSelectedIndex(0); } @@ -237,7 +250,8 @@ public class ParachuteConfig extends RecoveryDeviceConfig { JPanel panel = new JPanel(new MigLayout("gap rel unrel","[][65lp::][30lp::]","")); //// Radial position - panel.add(new JLabel("Radial distance:")); + //// Radial distance: + panel.add(new JLabel(trans.get("ParachuteCfg.lbl.Radialdistance"))); DoubleModel m = new DoubleModel(component,"RadialPosition",UnitGroup.UNITS_LENGTH,0); @@ -249,8 +263,8 @@ public class ParachuteConfig extends RecoveryDeviceConfig { panel.add(new BasicSlider(m.getSliderModel(0, 0.1, 1.0)),"w 100lp, wrap"); - //// Radial direction - panel.add(new JLabel("Radial direction:")); + //// Radial direction: + panel.add(new JLabel(trans.get("ParachuteCfg.lbl.Radialdirection"))); m = new DoubleModel(component,"RadialDirection",UnitGroup.UNITS_ANGLE,0); @@ -263,7 +277,7 @@ public class ParachuteConfig extends RecoveryDeviceConfig { //// Reset button - JButton button = new JButton("Reset"); + JButton button = new JButton(trans.get("ParachuteCfg.but.Reset")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { diff --git a/src/net/sf/openrocket/gui/configdialog/RingComponentConfig.java b/src/net/sf/openrocket/gui/configdialog/RingComponentConfig.java index 3a11c74b..a5c74943 100644 --- a/src/net/sf/openrocket/gui/configdialog/RingComponentConfig.java +++ b/src/net/sf/openrocket/gui/configdialog/RingComponentConfig.java @@ -18,13 +18,16 @@ import net.sf.openrocket.gui.adaptors.EnumModel; import net.sf.openrocket.gui.components.BasicSlider; import net.sf.openrocket.gui.components.DescriptionArea; import net.sf.openrocket.gui.components.UnitSelector; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.material.Material; import net.sf.openrocket.rocketcomponent.EngineBlock; import net.sf.openrocket.rocketcomponent.RingComponent; import net.sf.openrocket.rocketcomponent.RocketComponent; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.unit.UnitGroup; public class RingComponentConfig extends RocketComponentConfig { + private static final Translator trans = Application.getTranslator(); public RingComponentConfig(RocketComponent component) { super(component); @@ -42,6 +45,7 @@ public class RingComponentConfig extends RocketComponentConfig { if (outer != null) { panel.add(new JLabel(outer)); + //// OuterRadius od = new DoubleModel(component,"OuterRadius",2,UnitGroup.UNITS_LENGTH,0); // Diameter = 2*Radius @@ -54,7 +58,8 @@ public class RingComponentConfig extends RocketComponentConfig { if (od.isAutomaticAvailable()) { JCheckBox check = new JCheckBox(od.getAutomaticAction()); - check.setText("Automatic"); + //// Automatic + check.setText(trans.get("ringcompcfg.Automatic")); panel.add(check,"skip, span 2, wrap"); } } @@ -64,6 +69,7 @@ public class RingComponentConfig extends RocketComponentConfig { if (inner != null) { panel.add(new JLabel(inner)); + //// InnerRadius m = new DoubleModel(component,"InnerRadius",2,UnitGroup.UNITS_LENGTH,0); spin = new JSpinner(m.getSpinnerModel()); @@ -79,7 +85,8 @@ public class RingComponentConfig extends RocketComponentConfig { if (m.isAutomaticAvailable()) { JCheckBox check = new JCheckBox(m.getAutomaticAction()); - check.setText("Automatic"); + //// Automatic + check.setText(trans.get("ringcompcfg.Automatic")); panel.add(check,"skip, span 2, wrap"); } } @@ -89,6 +96,7 @@ public class RingComponentConfig extends RocketComponentConfig { if (thickness != null) { panel.add(new JLabel(thickness)); + //// Thickness m = new DoubleModel(component,"Thickness",UnitGroup.UNITS_LENGTH,0); spin = new JSpinner(m.getSpinnerModel()); @@ -104,6 +112,7 @@ public class RingComponentConfig extends RocketComponentConfig { if (length != null) { panel.add(new JLabel(length)); + //// Length m = new DoubleModel(component,"Length",UnitGroup.UNITS_LENGTH,0); spin = new JSpinner(m.getSpinnerModel()); @@ -117,7 +126,8 @@ public class RingComponentConfig extends RocketComponentConfig { //// Position - panel.add(new JLabel("Position relative to:")); + //// Position relative to: + panel.add(new JLabel(trans.get("ringcompcfg.Positionrelativeto"))); JComboBox combo = new JComboBox( new EnumModel(component, "RelativePosition", @@ -129,8 +139,10 @@ public class RingComponentConfig extends RocketComponentConfig { })); panel.add(combo,"spanx 3, growx, wrap"); - panel.add(new JLabel("plus"),"right"); + //// plus + panel.add(new JLabel(trans.get("ringcompcfg.plus")),"right"); + //// PositionValue m = new DoubleModel(component,"PositionValue",UnitGroup.UNITS_LENGTH); spin = new JSpinner(m.getSpinnerModel()); spin.setEditor(new SpinnerEditor(spin)); @@ -165,44 +177,51 @@ public class RingComponentConfig extends RocketComponentConfig { "[][65lp::][30lp::]","")); //// Radial position - JLabel l = new JLabel("Radial distance:"); - l.setToolTipText("Distance from the rocket centerline"); + JLabel l = new JLabel(trans.get("ringcompcfg.Radialdistance")); + //// Distance from the rocket centerline + l.setToolTipText(trans.get("ringcompcfg.Distancefrom")); panel.add(l); DoubleModel m = new DoubleModel(component,"RadialPosition",UnitGroup.UNITS_LENGTH,0); JSpinner spin = new JSpinner(m.getSpinnerModel()); spin.setEditor(new SpinnerEditor(spin)); - spin.setToolTipText("Distance from the rocket centerline"); + //// Distance from the rocket centerline + spin.setToolTipText(trans.get("ringcompcfg.Distancefrom")); panel.add(spin,"growx"); panel.add(new UnitSelector(m),"growx"); BasicSlider bs = new BasicSlider(m.getSliderModel(0, 0.1, 1.0)); - bs.setToolTipText("Distance from the rocket centerline"); + //// Distance from the rocket centerline + bs.setToolTipText(trans.get("ringcompcfg.Distancefrom")); panel.add(bs,"w 100lp, wrap"); //// Radial direction - l = new JLabel("Radial direction:"); - l.setToolTipText("The radial direction from the rocket centerline"); + l = new JLabel(trans.get("ringcompcfg.Radialdirection")); + //// The radial direction from the rocket centerline + l.setToolTipText(trans.get("ringcompcfg.radialdirectionfrom")); panel.add(l); m = new DoubleModel(component,"RadialDirection",UnitGroup.UNITS_ANGLE,0); spin = new JSpinner(m.getSpinnerModel()); spin.setEditor(new SpinnerEditor(spin)); - spin.setToolTipText("The radial direction from the rocket centerline"); + //// The radial direction from the rocket centerline + spin.setToolTipText(trans.get("ringcompcfg.radialdirectionfrom")); panel.add(spin,"growx"); panel.add(new UnitSelector(m),"growx"); bs = new BasicSlider(m.getSliderModel(-Math.PI, Math.PI)); - bs.setToolTipText("The radial direction from the rocket centerline"); + //// The radial direction from the rocket centerline + bs.setToolTipText(trans.get("ringcompcfg.radialdirectionfrom")); panel.add(bs,"w 100lp, wrap"); //// Reset button - JButton button = new JButton("Reset"); - button.setToolTipText("Reset the component to the rocket centerline"); + JButton button = new JButton(trans.get("ringcompcfg.but.Reset")); + //// Reset the component to the rocket centerline + button.setToolTipText(trans.get("ringcompcfg.but.Resetcomponant")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { diff --git a/src/net/sf/openrocket/gui/configdialog/RocketComponentConfig.java b/src/net/sf/openrocket/gui/configdialog/RocketComponentConfig.java index d6d60746..101b8099 100644 --- a/src/net/sf/openrocket/gui/configdialog/RocketComponentConfig.java +++ b/src/net/sf/openrocket/gui/configdialog/RocketComponentConfig.java @@ -36,6 +36,7 @@ import net.sf.openrocket.gui.components.BasicSlider; import net.sf.openrocket.gui.components.StyledLabel; import net.sf.openrocket.gui.components.StyledLabel.Style; import net.sf.openrocket.gui.components.UnitSelector; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.material.Material; import net.sf.openrocket.rocketcomponent.ComponentAssembly; import net.sf.openrocket.rocketcomponent.ExternalComponent; @@ -43,6 +44,7 @@ import net.sf.openrocket.rocketcomponent.ExternalComponent.Finish; import net.sf.openrocket.rocketcomponent.NoseCone; import net.sf.openrocket.rocketcomponent.Rocket; import net.sf.openrocket.rocketcomponent.RocketComponent; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.unit.UnitGroup; import net.sf.openrocket.util.GUIUtil; import net.sf.openrocket.util.Invalidatable; @@ -51,6 +53,8 @@ import net.sf.openrocket.util.Prefs; public class RocketComponentConfig extends JPanel { + private static final Translator trans = Application.getTranslator(); + protected final RocketComponent component; protected final JTabbedPane tabbedPane; @@ -71,25 +75,34 @@ public class RocketComponentConfig extends JPanel { setLayout(new MigLayout("fill", "[grow, fill]")); this.component = component; - JLabel label = new JLabel("Component name:"); - label.setToolTipText("The component name."); + //// Component name: + JLabel label = new JLabel(trans.get("RocketCompCfg.lbl.Componentname")); + //// The component name. + label.setToolTipText(trans.get("RocketCompCfg.ttip.Thecomponentname")); this.add(label, "split, gapright 10"); componentNameField = new JTextField(15); textFieldListener = new TextFieldListener(); componentNameField.addActionListener(textFieldListener); componentNameField.addFocusListener(textFieldListener); - componentNameField.setToolTipText("The component name."); + //// The component name. + componentNameField.setToolTipText(trans.get("RocketCompCfg.ttip.Thecomponentname")); this.add(componentNameField, "growx, growy 0, wrap"); tabbedPane = new JTabbedPane(); this.add(tabbedPane, "growx, growy 1, wrap"); - tabbedPane.addTab("Override", null, overrideTab(), "Mass and CG override options"); + //// Override and Mass and CG override options + tabbedPane.addTab(trans.get("RocketCompCfg.tab.Override"), null, overrideTab(), + trans.get("RocketCompCfg.tab.MassandCGoverride")); if (component.isMassive()) - tabbedPane.addTab("Figure", null, figureTab(), "Figure style options"); - tabbedPane.addTab("Comment", null, commentTab(), "Specify a comment for the component"); + //// Figure and Figure style options + tabbedPane.addTab(trans.get("RocketCompCfg.tab.Figure"), null, figureTab(), + trans.get("RocketCompCfg.tab.Figstyleopt")); + //// Comment and Specify a comment for the component + tabbedPane.addTab(trans.get("RocketCompCfg.tab.Comment"), null, commentTab(), + trans.get("RocketCompCfg.tab.Specifyacomment")); addButtons(); @@ -104,14 +117,16 @@ public class RocketComponentConfig extends JPanel { buttonPanel = new JPanel(new MigLayout("fill, ins 0")); - massLabel = new StyledLabel("Mass: ", -1); + //// Mass: + massLabel = new StyledLabel(trans.get("RocketCompCfg.lbl.Mass") + " ", -1); buttonPanel.add(massLabel, "growx"); for (JButton b : buttons) { buttonPanel.add(b, "right, gap para"); } - JButton closeButton = new JButton("Close"); + //// Close button + JButton closeButton = new JButton(trans.get("dlg.but.close")); closeButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { @@ -144,19 +159,22 @@ public class RocketComponentConfig extends JPanel { // Mass label if (component.isMassive()) { - String text = "Component mass: "; + //// Component mass: + String text = trans.get("RocketCompCfg.lbl.Componentmass") + " "; text += UnitGroup.UNITS_MASS.getDefaultUnit().toStringUnit( component.getComponentMass()); String overridetext = null; if (component.isMassOverridden()) { - overridetext = "(overridden to " + UnitGroup.UNITS_MASS.getDefaultUnit(). + //// (overridden to + overridetext = trans.get("RocketCompCfg.lbl.overriddento")+" " + UnitGroup.UNITS_MASS.getDefaultUnit(). toStringUnit(component.getOverrideMass()) + ")"; } for (RocketComponent c = component.getParent(); c != null; c = c.getParent()) { if (c.isMassOverridden() && c.getOverrideSubcomponents()) { - overridetext = "(overridden by " + c.getName() + ")"; + ///// (overridden by + overridetext = trans.get("RocketCompCfg.lbl.overriddenby")+" " + c.getName() + ")"; } } @@ -171,25 +189,30 @@ public class RocketComponentConfig extends JPanel { protected JPanel materialPanel(JPanel panel, Material.Type type) { - return materialPanel(panel, type, "Component material:", "Component finish:"); + ////Component material: and Component finish: + return materialPanel(panel, type, trans.get("RocketCompCfg.lbl.Componentmaterial"), + trans.get("RocketCompCfg.lbl.Componentfinish")); } protected JPanel materialPanel(JPanel panel, Material.Type type, String materialString, String finishString) { JLabel label = new JLabel(materialString); - label.setToolTipText("The component material affects the weight of the component."); + //// The component material affects the weight of the component. + label.setToolTipText(trans.get("RocketCompCfg.lbl.ttip.componentmaterialaffects")); panel.add(label, "spanx 4, wrap rel"); JComboBox combo = new JComboBox(new MaterialModel(panel, component, type)); - combo.setToolTipText("The component material affects the weight of the component."); + //// The component material affects the weight of the component. + combo.setToolTipText(trans.get("RocketCompCfg.combo.ttip.componentmaterialaffects")); panel.add(combo, "spanx 4, growx, wrap paragraph"); if (component instanceof ExternalComponent) { label = new JLabel(finishString); - String tip = "The component finish affects the aerodynamic drag of the " - + "component.
" - + "The value indicated is the average roughness height of the surface."; + ////The component finish affects the aerodynamic drag of the component.
+ String tip = trans.get("RocketCompCfg.lbl.longA1") + //// The value indicated is the average roughness height of the surface. + + trans.get("RocketCompCfg.lbl.longA2"); label.setToolTipText(tip); panel.add(label, "spanx 4, wmin 220lp, wrap rel"); @@ -197,8 +220,10 @@ public class RocketComponentConfig extends JPanel { combo.setToolTipText(tip); panel.add(combo, "spanx 4, growx, split"); - JButton button = new JButton("Set for all"); - button.setToolTipText("Set this finish for all components of the rocket."); + //// Set for all + JButton button = new JButton(trans.get("RocketCompCfg.but.Setforall")); + //// Set this finish for all components of the rocket. + button.setToolTipText(trans.get("RocketCompCfg.but.ttip.Setforall")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -234,8 +259,8 @@ public class RocketComponentConfig extends JPanel { private JPanel overrideTab() { JPanel panel = new JPanel(new MigLayout("align 50% 20%, fillx, gap rel unrel", "[][65lp::][30lp::][]", "")); - - panel.add(new StyledLabel("Override the mass or center of gravity of the " + + //// Override the mass or center of gravity of the + panel.add(new StyledLabel(trans.get("RocketCompCfg.lbl.Overridemassorcenter") + " " + component.getComponentName() + ":", Style.BOLD), "spanx, wrap 20lp"); JCheckBox check; @@ -246,7 +271,8 @@ public class RocketComponentConfig extends JPanel { //// Mass bm = new BooleanModel(component, "MassOverridden"); check = new JCheckBox(bm); - check.setText("Override mass:"); + //// Override mass: + check.setText(trans.get("RocketCompCfg.checkbox.Overridemass")); panel.add(check, "growx 1, gapright 20lp"); DoubleModel m = new DoubleModel(component, "OverrideMass", UnitGroup.UNITS_MASS, 0); @@ -268,7 +294,8 @@ public class RocketComponentConfig extends JPanel { //// CG override bm = new BooleanModel(component, "CGOverridden"); check = new JCheckBox(bm); - check.setText("Override center of gravity:"); + //// Override center of gravity:" + check.setText(trans.get("RocketCompCfg.checkbox.Overridecenterofgrav")); panel.add(check, "growx 1, gapright 20lp"); m = new DoubleModel(component, "OverrideCGX", UnitGroup.UNITS_LENGTH, 0); @@ -305,12 +332,14 @@ public class RocketComponentConfig extends JPanel { // Override subcomponents checkbox bm = new BooleanModel(component, "OverrideSubcomponents"); check = new JCheckBox(bm); - check.setText("Override mass and CG of all subcomponents"); + //// Override mass and CG of all subcomponents + check.setText(trans.get("RocketCompCfg.checkbox.OverridemassandCG")); panel.add(check, "gap para, spanx, wrap para"); - - panel.add(new StyledLabel("The overridden mass does not include motors.
" + - "The center of gravity is measured from the front end of the " + + //// The overridden mass does not include motors.
+ panel.add(new StyledLabel(trans.get("RocketCompCfg.lbl.longB1") + + //// The center of gravity is measured from the front end of the + trans.get("RocketCompCfg.lbl.longB2") +" " + component.getComponentName().toLowerCase() + ".", -1), "spanx, wrap, gap para, height 0::30lp"); @@ -321,7 +350,8 @@ public class RocketComponentConfig extends JPanel { private JPanel commentTab() { JPanel panel = new JPanel(new MigLayout("fill")); - panel.add(new StyledLabel("Comments on the " + component.getComponentName() + ":", + //// Comments on the + panel.add(new StyledLabel(trans.get("RocketCompCfg.lbl.Commentsonthe") +" " + component.getComponentName() + ":", Style.BOLD), "wrap"); // TODO: LOW: Changes in comment from other sources not reflected in component @@ -342,10 +372,11 @@ public class RocketComponentConfig extends JPanel { private JPanel figureTab() { JPanel panel = new JPanel(new MigLayout("align 20% 20%")); - panel.add(new StyledLabel("Figure style:", Style.BOLD), "wrap para"); + //// Figure style: + panel.add(new StyledLabel(trans.get("RocketCompCfg.lbl.Figurestyle"), Style.BOLD), "wrap para"); - - panel.add(new JLabel("Component color:"), "gapleft para, gapright 10lp"); + //// Component color: + panel.add(new JLabel(trans.get("RocketCompCfg.lbl.Componentcolor")), "gapleft para, gapright 10lp"); colorButton = new JButton(new ColorIcon(component.getColor())); colorButton.addActionListener(new ActionListener() { @@ -356,7 +387,8 @@ public class RocketComponentConfig extends JPanel { c = Prefs.getDefaultColor(component.getClass()); } - c = JColorChooser.showDialog(tabbedPane, "Choose color", c); + //// Choose color + c = JColorChooser.showDialog(tabbedPane, trans.get("RocketCompCfg.lbl.Choosecolor"), c); if (c != null) { component.setColor(c); } @@ -364,7 +396,8 @@ public class RocketComponentConfig extends JPanel { }); panel.add(colorButton, "gapright 10lp"); - colorDefault = new JCheckBox("Use default color"); + //// Use default color + colorDefault = new JCheckBox(trans.get("RocketCompCfg.checkbox.Usedefaultcolor")); if (component.getColor() == null) colorDefault.setSelected(true); colorDefault.addActionListener(new ActionListener() { @@ -378,8 +411,8 @@ public class RocketComponentConfig extends JPanel { }); panel.add(colorDefault, "wrap para"); - - panel.add(new JLabel("Component line style:"), "gapleft para, gapright 10lp"); + //// Component line style: + panel.add(new JLabel(trans.get("RocketCompCfg.lbl.Complinestyle")), "gapleft para, gapright 10lp"); LineStyle[] list = new LineStyle[LineStyle.values().length + 1]; System.arraycopy(LineStyle.values(), 0, list, 1, LineStyle.values().length); @@ -388,8 +421,8 @@ public class RocketComponentConfig extends JPanel { list, "Default style")); panel.add(combo, "spanx 2, growx, wrap 50lp"); - - JButton button = new JButton("Save as default style"); + //// Save as default style + JButton button = new JButton(trans.get("RocketCompCfg.but.Saveasdefstyle")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -426,11 +459,13 @@ public class RocketComponentConfig extends JPanel { if (!(component instanceof NoseCone)) { sub = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::]", "")); - sub.setBorder(BorderFactory.createTitledBorder("Fore shoulder")); + //// Fore shoulder + sub.setBorder(BorderFactory.createTitledBorder(trans.get("RocketCompCfg.border.Foreshoulder"))); //// Radius - sub.add(new JLabel("Diameter:")); + //// Diameter: + sub.add(new JLabel(trans.get("RocketCompCfg.lbl.Diameter"))); m = new DoubleModel(component, "ForeShoulderRadius", 2, UnitGroup.UNITS_LENGTH, 0); m2 = new DoubleModel(component, "ForeRadius", 2, UnitGroup.UNITS_LENGTH); @@ -443,8 +478,8 @@ public class RocketComponentConfig extends JPanel { sub.add(new BasicSlider(m.getSliderModel(m0, m2)), "w 100lp, wrap"); - //// Length - sub.add(new JLabel("Length:")); + //// Length: + sub.add(new JLabel(trans.get("RocketCompCfg.lbl.Length"))); m = new DoubleModel(component, "ForeShoulderLength", UnitGroup.UNITS_LENGTH, 0); @@ -456,8 +491,8 @@ public class RocketComponentConfig extends JPanel { sub.add(new BasicSlider(m.getSliderModel(0, 0.02, 0.2)), "w 100lp, wrap"); - //// Thickness - sub.add(new JLabel("Thickness:")); + //// Thickness: + sub.add(new JLabel(trans.get("RocketCompCfg.lbl.Thickness"))); m = new DoubleModel(component, "ForeShoulderThickness", UnitGroup.UNITS_LENGTH, 0); m2 = new DoubleModel(component, "ForeShoulderRadius", UnitGroup.UNITS_LENGTH); @@ -473,8 +508,10 @@ public class RocketComponentConfig extends JPanel { //// Capped bm = new BooleanModel(component, "ForeShoulderCapped"); check = new JCheckBox(bm); - check.setText("End capped"); - check.setToolTipText("Whether the end of the shoulder is capped."); + //// End capped + check.setText(trans.get("RocketCompCfg.checkbox.Endcapped")); + //// Whether the end of the shoulder is capped. + check.setToolTipText(trans.get("RocketCompCfg.ttip.Endcapped")); sub.add(check, "spanx"); @@ -486,13 +523,16 @@ public class RocketComponentConfig extends JPanel { sub = new JPanel(new MigLayout("gap rel unrel", "[][65lp::][30lp::]", "")); if (component instanceof NoseCone) - sub.setBorder(BorderFactory.createTitledBorder("Nose cone shoulder")); + //// Nose cone shoulder + sub.setBorder(BorderFactory.createTitledBorder(trans.get("RocketCompCfg.title.Noseconeshoulder"))); else - sub.setBorder(BorderFactory.createTitledBorder("Aft shoulder")); + //// Aft shoulder + sub.setBorder(BorderFactory.createTitledBorder(trans.get("RocketCompCfg.title.Aftshoulder"))); //// Radius - sub.add(new JLabel("Diameter:")); + //// Diameter: + sub.add(new JLabel(trans.get("RocketCompCfg.lbl.Diameter"))); m = new DoubleModel(component, "AftShoulderRadius", 2, UnitGroup.UNITS_LENGTH, 0); m2 = new DoubleModel(component, "AftRadius", 2, UnitGroup.UNITS_LENGTH); @@ -505,8 +545,8 @@ public class RocketComponentConfig extends JPanel { sub.add(new BasicSlider(m.getSliderModel(m0, m2)), "w 100lp, wrap"); - //// Length - sub.add(new JLabel("Length:")); + //// Length: + sub.add(new JLabel(trans.get("RocketCompCfg.lbl.Length"))); m = new DoubleModel(component, "AftShoulderLength", UnitGroup.UNITS_LENGTH, 0); @@ -518,8 +558,8 @@ public class RocketComponentConfig extends JPanel { sub.add(new BasicSlider(m.getSliderModel(0, 0.02, 0.2)), "w 100lp, wrap"); - //// Thickness - sub.add(new JLabel("Thickness:")); + //// Thickness: + sub.add(new JLabel(trans.get("RocketCompCfg.lbl.Thickness"))); m = new DoubleModel(component, "AftShoulderThickness", UnitGroup.UNITS_LENGTH, 0); m2 = new DoubleModel(component, "AftShoulderRadius", UnitGroup.UNITS_LENGTH); @@ -535,8 +575,10 @@ public class RocketComponentConfig extends JPanel { //// Capped bm = new BooleanModel(component, "AftShoulderCapped"); check = new JCheckBox(bm); - check.setText("End capped"); - check.setToolTipText("Whether the end of the shoulder is capped."); + //// End capped + check.setText(trans.get("RocketCompCfg.checkbox.Endcapped")); + //// Whether the end of the shoulder is capped. + check.setToolTipText(trans.get("RocketCompCfg.ttip.Endcapped")); sub.add(check, "spanx"); diff --git a/src/net/sf/openrocket/gui/configdialog/RocketConfig.java b/src/net/sf/openrocket/gui/configdialog/RocketConfig.java index cf62fd08..5617fa09 100644 --- a/src/net/sf/openrocket/gui/configdialog/RocketConfig.java +++ b/src/net/sf/openrocket/gui/configdialog/RocketConfig.java @@ -11,11 +11,14 @@ import javax.swing.JScrollPane; import javax.swing.JTextArea; import net.miginfocom.swing.MigLayout; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.rocketcomponent.Rocket; import net.sf.openrocket.rocketcomponent.RocketComponent; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.util.GUIUtil; public class RocketConfig extends RocketComponentConfig { + private static final Translator trans = Application.getTranslator(); private TextFieldListener textFieldListener; @@ -32,11 +35,12 @@ public class RocketConfig extends RocketComponentConfig { this.removeAll(); setLayout(new MigLayout("fill")); - this.add(new JLabel("Design name:"), "top, pad 4lp, gapright 10lp"); + //// Design name: + this.add(new JLabel(trans.get("RocketCfg.lbl.Designname")), "top, pad 4lp, gapright 10lp"); this.add(componentNameField, "growx, wrap para"); - - this.add(new JLabel("Designer:"), "top, pad 4lp, gapright 10lp"); + //// Designer: + this.add(new JLabel(trans.get("RocketCfg.lbl.Designer")), "top, pad 4lp, gapright 10lp"); textFieldListener = new TextFieldListener(); designerTextArea = new JTextArea(rocket.getDesigner()); @@ -47,12 +51,12 @@ public class RocketConfig extends RocketComponentConfig { designerTextArea.addFocusListener(textFieldListener); this.add(new JScrollPane(designerTextArea), "wmin 400lp, height 60lp:60lp:, grow 30, wrap para"); - - this.add(new JLabel("Comments:"), "top, pad 4lp, gapright 10lp"); + //// Comments: + this.add(new JLabel(trans.get("RocketCfg.lbl.Comments")), "top, pad 4lp, gapright 10lp"); this.add(new JScrollPane(commentTextArea), "wmin 400lp, height 155lp:155lp:, grow 100, wrap para"); - - this.add(new JLabel("Revision history:"), "top, pad 4lp, gapright 10lp"); + //// Revision history: + this.add(new JLabel(trans.get("RocketCfg.lbl.Material")), "top, pad 4lp, gapright 10lp"); revisionTextArea = new JTextArea(rocket.getRevision()); revisionTextArea.setLineWrap(true); revisionTextArea.setWrapStyleWord(true); diff --git a/src/net/sf/openrocket/gui/configdialog/ShockCordConfig.java b/src/net/sf/openrocket/gui/configdialog/ShockCordConfig.java index e3b1ba53..0a21fc4c 100644 --- a/src/net/sf/openrocket/gui/configdialog/ShockCordConfig.java +++ b/src/net/sf/openrocket/gui/configdialog/ShockCordConfig.java @@ -12,12 +12,14 @@ import net.sf.openrocket.gui.adaptors.DoubleModel; import net.sf.openrocket.gui.adaptors.EnumModel; import net.sf.openrocket.gui.components.BasicSlider; import net.sf.openrocket.gui.components.UnitSelector; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.material.Material; import net.sf.openrocket.rocketcomponent.RocketComponent; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.unit.UnitGroup; public class ShockCordConfig extends RocketComponentConfig { - + private static final Translator trans = Application.getTranslator(); public ShockCordConfig(RocketComponent component) { super(component); @@ -32,7 +34,8 @@ public class ShockCordConfig extends RocketComponentConfig { ////// Left side // Cord length - label = new JLabel("Shock cord length"); + //// Shock cord length + label = new JLabel(trans.get("ShockCordCfg.lbl.Shockcordlength")); panel.add(label); m = new DoubleModel(component,"CordLength",UnitGroup.UNITS_LENGTH,0); @@ -46,7 +49,8 @@ public class ShockCordConfig extends RocketComponentConfig { // Material - materialPanel(panel, Material.Type.LINE, "Shock cord material:", null); + //// Shock cord material: + materialPanel(panel, Material.Type.LINE, trans.get("ShockCordCfg.lbl.Shockcordmaterial"), null); @@ -56,8 +60,8 @@ public class ShockCordConfig extends RocketComponentConfig { //// Position - - panel2.add(new JLabel("Position relative to:")); + //// Position relative to: + panel2.add(new JLabel(trans.get("ShockCordCfg.lbl.Posrelativeto"))); JComboBox combo = new JComboBox( new EnumModel(component, "RelativePosition", @@ -69,7 +73,8 @@ public class ShockCordConfig extends RocketComponentConfig { })); panel2.add(combo,"spanx, growx, wrap"); - panel2.add(new JLabel("plus"),"right"); + //// plus + panel2.add(new JLabel(trans.get("ShockCordCfg.lbl.plus")),"right"); m = new DoubleModel(component,"PositionValue",UnitGroup.UNITS_LENGTH); spin = new JSpinner(m.getSpinnerModel()); @@ -84,7 +89,8 @@ public class ShockCordConfig extends RocketComponentConfig { //// Spatial length - panel2.add(new JLabel("Packed length:")); + //// Packed length: + panel2.add(new JLabel(trans.get("ShockCordCfg.lbl.Packedlength"))); m = new DoubleModel(component,"Length",UnitGroup.UNITS_LENGTH,0); @@ -97,7 +103,8 @@ public class ShockCordConfig extends RocketComponentConfig { //// Tube diameter - panel2.add(new JLabel("Packed diameter:")); + //// Packed diameter: + panel2.add(new JLabel(trans.get("ShockCordCfg.lbl.Packeddiam"))); DoubleModel od = new DoubleModel(component,"Radius",2,UnitGroup.UNITS_LENGTH,0); // Diameter = 2*Radius @@ -111,8 +118,8 @@ public class ShockCordConfig extends RocketComponentConfig { - - tabbedPane.insertTab("General", null, panel, "General properties", 0); + //// General and General properties + tabbedPane.insertTab(trans.get("ShockCordCfg.tab.General"), null, panel, trans.get("ShockCordCfg.tab.ttip.General"), 0); // tabbedPane.insertTab("Radial position", null, positionTab(), // "Radial position configuration", 1); tabbedPane.setSelectedIndex(0); diff --git a/src/net/sf/openrocket/gui/configdialog/SleeveConfig.java b/src/net/sf/openrocket/gui/configdialog/SleeveConfig.java index fbb24806..67160b81 100644 --- a/src/net/sf/openrocket/gui/configdialog/SleeveConfig.java +++ b/src/net/sf/openrocket/gui/configdialog/SleeveConfig.java @@ -3,19 +3,28 @@ package net.sf.openrocket.gui.configdialog; import javax.swing.JPanel; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.rocketcomponent.RocketComponent; +import net.sf.openrocket.startup.Application; public class SleeveConfig extends RingComponentConfig { - + private static final Translator trans = Application.getTranslator(); + public SleeveConfig(RocketComponent c) { super(c); JPanel tab; - - tab = generalTab("Outer diameter:", "Inner diameter:", "Wall thickness:", "Length:"); - tabbedPane.insertTab("General", null, tab, "General properties", 0); + //// Outer diameter: + //// Inner diameter: + //// Wall thickness: + //// Length: + tab = generalTab(trans.get("SleeveCfg.tab.Outerdiam"), trans.get("SleeveCfg.tab.Innerdiam"), + trans.get("SleeveCfg.tab.Wallthickness"), trans.get("SleeveCfg.tab.Length")); + //// General and General properties + tabbedPane.insertTab(trans.get("SleeveCfg.tab.General"), null, tab, + trans.get("SleeveCfg.tab.Generalproperties"), 0); tabbedPane.setSelectedIndex(0); } diff --git a/src/net/sf/openrocket/gui/configdialog/StreamerConfig.java b/src/net/sf/openrocket/gui/configdialog/StreamerConfig.java index 5f94bbb9..42648637 100644 --- a/src/net/sf/openrocket/gui/configdialog/StreamerConfig.java +++ b/src/net/sf/openrocket/gui/configdialog/StreamerConfig.java @@ -20,14 +20,17 @@ import net.sf.openrocket.gui.components.BasicSlider; import net.sf.openrocket.gui.components.HtmlLabel; import net.sf.openrocket.gui.components.StyledLabel; import net.sf.openrocket.gui.components.UnitSelector; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.material.Material; import net.sf.openrocket.rocketcomponent.MassComponent; import net.sf.openrocket.rocketcomponent.RocketComponent; import net.sf.openrocket.rocketcomponent.MotorMount.IgnitionEvent; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.unit.UnitGroup; public class StreamerConfig extends RecoveryDeviceConfig { - + private static final Translator trans = Application.getTranslator(); + public StreamerConfig(final RocketComponent component) { super(component); @@ -36,8 +39,8 @@ public class StreamerConfig extends RecoveryDeviceConfig { JPanel panel = new JPanel(new MigLayout("gap rel unrel","[][65lp::][30lp::][]","")); - - panel.add(new JLabel("Strip length:")); + //// Strip length: + panel.add(new JLabel(trans.get("StreamerCfg.lbl.Striplength"))); DoubleModel m = new DoubleModel(component,"StripLength",UnitGroup.UNITS_LENGTH,0); @@ -47,8 +50,8 @@ public class StreamerConfig extends RecoveryDeviceConfig { panel.add(new UnitSelector(m),"growx"); panel.add(new BasicSlider(m.getSliderModel(0, 0.6, 1.5)),"w 100lp, wrap"); - - panel.add(new JLabel("Strip width:")); + //// Strip width: + panel.add(new JLabel(trans.get("StreamerCfg.lbl.Stripwidth"))); m = new DoubleModel(component,"StripWidth",UnitGroup.UNITS_LENGTH,0); @@ -60,8 +63,8 @@ public class StreamerConfig extends RecoveryDeviceConfig { - - panel.add(new JLabel("Strip area:")); + //// Strip area: + panel.add(new JLabel(trans.get("StreamerCfg.lbl.Striparea"))); m = new DoubleModel(component,"Area",UnitGroup.UNITS_AREA,0); @@ -71,8 +74,8 @@ public class StreamerConfig extends RecoveryDeviceConfig { panel.add(new UnitSelector(m),"growx"); panel.add(new BasicSlider(m.getSliderModel(0, 0.04, 0.25)),"w 100lp, wrap"); - - panel.add(new JLabel("Aspect ratio:")); + //// Aspect ratio: + panel.add(new JLabel(trans.get("StreamerCfg.lbl.Aspectratio"))); m = new DoubleModel(component,"AspectRatio",UnitGroup.UNITS_NONE,0); @@ -83,20 +86,24 @@ public class StreamerConfig extends RecoveryDeviceConfig { panel.add(new BasicSlider(m.getSliderModel(2, 15)),"skip, w 100lp, wrap 20lp"); - - panel.add(new JLabel("Material:")); + //// Material: + panel.add(new JLabel(trans.get("StreamerCfg.lbl.Material"))); JComboBox combo = new JComboBox(new MaterialModel(panel, component, Material.Type.SURFACE)); - combo.setToolTipText("The component material affects the weight of the component."); + //// The component material affects the weight of the component. + combo.setToolTipText(trans.get("StreamerCfg.combo.ttip.MaterialModel")); panel.add(combo,"spanx 3, growx, wrap 20lp"); // CD - JLabel label = new HtmlLabel("Drag coefficient CD:"); - String tip = "The drag coefficient relative to the total area of the streamer.
" + - "A larger drag coefficient yields a slowed descent rate."; + //// Drag coefficient CD: + JLabel label = new HtmlLabel(trans.get("StreamerCfg.lbl.longA1")); + //// The drag coefficient relative to the total area of the streamer.
+ String tip = trans.get("StreamerCfg.lbl.longB1") + + //// "A larger drag coefficient yields a slowed descent rate. + trans.get("StreamerCfg.lbl.longB2"); label.setToolTipText(tip); panel.add(label); @@ -108,10 +115,12 @@ public class StreamerConfig extends RecoveryDeviceConfig { panel.add(spin,"growx"); JCheckBox check = new JCheckBox(m.getAutomaticAction()); - check.setText("Automatic"); + //// Automatic + check.setText(trans.get("StreamerCfg.lbl.Automatic")); panel.add(check,"skip, span, wrap"); - panel.add(new StyledLabel("The drag coefficient is relative to the area of the streamer.", + //// The drag coefficient is relative to the area of the streamer. + panel.add(new StyledLabel(trans.get("StreamerCfg.lbl.longC1"), -2), "span, wrap"); @@ -123,8 +132,8 @@ public class StreamerConfig extends RecoveryDeviceConfig { //// Position - - panel.add(new JLabel("Position relative to:")); + //// Position relative to: + panel.add(new JLabel(trans.get("StreamerCfg.lbl.Posrelativeto"))); combo = new JComboBox( new EnumModel(component, "RelativePosition", @@ -136,7 +145,8 @@ public class StreamerConfig extends RecoveryDeviceConfig { })); panel.add(combo,"spanx, growx, wrap"); - panel.add(new JLabel("plus"),"right"); + //// plus + panel.add(new JLabel(trans.get("StreamerCfg.lbl.plus")),"right"); m = new DoubleModel(component,"PositionValue",UnitGroup.UNITS_LENGTH); spin = new JSpinner(m.getSpinnerModel()); @@ -150,8 +160,8 @@ public class StreamerConfig extends RecoveryDeviceConfig { "w 100lp, wrap"); - //// Spatial length - panel.add(new JLabel("Packed length:")); + //// Spatial length: + panel.add(new JLabel(trans.get("StreamerCfg.lbl.Packedlength"))); m = new DoubleModel(component,"Length",UnitGroup.UNITS_LENGTH,0); @@ -164,7 +174,8 @@ public class StreamerConfig extends RecoveryDeviceConfig { //// Tube diameter - panel.add(new JLabel("Packed diameter:")); + //// Packed diameter: + panel.add(new JLabel(trans.get("StreamerCfg.lbl.Packeddiam"))); DoubleModel od = new DoubleModel(component,"Radius",2,UnitGroup.UNITS_LENGTH,0); // Diameter = 2*Radius @@ -178,24 +189,26 @@ public class StreamerConfig extends RecoveryDeviceConfig { //// Deployment - - panel.add(new JLabel("Deploys at:"),""); + //// Deploys at: + panel.add(new JLabel(trans.get("StreamerCfg.lbl.Deploysat")),""); combo = new JComboBox(new EnumModel(component, "DeployEvent")); panel.add(combo,"spanx 3, growx, wrap"); // ... and delay - panel.add(new JLabel("plus"),"right"); + //// plus + panel.add(new JLabel(trans.get("StreamerCfg.lbl.plus")),"right"); m = new DoubleModel(component,"DeployDelay",0); spin = new JSpinner(m.getSpinnerModel()); spin.setEditor(new SpinnerEditor(spin)); panel.add(spin,"spanx, split"); - panel.add(new JLabel("seconds"),"wrap paragraph"); + //// seconds + panel.add(new JLabel(trans.get("StreamerCfg.lbl.seconds")),"wrap paragraph"); - // Altitude - label = new JLabel("Altitude:"); + // Altitude: + label = new JLabel(trans.get("StreamerCfg.lbl.Altitude")); altitudeComponents.add(label); panel.add(label); @@ -216,10 +229,13 @@ public class StreamerConfig extends RecoveryDeviceConfig { primary.add(panel, "grow"); updateFields(); - - tabbedPane.insertTab("General", null, primary, "General properties", 0); - tabbedPane.insertTab("Radial position", null, positionTab(), - "Radial position configuration", 1); + + //// General and General properties + tabbedPane.insertTab(trans.get("StreamerCfg.tab.General"), null, primary, + trans.get("StreamerCfg.tab.ttip.General"), 0); + //// Radial position and Radial position configuration + tabbedPane.insertTab(trans.get("StreamerCfg.tab.Radialpos"), null, positionTab(), + trans.get("StreamerCfg.tab.ttip.Radialpos"), 1); tabbedPane.setSelectedIndex(0); } @@ -231,7 +247,8 @@ public class StreamerConfig extends RecoveryDeviceConfig { JPanel panel = new JPanel(new MigLayout("gap rel unrel","[][65lp::][30lp::]","")); //// Radial position - panel.add(new JLabel("Radial distance:")); + //// Radial distance: + panel.add(new JLabel(trans.get("StreamerCfg.lbl.Radialdistance"))); DoubleModel m = new DoubleModel(component,"RadialPosition",UnitGroup.UNITS_LENGTH,0); @@ -244,7 +261,8 @@ public class StreamerConfig extends RecoveryDeviceConfig { //// Radial direction - panel.add(new JLabel("Radial direction:")); + //// Radial direction: + panel.add(new JLabel(trans.get("StreamerCfg.lbl.Radialdirection"))); m = new DoubleModel(component,"RadialDirection",UnitGroup.UNITS_ANGLE,0); @@ -257,7 +275,7 @@ public class StreamerConfig extends RecoveryDeviceConfig { //// Reset button - JButton button = new JButton("Reset"); + JButton button = new JButton(trans.get("StreamerCfg.but.Reset")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { diff --git a/src/net/sf/openrocket/gui/configdialog/ThicknessRingComponentConfig.java b/src/net/sf/openrocket/gui/configdialog/ThicknessRingComponentConfig.java index 2230979b..2b1bb6f3 100644 --- a/src/net/sf/openrocket/gui/configdialog/ThicknessRingComponentConfig.java +++ b/src/net/sf/openrocket/gui/configdialog/ThicknessRingComponentConfig.java @@ -3,19 +3,30 @@ package net.sf.openrocket.gui.configdialog; import javax.swing.JPanel; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.rocketcomponent.RocketComponent; +import net.sf.openrocket.startup.Application; public class ThicknessRingComponentConfig extends RingComponentConfig { - + private static final Translator trans = Application.getTranslator(); + public ThicknessRingComponentConfig(RocketComponent c) { super(c); JPanel tab; - tab = generalTab("Outer diameter:", "Inner diameter:", "Wall thickness:", "Length:"); - tabbedPane.insertTab("General", null, tab, "General properties", 0); + //// Outer diameter: + //// Inner diameter: + //// Wall thickness: + //// Length: + tab = generalTab(trans.get("ThicknessRingCompCfg.tab.Outerdiam"), + trans.get("ThicknessRingCompCfg.tab.Innerdiam"), + trans.get("ThicknessRingCompCfg.tab.Wallthickness"), trans.get("ThicknessRingCompCfg.tab.Length")); + //// General and General properties + tabbedPane.insertTab(trans.get("ThicknessRingCompCfg.tab.General"), null, tab, + trans.get("ThicknessRingCompCfg.tab.Generalprop"), 0); tabbedPane.setSelectedIndex(0); } diff --git a/src/net/sf/openrocket/gui/configdialog/TransitionConfig.java b/src/net/sf/openrocket/gui/configdialog/TransitionConfig.java index 8f4660b1..c512d4dd 100644 --- a/src/net/sf/openrocket/gui/configdialog/TransitionConfig.java +++ b/src/net/sf/openrocket/gui/configdialog/TransitionConfig.java @@ -17,13 +17,16 @@ import net.sf.openrocket.gui.adaptors.DoubleModel; import net.sf.openrocket.gui.components.BasicSlider; import net.sf.openrocket.gui.components.DescriptionArea; import net.sf.openrocket.gui.components.UnitSelector; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.material.Material; import net.sf.openrocket.rocketcomponent.RocketComponent; import net.sf.openrocket.rocketcomponent.Transition; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.unit.UnitGroup; public class TransitionConfig extends RocketComponentConfig { + private static final Translator trans = Application.getTranslator(); private JComboBox typeBox; //private JLabel description; @@ -49,8 +52,8 @@ public class TransitionConfig extends RocketComponentConfig { //// Shape selection - - panel.add(new JLabel("Transition shape:")); + //// Transition shape: + panel.add(new JLabel(trans.get("TransitionCfg.lbl.Transitionshape"))); Transition.Shape selected = ((Transition)component).getType(); Transition.Shape[] typeList = Transition.Shape.values(); @@ -68,14 +71,15 @@ public class TransitionConfig extends RocketComponentConfig { }); panel.add(typeBox,"span, split 2"); - - checkbox = new JCheckBox(new BooleanModel(component,"Clipped")); - checkbox.setText("Clipped"); + //// Clipped + checkbox = new JCheckBox(new BooleanModel(component,trans.get("TransitionCfg.checkbox.Clipped"))); + //// Clipped + checkbox.setText(trans.get("TransitionCfg.checkbox.Clipped")); panel.add(checkbox,"wrap"); - //// Shape parameter - shapeLabel = new JLabel("Shape parameter:"); + //// Shape parameter: + shapeLabel = new JLabel(trans.get("TransitionCfg.lbl.Shapeparam")); panel.add(shapeLabel); m = new DoubleModel(component,"ShapeParameter"); @@ -93,7 +97,8 @@ public class TransitionConfig extends RocketComponentConfig { //// Length - panel.add(new JLabel("Transition length:")); + //// Transition length: + panel.add(new JLabel(trans.get("TransitionCfg.lbl.Transitionlength"))); m = new DoubleModel(component,"Length",UnitGroup.UNITS_LENGTH,0); @@ -106,7 +111,8 @@ public class TransitionConfig extends RocketComponentConfig { //// Transition diameter 1 - panel.add(new JLabel("Fore diameter:")); + //// Fore diameter: + panel.add(new JLabel(trans.get("TransitionCfg.lbl.Forediam"))); DoubleModel od = new DoubleModel(component,"ForeRadius",2,UnitGroup.UNITS_LENGTH,0); // Diameter = 2*Radius @@ -119,12 +125,14 @@ public class TransitionConfig extends RocketComponentConfig { panel.add(new BasicSlider(od.getSliderModel(0, 0.04, 0.2)),"w 100lp, wrap 0px"); checkbox = new JCheckBox(od.getAutomaticAction()); - checkbox.setText("Automatic"); + //// Automatic + checkbox.setText(trans.get("TransitionCfg.checkbox.Automatic")); panel.add(checkbox,"skip, span 2, wrap"); //// Transition diameter 2 - panel.add(new JLabel("Aft diameter:")); + //// Aft diameter: + panel.add(new JLabel(trans.get("TransitionCfg.lbl.Aftdiam"))); od = new DoubleModel(component,"AftRadius",2,UnitGroup.UNITS_LENGTH,0); // Diameter = 2*Radius @@ -137,12 +145,13 @@ public class TransitionConfig extends RocketComponentConfig { panel.add(new BasicSlider(od.getSliderModel(0, 0.04, 0.2)),"w 100lp, wrap 0px"); checkbox = new JCheckBox(od.getAutomaticAction()); - checkbox.setText("Automatic"); + //// Automatic + checkbox.setText(trans.get("TransitionCfg.checkbox.Automatic")); panel.add(checkbox,"skip, span 2, wrap"); - //// Wall thickness - panel.add(new JLabel("Wall thickness:")); + //// Wall thickness: + panel.add(new JLabel(trans.get("TransitionCfg.lbl.Wallthickness"))); m = new DoubleModel(component,"Thickness",UnitGroup.UNITS_LENGTH,0); @@ -153,9 +162,10 @@ public class TransitionConfig extends RocketComponentConfig { panel.add(new UnitSelector(m),"growx"); panel.add(new BasicSlider(m.getSliderModel(0,0.01)),"w 100lp, wrap 0px"); - - checkbox = new JCheckBox(new BooleanModel(component,"Filled")); - checkbox.setText("Filled"); + //// Filled + checkbox = new JCheckBox(new BooleanModel(component,trans.get("TransitionCfg.checkbox.Filled"))); + //// Filled + checkbox.setText(trans.get("TransitionCfg.checkbox.Filled")); panel.add(checkbox,"skip, span 2, wrap"); @@ -176,9 +186,12 @@ public class TransitionConfig extends RocketComponentConfig { materialPanel(panel2, Material.Type.BULK); panel.add(panel2, "cell 4 0, gapleft paragraph, aligny 0%, spany"); - - tabbedPane.insertTab("General", null, panel, "General properties", 0); - tabbedPane.insertTab("Shoulder", null, shoulderTab(), "Shoulder properties", 1); + //// General and General properties + tabbedPane.insertTab(trans.get("TransitionCfg.tab.General"), null, panel, + trans.get("TransitionCfg.tab.Generalproperties"), 0); + //// Shoulder and Shoulder properties + tabbedPane.insertTab(trans.get("TransitionCfg.tab.Shoulder"), null, shoulderTab(), + trans.get("TransitionCfg.tab.Shoulderproperties"), 1); tabbedPane.setSelectedIndex(0); } diff --git a/src/net/sf/openrocket/gui/configdialog/TrapezoidFinSetConfig.java b/src/net/sf/openrocket/gui/configdialog/TrapezoidFinSetConfig.java index 92081be6..d4482de1 100644 --- a/src/net/sf/openrocket/gui/configdialog/TrapezoidFinSetConfig.java +++ b/src/net/sf/openrocket/gui/configdialog/TrapezoidFinSetConfig.java @@ -15,15 +15,18 @@ import net.sf.openrocket.gui.adaptors.EnumModel; import net.sf.openrocket.gui.adaptors.IntegerModel; import net.sf.openrocket.gui.components.BasicSlider; import net.sf.openrocket.gui.components.UnitSelector; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.material.Material; import net.sf.openrocket.rocketcomponent.FinSet; import net.sf.openrocket.rocketcomponent.RocketComponent; import net.sf.openrocket.rocketcomponent.TrapezoidFinSet; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.unit.UnitGroup; public class TrapezoidFinSetConfig extends FinSetConfig { - + private static final Translator trans = Application.getTranslator(); + public TrapezoidFinSetConfig(final RocketComponent component) { super(component); @@ -36,22 +39,26 @@ public class TrapezoidFinSetConfig extends FinSetConfig { JPanel panel = new JPanel(new MigLayout("gap rel unrel","[][65lp::][30lp::]","")); - //// Number of fins - JLabel label = new JLabel("Number of fins:"); - label.setToolTipText("The number of fins in the fin set."); + //// Number of fins: + JLabel label = new JLabel(trans.get("TrapezoidFinSetCfg.lbl.Nbroffins")); + //// The number of fins in the fin set. + label.setToolTipText(trans.get("TrapezoidFinSetCfg.lbl.ttip.Nbroffins")); panel.add(label); IntegerModel im = new IntegerModel(component,"FinCount",1,8); spin = new JSpinner(im.getSpinnerModel()); spin.setEditor(new SpinnerEditor(spin)); - spin.setToolTipText("The number of fins in the fin set."); + //// The number of fins in the fin set. + spin.setToolTipText(trans.get("TrapezoidFinSetCfg.lbl.ttip.Nbroffins")); panel.add(spin,"growx, wrap"); //// Base rotation - label = new JLabel("Fin rotation:"); - label.setToolTipText("The angle of the first fin in the fin set."); + //// Fin rotation: + label = new JLabel(trans.get("TrapezoidFinSetCfg.lbl.Finrotation")); + //// The angle of the first fin in the fin set. + label.setToolTipText(trans.get("TrapezoidFinSetCfg.lbl.ttip.Finrotation")); panel.add(label); m = new DoubleModel(component, "BaseRotation", UnitGroup.UNITS_ANGLE,-Math.PI,Math.PI); @@ -64,10 +71,10 @@ public class TrapezoidFinSetConfig extends FinSetConfig { panel.add(new BasicSlider(m.getSliderModel(-Math.PI,Math.PI)),"w 100lp, wrap"); - //// Fin cant - label = new JLabel("Fin cant:"); - label.setToolTipText("The angle that the fins are canted with respect to the rocket " + - "body."); + //// Fin cant: + label = new JLabel(trans.get("TrapezoidFinSetCfg.lbl.Fincant")); + //// The angle that the fins are canted with respect to the rocket + label.setToolTipText(trans.get("TrapezoidFinSetCfg.lbl.ttip.Fincant")); panel.add(label); m = new DoubleModel(component, "CantAngle", UnitGroup.UNITS_ANGLE, @@ -82,8 +89,8 @@ public class TrapezoidFinSetConfig extends FinSetConfig { "w 100lp, wrap"); - //// Root chord - panel.add(new JLabel("Root chord:")); + //// Root chord: + panel.add(new JLabel(trans.get("TrapezoidFinSetCfg.lbl.Rootchord"))); m = new DoubleModel(component,"RootChord",UnitGroup.UNITS_LENGTH,0); @@ -96,8 +103,8 @@ public class TrapezoidFinSetConfig extends FinSetConfig { - //// Tip chord - panel.add(new JLabel("Tip chord:")); + //// Tip chord: + panel.add(new JLabel(trans.get("TrapezoidFinSetCfg.lbl.Tipchord"))); m = new DoubleModel(component,"TipChord",UnitGroup.UNITS_LENGTH,0); @@ -109,8 +116,8 @@ public class TrapezoidFinSetConfig extends FinSetConfig { panel.add(new BasicSlider(m.getSliderModel(0,0.05,0.2)),"w 100lp, wrap"); - //// Height - panel.add(new JLabel("Height:")); + //// Height: + panel.add(new JLabel(trans.get("TrapezoidFinSetCfg.lbl.Height"))); m = new DoubleModel(component,"Height",UnitGroup.UNITS_LENGTH,0); @@ -123,8 +130,8 @@ public class TrapezoidFinSetConfig extends FinSetConfig { - //// Sweep - panel.add(new JLabel("Sweep length:")); + //// Sweep length: + panel.add(new JLabel(trans.get("TrapezoidFinSetCfg.lbl.Sweeplength"))); m = new DoubleModel(component,"Sweep",UnitGroup.UNITS_LENGTH); @@ -140,8 +147,8 @@ public class TrapezoidFinSetConfig extends FinSetConfig { panel.add(new BasicSlider(m.getSliderModel(tc,rc)),"w 100lp, wrap"); - //// Sweep angle - panel.add(new JLabel("Sweep angle:")); + //// Sweep angle: + panel.add(new JLabel(trans.get("TrapezoidFinSetCfg.lbl.Sweepangle"))); m = new DoubleModel(component, "SweepAngle",UnitGroup.UNITS_ANGLE, -TrapezoidFinSet.MAX_SWEEP_ANGLE,TrapezoidFinSet.MAX_SWEEP_ANGLE); @@ -168,15 +175,15 @@ public class TrapezoidFinSetConfig extends FinSetConfig { - //// Cross section - panel.add(new JLabel("Fin cross section:")); + //// Fin cross section: + panel.add(new JLabel(trans.get("TrapezoidFinSetCfg.lbl.FincrossSection"))); combo = new JComboBox( new EnumModel(component,"CrossSection")); panel.add(combo,"span, growx, wrap"); - //// Thickness - panel.add(new JLabel("Thickness:")); + //// Thickness: + panel.add(new JLabel(trans.get("TrapezoidFinSetCfg.lbl.Thickness"))); m = new DoubleModel(component,"Thickness",UnitGroup.UNITS_LENGTH,0); @@ -189,8 +196,8 @@ public class TrapezoidFinSetConfig extends FinSetConfig { //// Position - - panel.add(new JLabel("Position relative to:")); + //// Position relative to: + panel.add(new JLabel(trans.get("TrapezoidFinSetCfg.lbl.Posrelativeto"))); combo = new JComboBox( new EnumModel(component, "RelativePosition", @@ -201,8 +208,8 @@ public class TrapezoidFinSetConfig extends FinSetConfig { RocketComponent.Position.ABSOLUTE })); panel.add(combo,"spanx, growx, wrap"); - - panel.add(new JLabel("plus"),"right"); + //// plus + panel.add(new JLabel(trans.get("TrapezoidFinSetCfg.lbl.plus")),"right"); m = new DoubleModel(component,"PositionValue",UnitGroup.UNITS_LENGTH); spin = new JSpinner(m.getSpinnerModel()); @@ -225,8 +232,9 @@ public class TrapezoidFinSetConfig extends FinSetConfig { mainPanel.add(panel,"aligny 20%"); - - tabbedPane.insertTab("General", null, mainPanel, "General properties", 0); + //// General and General properties + tabbedPane.insertTab(trans.get("TrapezoidFinSetCfg.tab.General"), null, mainPanel, + trans.get("TrapezoidFinSetCfg.tab.Generalproperties"), 0); tabbedPane.setSelectedIndex(0); addFinSetButtons(); diff --git a/src/net/sf/openrocket/gui/dialogs/AboutDialog.java b/src/net/sf/openrocket/gui/dialogs/AboutDialog.java index 88d78e5f..f65749a2 100644 --- a/src/net/sf/openrocket/gui/dialogs/AboutDialog.java +++ b/src/net/sf/openrocket/gui/dialogs/AboutDialog.java @@ -12,6 +12,8 @@ import javax.swing.JPanel; import net.miginfocom.swing.MigLayout; import net.sf.openrocket.gui.components.StyledLabel; import net.sf.openrocket.gui.components.URLLabel; +import net.sf.openrocket.l10n.Translator; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.util.Chars; import net.sf.openrocket.util.GUIUtil; import net.sf.openrocket.util.Icons; @@ -20,8 +22,9 @@ import net.sf.openrocket.util.Prefs; public class AboutDialog extends JDialog { public static final String OPENROCKET_URL = "http://openrocket.sourceforge.net/"; + private static final Translator trans = Application.getTranslator(); + - public AboutDialog(JFrame parent) { super(parent, true); @@ -29,27 +32,37 @@ public class AboutDialog extends JDialog { JPanel panel = new JPanel(new MigLayout("fill")); - panel.add(new JLabel(Icons.loadImageIcon("pix/icon/icon-about.png", "OpenRocket")), - "spany 5, top"); + panel.add(new JLabel(Icons.loadImageIcon("pix/icon/icon-about.png", "OpenRocket")), + "spany, top"); panel.add(new StyledLabel("OpenRocket", 20), "ax 50%, growy, wrap para"); panel.add(new StyledLabel("Version " + version, 3), "ax 50%, growy, wrap rel"); -// String source = Prefs.getBuildSource(); -// if (!Prefs.DEFAULT_BUILD_SOURCE.equalsIgnoreCase(source)) { -// panel.add(new StyledLabel("Distributed by " + source, -1), -// "ax 50%, growy, wrap para"); -// } else { -// panel.add(new StyledLabel(" ", -1), "ax 50%, growy, wrap para"); -// } + // String source = Prefs.getBuildSource(); + // if (!Prefs.DEFAULT_BUILD_SOURCE.equalsIgnoreCase(source)) { + // panel.add(new StyledLabel("Distributed by " + source, -1), + // "ax 50%, growy, wrap para"); + // } else { + // panel.add(new StyledLabel(" ", -1), "ax 50%, growy, wrap para"); + // } - panel.add(new StyledLabel("Copyright " + Chars.COPY +" 2007-2010 Sampo Niskanen"), + panel.add(new StyledLabel("Copyright " + Chars.COPY + " 2007-2010 Sampo Niskanen"), "ax 50%, growy, wrap para"); panel.add(new URLLabel(OPENROCKET_URL), "ax 50%, growy, wrap para"); - - JButton close = new JButton("Close"); + //// translations author if language is not English + String translator = trans.get("about.dlg.lbl.translation").trim(); + String translatorUrl = trans.get("about.dlg.lbl.transwebsite").trim(); + if (translator.length() > 0) { + panel.add(new StyledLabel(translator), "ax 50%, growy, wrap para"); + if (translatorUrl.length() > 0) { + panel.add(new URLLabel(translatorUrl), "ax 50%, growy, wrap para"); + } + } + + //Close button + JButton close = new JButton(trans.get("dlg.but.close")); close.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -67,5 +80,5 @@ public class AboutDialog extends JDialog { GUIUtil.setDisposableDialogOptions(this, close); } - + } diff --git a/src/net/sf/openrocket/gui/dialogs/BugReportDialog.java b/src/net/sf/openrocket/gui/dialogs/BugReportDialog.java index cb51317f..e916caad 100644 --- a/src/net/sf/openrocket/gui/dialogs/BugReportDialog.java +++ b/src/net/sf/openrocket/gui/dialogs/BugReportDialog.java @@ -30,6 +30,7 @@ import net.miginfocom.swing.MigLayout; import net.sf.openrocket.communication.BugReporter; import net.sf.openrocket.gui.components.SelectableLabel; import net.sf.openrocket.gui.components.StyledLabel; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.logging.LogLevelBufferLogger; import net.sf.openrocket.logging.LogLine; import net.sf.openrocket.startup.Application; @@ -41,10 +42,12 @@ import net.sf.openrocket.util.Prefs; public class BugReportDialog extends JDialog { private static final String REPORT_EMAIL = "openrocket-bugs@lists.sourceforge.net"; - + private static final Translator trans = Application.getTranslator(); + public BugReportDialog(Window parent, String labelText, String message) { - super(parent, "Bug report", Dialog.ModalityType.APPLICATION_MODAL); + //// Bug report + super(parent, trans.get("bugreport.dlg.title"), Dialog.ModalityType.APPLICATION_MODAL); JPanel panel = new JPanel(new MigLayout("fill")); @@ -55,6 +58,8 @@ public class BugReportDialog extends JDialog { label.setMaximumSize(d); panel.add(label, "gapleft para, wrap para"); + //// If connected to the Internet, you can simply click + //// Send bug report. label = new JLabel("If connected to the Internet, you can simply click " + "Send bug report."); d = label.getPreferredSize(); @@ -62,6 +67,7 @@ public class BugReportDialog extends JDialog { label.setMaximumSize(d); panel.add(label, "gapleft para, wrap"); + //// Otherwise, send the text below to the address: panel.add(new JLabel("Otherwise, send the text below to the address: "), "gapleft para, split 2, gapright rel"); panel.add(new SelectableLabel(REPORT_EMAIL), "growx, wrap para"); @@ -78,8 +84,8 @@ public class BugReportDialog extends JDialog { - //// Close button - JButton close = new JButton("Close"); + ////Close button + JButton close = new JButton(trans.get("dlg.but.close")); close.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -104,9 +110,10 @@ public class BugReportDialog extends JDialog { // } - //// Send button - JButton send = new JButton("Send bug report"); - send.setToolTipText("Automatically send the bug report to the OpenRocket developers."); + //// Send bug report button + JButton send = new JButton(trans.get("bugreport.dlg.but.Sendbugreport")); + //// Automatically send the bug report to the OpenRocket developers. + send.setToolTipText(trans.get("bugreport.dlg.but.Sendbugreport.Ttip")); send.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -116,10 +123,15 @@ public class BugReportDialog extends JDialog { BugReporter.sendBugReport(text); // Success if we came here - JOptionPane.showMessageDialog(BugReportDialog.this, + //bugreport.dlg.successmsg + /*JOptionPane.showMessageDialog(BugReportDialog.this, new Object[] { "Bug report successfully sent.", "Thank you for helping make OpenRocket better!" }, - "Bug report sent", JOptionPane.INFORMATION_MESSAGE); + "Bug report sent", JOptionPane.INFORMATION_MESSAGE);*/ + JOptionPane.showMessageDialog(BugReportDialog.this, + new Object[] { trans.get("bugreport.dlg.successmsg1"), + trans.get("bugreport.dlg.successmsg2") }, + trans.get("bugreport.dlg.successmsg3"), JOptionPane.INFORMATION_MESSAGE); } catch (Exception ex) { // Sending the message failed. diff --git a/src/net/sf/openrocket/gui/dialogs/ComponentAnalysisDialog.java b/src/net/sf/openrocket/gui/dialogs/ComponentAnalysisDialog.java index 6fcee21d..7318d5c7 100644 --- a/src/net/sf/openrocket/gui/dialogs/ComponentAnalysisDialog.java +++ b/src/net/sf/openrocket/gui/dialogs/ComponentAnalysisDialog.java @@ -50,6 +50,7 @@ import net.sf.openrocket.gui.components.StageSelector; import net.sf.openrocket.gui.components.StyledLabel; import net.sf.openrocket.gui.components.UnitSelector; import net.sf.openrocket.gui.scalefigure.RocketPanel; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.masscalc.BasicMassCalculator; import net.sf.openrocket.masscalc.MassCalculator; import net.sf.openrocket.masscalc.MassCalculator.MassCalcType; @@ -57,6 +58,7 @@ import net.sf.openrocket.rocketcomponent.Configuration; import net.sf.openrocket.rocketcomponent.FinSet; import net.sf.openrocket.rocketcomponent.Rocket; import net.sf.openrocket.rocketcomponent.RocketComponent; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.unit.Unit; import net.sf.openrocket.unit.UnitGroup; import net.sf.openrocket.util.Coordinate; @@ -67,7 +69,8 @@ import net.sf.openrocket.util.Prefs; public class ComponentAnalysisDialog extends JDialog implements ChangeListener { private static ComponentAnalysisDialog singletonDialog = null; - + private static final Translator trans = Application.getTranslator(); + private final FlightConditions conditions; private final Configuration configuration; @@ -92,7 +95,9 @@ public class ComponentAnalysisDialog extends JDialog implements ChangeListener { public ComponentAnalysisDialog(final RocketPanel rocketPanel) { - super(SwingUtilities.getWindowAncestor(rocketPanel), "Component analysis"); + ////Component analysis + super(SwingUtilities.getWindowAncestor(rocketPanel), + trans.get("componentanalysisdlg.componentanalysis")); JTable table; @@ -114,12 +119,13 @@ public class ComponentAnalysisDialog extends JDialog implements ChangeListener { rocketPanel.setCPRoll(0); roll = new DoubleModel(rocketPanel, "CPRoll", UnitGroup.UNITS_ROLL); - - panel.add(new JLabel("Wind direction:"), "width 100lp!"); + //// Wind direction: + panel.add(new JLabel(trans.get("componentanalysisdlg.lbl.winddir")), "width 100lp!"); panel.add(new UnitSelector(theta, true), "width 50lp!"); BasicSlider slider = new BasicSlider(theta.getSliderModel(0, 2 * Math.PI)); panel.add(slider, "growx, split 2"); - worstToggle = new JToggleButton("Worst"); + //// Worst button + worstToggle = new JToggleButton(trans.get("componentanalysisdlg.ToggleBut.worst")); worstToggle.setSelected(true); worstToggle.addActionListener(new ActionListener() { @Override @@ -139,30 +145,34 @@ public class ComponentAnalysisDialog extends JDialog implements ChangeListener { warningList = new JList(); JScrollPane scrollPane = new JScrollPane(warningList); - scrollPane.setBorder(BorderFactory.createTitledBorder("Warnings:")); + ////Warnings: + scrollPane.setBorder(BorderFactory.createTitledBorder(trans.get("componentanalysisdlg.TitledBorder.warnings"))); panel.add(scrollPane, "gap paragraph, spany 4, width 300lp!, growy 1, height :100lp:, wrap"); - - panel.add(new JLabel("Angle of attack:"), "width 100lp!"); + ////Angle of attack: + panel.add(new JLabel(trans.get("componentanalysisdlg.lbl.angleofattack")), "width 100lp!"); panel.add(new UnitSelector(aoa, true), "width 50lp!"); panel.add(new BasicSlider(aoa.getSliderModel(0, Math.PI)), "growx, wrap"); - panel.add(new JLabel("Mach number:"), "width 100lp!"); + //// Mach number: + panel.add(new JLabel(trans.get("componentanalysisdlg.lbl.machnumber")), "width 100lp!"); panel.add(new UnitSelector(mach, true), "width 50lp!"); panel.add(new BasicSlider(mach.getSliderModel(0, 3)), "growx, wrap"); - panel.add(new JLabel("Roll rate:"), "width 100lp!"); + //// Roll rate: + panel.add(new JLabel(trans.get("componentanalysisdlg.lbl.rollrate")), "width 100lp!"); panel.add(new UnitSelector(roll, true), "width 50lp!"); panel.add(new BasicSlider(roll.getSliderModel(-20 * 2 * Math.PI, 20 * 2 * Math.PI)), "growx, wrap paragraph"); // Stage and motor selection: - - panel.add(new JLabel("Active stages:"), "spanx, split, gapafter rel"); + //// Active stages: + panel.add(new JLabel(trans.get("componentanalysisdlg.lbl.activestages")), "spanx, split, gapafter rel"); panel.add(new StageSelector(configuration), "gapafter paragraph"); - JLabel label = new JLabel("Motor configuration:"); + //// Motor configuration: + JLabel label = new JLabel(trans.get("componentanalysisdlg.lbl.motorconf")); label.setHorizontalAlignment(JLabel.RIGHT); panel.add(label, "growx, right"); panel.add(new JComboBox(new MotorConfigurationModel(configuration)), "wrap"); @@ -178,7 +188,8 @@ public class ComponentAnalysisDialog extends JDialog implements ChangeListener { // Create the CP data table cpTableModel = new ColumnTableModel( - new Column("Component") { + //// Component + new Column(trans.get("componentanalysisdlg.TabStability.Col.Component")) { @Override public Object getValueAt(int row) { RocketComponent c = cpData.get(row).getComponent(); @@ -244,13 +255,16 @@ public class ComponentAnalysisDialog extends JDialog implements ChangeListener { JScrollPane scrollpane = new JScrollPane(table); scrollpane.setPreferredSize(new Dimension(600, 200)); - tabbedPane.addTab("Stability", null, scrollpane, "Stability information"); + //// Stability and Stability information + tabbedPane.addTab(trans.get("componentanalysisdlg.TabStability"), + null, scrollpane, trans.get("componentanalysisdlg.TabStability.ttip")); // Create the drag data table dragTableModel = new ColumnTableModel( - new Column("Component") { + //// Component + new Column(trans.get("componentanalysisdlg.dragTableModel.Col.Component")) { @Override public Object getValueAt(int row) { RocketComponent c = dragData.get(row).getComponent(); @@ -265,25 +279,29 @@ public class ComponentAnalysisDialog extends JDialog implements ChangeListener { return 200; } }, - new Column("Pressure CD") { + //// Pressure CD + new Column(trans.get("componentanalysisdlg.dragTableModel.Col.Pressure")) { @Override public Object getValueAt(int row) { return dragData.get(row).getPressureCD(); } }, - new Column("Base CD") { + //// Base CD + new Column(trans.get("componentanalysisdlg.dragTableModel.Col.Base")) { @Override public Object getValueAt(int row) { return dragData.get(row).getBaseCD(); } }, - new Column("Friction CD") { + //// Friction CD + new Column(trans.get("componentanalysisdlg.dragTableModel.Col.friction")) { @Override public Object getValueAt(int row) { return dragData.get(row).getFrictionCD(); } }, - new Column("Total CD") { + //// Total CD + new Column(trans.get("componentanalysisdlg.dragTableModel.Col.total")) { @Override public Object getValueAt(int row) { return dragData.get(row).getCD(); @@ -310,14 +328,17 @@ public class ComponentAnalysisDialog extends JDialog implements ChangeListener { scrollpane = new JScrollPane(table); scrollpane.setPreferredSize(new Dimension(600, 200)); - tabbedPane.addTab("Drag characteristics", null, scrollpane, "Drag characteristics"); + //// Drag characteristics and Drag characteristics tooltip + tabbedPane.addTab(trans.get("componentanalysisdlg.dragTabchar"), null, scrollpane, + trans.get("componentanalysisdlg.dragTabchar.ttip")); // Create the roll data table rollTableModel = new ColumnTableModel( - new Column("Component") { + //// Component + new Column(trans.get("componentanalysisdlg.rollTableModel.Col.component")) { @Override public Object getValueAt(int row) { RocketComponent c = rollData.get(row).getComponent(); @@ -327,19 +348,22 @@ public class ComponentAnalysisDialog extends JDialog implements ChangeListener { return c.toString(); } }, - new Column("Roll forcing coefficient") { + //// Roll forcing coefficient + new Column(trans.get("componentanalysisdlg.rollTableModel.Col.rollforc")) { @Override public Object getValueAt(int row) { return rollData.get(row).getCrollForce(); } }, - new Column("Roll damping coefficient") { + //// Roll damping coefficient + new Column(trans.get("componentanalysisdlg.rollTableModel.Col.rolldamp")) { @Override public Object getValueAt(int row) { return rollData.get(row).getCrollDamp(); } }, - new Column("Total Cl") { + //// Total Cl + new Column(trans.get("componentanalysisdlg.rollTableModel.Col.total")) { @Override public Object getValueAt(int row) { return rollData.get(row).getCroll(); @@ -362,7 +386,9 @@ public class ComponentAnalysisDialog extends JDialog implements ChangeListener { scrollpane = new JScrollPane(table); scrollpane.setPreferredSize(new Dimension(600, 200)); - tabbedPane.addTab("Roll dynamics", null, scrollpane, "Roll dynamics"); + //// Roll dynamics and Roll dynamics tooltip + tabbedPane.addTab(trans.get("componentanalysisdlg.rollTableModel"), null, scrollpane, + trans.get("componentanalysisdlg.rollTableModel.ttip")); @@ -397,15 +423,16 @@ public class ComponentAnalysisDialog extends JDialog implements ChangeListener { } }); - - panel.add(new StyledLabel("Reference length: ", -1), + //// Reference length: + panel.add(new StyledLabel(trans.get("componentanalysisdlg.lbl.reflenght"), -1), "span, split, gapleft para, gapright rel"); DoubleModel dm = new DoubleModel(conditions, "RefLength", UnitGroup.UNITS_LENGTH); UnitSelector sel = new UnitSelector(dm, true); sel.resizeFont(-1); panel.add(sel, "gapright para"); - panel.add(new StyledLabel("Reference area: ", -1), "gapright rel"); + //// Reference area: + panel.add(new StyledLabel(trans.get("componentanalysisdlg.lbl.refarea"), -1), "gapright rel"); dm = new DoubleModel(conditions, "RefArea", UnitGroup.UNITS_AREA); sel = new UnitSelector(dm, true); sel.resizeFont(-1); @@ -431,7 +458,9 @@ public class ComponentAnalysisDialog extends JDialog implements ChangeListener { // }); // panel.add(button,"tag ok"); - button = new JButton("Close"); + //button = new JButton("Close"); + //Close button + button = new JButton(trans.get("dlg.but.close")); button.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { ComponentAnalysisDialog.this.dispose(); diff --git a/src/net/sf/openrocket/gui/dialogs/CustomMaterialDialog.java b/src/net/sf/openrocket/gui/dialogs/CustomMaterialDialog.java index ef22d845..aad2f47e 100644 --- a/src/net/sf/openrocket/gui/dialogs/CustomMaterialDialog.java +++ b/src/net/sf/openrocket/gui/dialogs/CustomMaterialDialog.java @@ -18,7 +18,9 @@ import net.miginfocom.swing.MigLayout; import net.sf.openrocket.gui.adaptors.DoubleModel; import net.sf.openrocket.gui.components.StyledLabel; import net.sf.openrocket.gui.components.UnitSelector; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.material.Material; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.util.GUIUtil; public class CustomMaterialDialog extends JDialog { @@ -32,7 +34,8 @@ public class CustomMaterialDialog extends JDialog { private JSpinner densitySpinner; private UnitSelector densityUnit; private JCheckBox addBox; - + private static final Translator trans = Application.getTranslator(); + public CustomMaterialDialog(Window parent, Material material, boolean saveOption, String title) { this(parent, material, saveOption, title, null); @@ -41,7 +44,8 @@ public class CustomMaterialDialog extends JDialog { public CustomMaterialDialog(Window parent, Material material, boolean saveOption, String title, String note) { - super(parent, "Custom material", Dialog.ModalityType.APPLICATION_MODAL); + //// Custom material + super(parent, trans.get("custmatdlg.title.Custommaterial"), Dialog.ModalityType.APPLICATION_MODAL); this.originalMaterial = material; @@ -58,8 +62,8 @@ public class CustomMaterialDialog extends JDialog { } - // Material name - panel.add(new JLabel("Material name:")); + //// Material name + panel.add(new JLabel(trans.get("custmatdlg.lbl.Materialname"))); nameField = new JTextField(15); if (material != null) { nameField.setText(material.getName()); @@ -68,7 +72,7 @@ public class CustomMaterialDialog extends JDialog { // Material type (if not known) - panel.add(new JLabel("Material type:")); + panel.add(new JLabel(trans.get("custmatdlg.lbl.Materialtype"))); if (material == null) { typeBox = new JComboBox(Material.Type.values()); typeBox.setSelectedItem(Material.Type.BULK); @@ -85,8 +89,8 @@ public class CustomMaterialDialog extends JDialog { } - // Material density - panel.add(new JLabel("Material density:")); + // Material density: + panel.add(new JLabel(trans.get("custmatdlg.lbl.Materialdensity"))); densitySpinner = new JSpinner(); panel.add(densitySpinner, "w 70lp"); densityUnit = new UnitSelector((DoubleModel)null); @@ -97,11 +101,14 @@ public class CustomMaterialDialog extends JDialog { // Save option if (saveOption) { - addBox = new JCheckBox("Add material to database"); + //// Add material to database + addBox = new JCheckBox(trans.get("custmatdlg.checkbox.Addmaterial")); panel.add(addBox,"span, wrap"); } - JButton okButton = new JButton("OK"); + //// OK button + JButton okButton = new JButton(trans.get("dlg.but.ok")); + okButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -111,7 +118,8 @@ public class CustomMaterialDialog extends JDialog { }); panel.add(okButton,"span, split, tag ok"); - JButton closeButton = new JButton("Cancel"); + //// Cancel + JButton closeButton = new JButton(trans.get("dlg.but.cancel")); closeButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { diff --git a/src/net/sf/openrocket/gui/dialogs/DebugLogDialog.java b/src/net/sf/openrocket/gui/dialogs/DebugLogDialog.java index e3e9d575..1ef299e7 100644 --- a/src/net/sf/openrocket/gui/dialogs/DebugLogDialog.java +++ b/src/net/sf/openrocket/gui/dialogs/DebugLogDialog.java @@ -42,6 +42,7 @@ import net.miginfocom.swing.MigLayout; import net.sf.openrocket.gui.adaptors.Column; import net.sf.openrocket.gui.adaptors.ColumnTableModel; import net.sf.openrocket.gui.components.SelectableLabel; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.logging.DelegatorLogger; import net.sf.openrocket.logging.LogHelper; import net.sf.openrocket.logging.LogLevel; @@ -58,7 +59,8 @@ public class DebugLogDialog extends JDialog { private static final int POLL_TIME = 250; private static final String STACK_TRACE_MARK = "\uFF01"; - + private static final Translator trans = Application.getTranslator(); + private static final EnumMap backgroundColors = new EnumMap(LogLevel.class); static { for (LogLevel l : LogLevel.values()) { @@ -101,7 +103,8 @@ public class DebugLogDialog extends JDialog { private final JTextArea stackTraceLabel; public DebugLogDialog(Window parent) { - super(parent, "OpenRocket debug log"); + //// OpenRocket debug log + super(parent, trans.get("debuglogdlg.OpenRocketdebuglog")); // Start listening to log lines LogHelper applicationLog = Application.getLogger(); @@ -138,7 +141,8 @@ public class DebugLogDialog extends JDialog { JPanel panel = new JPanel(new MigLayout("fill")); split.add(panel); - panel.add(new JLabel("Display log lines:"), "gapright para, split"); + //// Display log lines: + panel.add(new JLabel(trans.get("debuglogdlg.Displayloglines")), "gapright para, split"); for (LogLevel l : LogLevel.values()) { JCheckBox box = new JCheckBox(l.toString()); // By default display DEBUG and above @@ -153,11 +157,13 @@ public class DebugLogDialog extends JDialog { filterButtons.put(l, box); } - followBox = new JCheckBox("Follow"); + //// Follow + followBox = new JCheckBox(trans.get("debuglogdlg.Follow")); followBox.setSelected(true); panel.add(followBox, "skip, gapright para, right"); - JButton clear = new JButton("Clear"); + //// Clear button + JButton clear = new JButton(trans.get("debuglogdlg.but.clear")); clear.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -185,7 +191,8 @@ public class DebugLogDialog extends JDialog { return 60; } }, - new Column("Time") { + //// Time + new Column(trans.get("debuglogdlg.col.Time")) { @Override public Object getValueAt(int row) { return String.format("%.3f", buffer.get(row).getTimestamp() / 1000.0); @@ -196,7 +203,8 @@ public class DebugLogDialog extends JDialog { return 60; } }, - new Column("Level") { + //// Level + new Column(trans.get("debuglogdlg.col.Level")) { @Override public Object getValueAt(int row) { return buffer.get(row).getLevel(); @@ -222,7 +230,8 @@ public class DebugLogDialog extends JDialog { return 16; } }, - new Column("Location") { + //// Location + new Column(trans.get("debuglogdlg.col.Location")) { @Override public Object getValueAt(int row) { TraceException e = buffer.get(row).getTrace(); @@ -238,7 +247,8 @@ public class DebugLogDialog extends JDialog { return 200; } }, - new Column("Message") { + //// Message + new Column(trans.get("debuglogdlg.col.Message")) { @Override public Object getValueAt(int row) { return buffer.get(row).getMessage(); @@ -291,26 +301,32 @@ public class DebugLogDialog extends JDialog { panel = new JPanel(new MigLayout("fill")); split.add(panel); - panel.add(new JLabel("Log line number:"), "split, gapright rel"); + //// Log line number: + panel.add(new JLabel(trans.get("debuglogdlg.lbl.Loglinenbr")), "split, gapright rel"); numberLabel = new SelectableLabel(); panel.add(numberLabel, "width 70lp, gapright para"); - panel.add(new JLabel("Time:"), "split, gapright rel"); + //// Time: + panel.add(new JLabel(trans.get("debuglogdlg.lbl.Time")), "split, gapright rel"); timeLabel = new SelectableLabel(); panel.add(timeLabel, "width 70lp, gapright para"); - panel.add(new JLabel("Level:"), "split, gapright rel"); + //// Level: + panel.add(new JLabel(trans.get("debuglogdlg.lbl.Level")), "split, gapright rel"); levelLabel = new SelectableLabel(); panel.add(levelLabel, "width 70lp, gapright para"); + //// Location: panel.add(new JLabel("Location:"), "split, gapright rel"); locationLabel = new SelectableLabel(); panel.add(locationLabel, "growx, wrap unrel"); + //// Log message: panel.add(new JLabel("Log message:"), "split, gapright rel"); messageLabel = new SelectableLabel(); panel.add(messageLabel, "growx, wrap para"); + //// Stack trace: panel.add(new JLabel("Stack trace:"), "wrap rel"); stackTraceLabel = new JTextArea(8, 80); stackTraceLabel.setEditable(false); @@ -318,7 +334,8 @@ public class DebugLogDialog extends JDialog { panel.add(new JScrollPane(stackTraceLabel), "grow"); - JButton close = new JButton("Close"); + //Close button + JButton close = new JButton(trans.get("dlg.but.close")); close.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { diff --git a/src/net/sf/openrocket/gui/dialogs/DetailDialog.java b/src/net/sf/openrocket/gui/dialogs/DetailDialog.java index 87e36e67..88e3b9e6 100644 --- a/src/net/sf/openrocket/gui/dialogs/DetailDialog.java +++ b/src/net/sf/openrocket/gui/dialogs/DetailDialog.java @@ -6,9 +6,12 @@ import javax.swing.JOptionPane; import javax.swing.JScrollPane; import javax.swing.JTextArea; +import net.sf.openrocket.l10n.Translator; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.util.GUIUtil; public class DetailDialog { + private static final Translator trans = Application.getTranslator(); public static void showDetailedMessageDialog(Component parentComponent, Object message, String details, String title, int messageType) { diff --git a/src/net/sf/openrocket/gui/dialogs/EditMotorConfigurationDialog.java b/src/net/sf/openrocket/gui/dialogs/EditMotorConfigurationDialog.java index 782afb76..59c0defb 100644 --- a/src/net/sf/openrocket/gui/dialogs/EditMotorConfigurationDialog.java +++ b/src/net/sf/openrocket/gui/dialogs/EditMotorConfigurationDialog.java @@ -28,10 +28,12 @@ import net.miginfocom.swing.MigLayout; import net.sf.openrocket.document.OpenRocketDocument; import net.sf.openrocket.gui.dialogs.motor.MotorChooserDialog; import net.sf.openrocket.gui.main.BasicFrame; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.motor.Motor; import net.sf.openrocket.rocketcomponent.MotorMount; import net.sf.openrocket.rocketcomponent.Rocket; import net.sf.openrocket.rocketcomponent.RocketComponent; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.util.Chars; import net.sf.openrocket.util.GUIUtil; @@ -55,9 +57,11 @@ public class EditMotorConfigurationDialog extends JDialog { // Positive when user is modifying configuration name private int configurationNameModification = 0; - + private static final Translator trans = Application.getTranslator(); + public EditMotorConfigurationDialog(final Rocket rocket, Window parent) { - super(parent, "Edit motor configurations"); + //// Edit motor configurations + super(parent, trans.get("edtmotorconfdlg.title.Editmotorconf")); if (parent != null) this.setModalityType(ModalityType.DOCUMENT_MODAL); @@ -82,11 +86,12 @@ public class EditMotorConfigurationDialog extends JDialog { //// Motor mount selection - - JLabel label = new JLabel("Motor mounts:"); + //// Motor mounts: + JLabel label = new JLabel(trans.get("edtmotorconfdlg.lbl.Motormounts")); panel.add(label, "gapbottom para"); - label = new JLabel("Select which components function as motor mounts:"); + //// Select which components function as motor mounts: + label = new JLabel(trans.get("edtmotorconfdlg.selectcomp")); panel.add(label, "ay 100%, w 1px, growx"); @@ -113,13 +118,14 @@ public class EditMotorConfigurationDialog extends JDialog { //// Motor selection - - label = new JLabel("Motor configurations:"); + //// Motor configurations: + label = new JLabel(trans.get("edtmotorconfdlg.lbl.Motorconfig")); panel.add(label, "spanx, gapbottom para"); - - label = new JLabel("Configuration name:"); - String tip = "Leave name empty for default."; + //// Configuration name: + label = new JLabel(trans.get("edtmotorconfdlg.lbl.Configname")); + //// Leave name empty for default. + String tip = trans.get("edtmotorconfdlg.lbl.Leavenamedefault"); label.setToolTipText(tip); panel.add(label, ""); @@ -158,7 +164,8 @@ public class EditMotorConfigurationDialog extends JDialog { }); panel.add(configurationNameField, "cell 2 1, gapright para"); - newConfButton = new JButton("New configuration"); + //// New configuration + newConfButton = new JButton(trans.get("edtmotorconfdlg.but.Newconfiguration")); newConfButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -170,7 +177,8 @@ public class EditMotorConfigurationDialog extends JDialog { }); panel.add(newConfButton, "cell 3 1"); - removeConfButton = new JButton("Remove configuration"); + //// Remove configuration + removeConfButton = new JButton(trans.get("edtmotorconfdlg.but.Removeconfiguration")); removeConfButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -215,8 +223,8 @@ public class EditMotorConfigurationDialog extends JDialog { scroll = new JScrollPane(configurationTable); panel.add(scroll, "cell 1 2, spanx, w 500lp, h 150lp, grow"); - - selectMotorButton = new JButton("Select motor"); + //// Select motor + selectMotorButton = new JButton(trans.get("edtmotorconfdlg.but.Selectmotor")); selectMotorButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -225,8 +233,8 @@ public class EditMotorConfigurationDialog extends JDialog { }); panel.add(selectMotorButton, "spanx, flowx, split 2, ax 50%"); - - removeMotorButton = new JButton("Remove motor"); + //// Remove motor button + removeMotorButton = new JButton(trans.get("edtmotorconfdlg.but.removemotor")); removeMotorButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -238,8 +246,7 @@ public class EditMotorConfigurationDialog extends JDialog { //// Close button - - JButton close = new JButton("Close"); + JButton close = new JButton(trans.get("dlg.but.close")); close.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -260,7 +267,8 @@ public class EditMotorConfigurationDialog extends JDialog { // Undo description final OpenRocketDocument document = BasicFrame.findDocument(rocket); if (document != null) { - document.startUndo("Edit motor configurations"); + //// Edit motor configurations + document.startUndo(trans.get("edtmotorconfdlg.title.Editmotorconf")); this.addWindowListener(new WindowAdapter() { @Override public void windowClosed(WindowEvent e) { diff --git a/src/net/sf/openrocket/gui/dialogs/ExampleDesignDialog.java b/src/net/sf/openrocket/gui/dialogs/ExampleDesignDialog.java index 706f9aa4..a15b624e 100644 --- a/src/net/sf/openrocket/gui/dialogs/ExampleDesignDialog.java +++ b/src/net/sf/openrocket/gui/dialogs/ExampleDesignDialog.java @@ -27,6 +27,8 @@ import javax.swing.JScrollPane; import javax.swing.ListSelectionModel; import net.miginfocom.swing.MigLayout; +import net.sf.openrocket.l10n.Translator; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.util.BugException; import net.sf.openrocket.util.GUIUtil; import net.sf.openrocket.util.JarUtil; @@ -35,6 +37,8 @@ public class ExampleDesignDialog extends JDialog { private static final String DIRECTORY = "datafiles/examples/"; private static final String PATTERN = ".*\\.[oO][rR][kK]$"; + private static final Translator trans = Application.getTranslator(); + private static final FilenameFilter FILTER = new FilenameFilter() { @Override public boolean accept(File dir, String name) { @@ -47,10 +51,12 @@ public class ExampleDesignDialog extends JDialog { private final JList designSelection; private ExampleDesignDialog(ExampleDesign[] designs, Window parent) { + //// Open example design super(parent, "Open example design", Dialog.ModalityType.APPLICATION_MODAL); JPanel panel = new JPanel(new MigLayout("fill")); + //// Select example designs to open: panel.add(new JLabel("Select example designs to open:"), "wrap"); designSelection = new JList(designs); @@ -66,7 +72,8 @@ public class ExampleDesignDialog extends JDialog { }); panel.add(new JScrollPane(designSelection), "grow, wmin 300lp, wrap para"); - JButton openButton = new JButton("Open"); + //// Open button + JButton openButton = new JButton(trans.get("debuglogdlg.but.clear")); openButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -76,7 +83,8 @@ public class ExampleDesignDialog extends JDialog { }); panel.add(openButton, "split 2, sizegroup buttons, growx"); - JButton cancelButton = new JButton("Cancel"); + //// Cancel button + JButton cancelButton = new JButton(trans.get("dlg.but.cancel")); cancelButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -110,7 +118,9 @@ public class ExampleDesignDialog extends JDialog { designs = getDirFileNames(); } if (designs == null || designs.length == 0) { + //// Example designs could not be found. JOptionPane.showMessageDialog(parent, "Example designs could not be found.", + //// Examples not found "Examples not found", JOptionPane.ERROR_MESSAGE); return null; } diff --git a/src/net/sf/openrocket/gui/dialogs/LicenseDialog.java b/src/net/sf/openrocket/gui/dialogs/LicenseDialog.java index 19ad7fe2..920e0b47 100644 --- a/src/net/sf/openrocket/gui/dialogs/LicenseDialog.java +++ b/src/net/sf/openrocket/gui/dialogs/LicenseDialog.java @@ -16,11 +16,14 @@ import javax.swing.JTextArea; import net.miginfocom.swing.MigLayout; import net.sf.openrocket.gui.components.StyledLabel; +import net.sf.openrocket.l10n.Translator; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.util.GUIUtil; public class LicenseDialog extends JDialog { private static final String LICENSE_FILENAME = "LICENSE.TXT"; - + private static final Translator trans = Application.getTranslator(); + private static final String DEFAULT_LICENSE_TEXT = "\n" + "Error: Unable to load " + LICENSE_FILENAME + "!\n" + @@ -60,7 +63,8 @@ public class LicenseDialog extends JDialog { text.setEditable(false); panel.add(new JScrollPane(text),"grow, wrap para"); - JButton close = new JButton("Close"); + //Close button + JButton close = new JButton(trans.get("dlg.but.close")); close.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { diff --git a/src/net/sf/openrocket/gui/dialogs/MotorDatabaseLoadingDialog.java b/src/net/sf/openrocket/gui/dialogs/MotorDatabaseLoadingDialog.java index c53a63b3..0edfddae 100644 --- a/src/net/sf/openrocket/gui/dialogs/MotorDatabaseLoadingDialog.java +++ b/src/net/sf/openrocket/gui/dialogs/MotorDatabaseLoadingDialog.java @@ -12,19 +12,23 @@ import javax.swing.Timer; import net.miginfocom.swing.MigLayout; import net.sf.openrocket.database.ThrustCurveMotorSetDatabase; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.logging.LogHelper; import net.sf.openrocket.startup.Application; import net.sf.openrocket.util.GUIUtil; public class MotorDatabaseLoadingDialog extends JDialog { private static final LogHelper log = Application.getLogger(); - + private static final Translator trans = Application.getTranslator(); + private MotorDatabaseLoadingDialog(Window parent) { - super(parent, "Loading motors", ModalityType.APPLICATION_MODAL); + //// Loading motors + super(parent, trans.get("MotorDbLoadDlg.title"), ModalityType.APPLICATION_MODAL); JPanel panel = new JPanel(new MigLayout("fill")); - panel.add(new JLabel("Loading motors..."), "wrap para"); + //// Loading motors... + panel.add(new JLabel(trans.get("MotorDbLoadDlg.Loadingmotors")), "wrap para"); JProgressBar progress = new JProgressBar(); progress.setIndeterminate(true); diff --git a/src/net/sf/openrocket/gui/dialogs/PrintDialog.java b/src/net/sf/openrocket/gui/dialogs/PrintDialog.java index a9769eed..06119318 100644 --- a/src/net/sf/openrocket/gui/dialogs/PrintDialog.java +++ b/src/net/sf/openrocket/gui/dialogs/PrintDialog.java @@ -6,6 +6,8 @@ package net.sf.openrocket.gui.dialogs; import net.sf.openrocket.document.OpenRocketDocument; import net.sf.openrocket.gui.print.PDFPrintStreamDoc; import net.sf.openrocket.gui.print.PrintUtilities; +import net.sf.openrocket.l10n.Translator; +import net.sf.openrocket.startup.Application; import sun.print.ServiceDialog; import javax.print.DocFlavor; @@ -48,6 +50,8 @@ public class PrintDialog { */ private static final DocFlavor.INPUT_STREAM PDF = DocFlavor.INPUT_STREAM.PDF; + private static final Translator trans = Application.getTranslator(); + /** * Construct a print dialog using an Open Rocket document - which contains the rocket data to ultimately be * printed. diff --git a/src/net/sf/openrocket/gui/dialogs/PrintPanel.java b/src/net/sf/openrocket/gui/dialogs/PrintPanel.java index ecd1fd8f..0044bfe8 100644 --- a/src/net/sf/openrocket/gui/dialogs/PrintPanel.java +++ b/src/net/sf/openrocket/gui/dialogs/PrintPanel.java @@ -12,6 +12,7 @@ import net.sf.openrocket.gui.print.PrintableContext; import net.sf.openrocket.gui.print.TemplateProperties; import net.sf.openrocket.gui.print.components.CheckTreeManager; import net.sf.openrocket.gui.print.components.RocketPrintTree; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.logging.LogHelper; import net.sf.openrocket.rocketcomponent.Rocket; import net.sf.openrocket.startup.Application; @@ -50,6 +51,7 @@ import java.util.Iterator; public class PrintPanel extends JPanel implements TreeSelectionListener { private static final LogHelper log = Application.getLogger(); + private static final Translator trans = Application.getTranslator(); private final RocketPrintTree stagedTree; private final RocketPrintTree noStagedTree; @@ -125,7 +127,8 @@ public class PrintPanel extends JPanel implements TreeSelectionListener { }); add(sortByStage, "wrap"); - saveAsPDF = new JButton("Save as PDF"); + //// Save as PDF button + saveAsPDF = new JButton(trans.get("printdlg.but.saveaspdf")); saveAsPDF.addActionListener(new ActionListener() { @Override public void actionPerformed (ActionEvent e) { @@ -134,7 +137,8 @@ public class PrintPanel extends JPanel implements TreeSelectionListener { }); add(saveAsPDF, "span 2, tag save"); - previewButton = new JButton("Preview"); + //// Preview button + previewButton = new JButton(trans.get("printdlg.but.preview")); previewButton.addActionListener(new ActionListener() { @Override public void actionPerformed (ActionEvent e) { @@ -143,7 +147,8 @@ public class PrintPanel extends JPanel implements TreeSelectionListener { }); add(previewButton, "x 150"); - JButton settingsButton = new JButton("Settings"); + //// Settings button + JButton settingsButton = new JButton(trans.get("printdlg.but.settings")); settingsButton.addActionListener(new ActionListener() { @Override public void actionPerformed (ActionEvent e) { @@ -381,6 +386,7 @@ class PrintSettingsDialog extends JDialog { * The line color chooser. */ private ColorChooser line; + private static final Translator trans = Application.getTranslator(); /** * Construct a dialog for setting the advanced rocket print settings. @@ -388,7 +394,8 @@ class PrintSettingsDialog extends JDialog { * @param parent the owning dialog */ public PrintSettingsDialog (JDialog parent) { - super(parent, "Advanced Settings", true); + + super(parent, "Advanced Settings", true); setLayout(new MigLayout("fill")); JPanel settingsPanel = new JPanel(); @@ -402,7 +409,8 @@ class PrintSettingsDialog extends JDialog { add(settingsPanel, "wrap"); - JButton closeButton = new JButton("Close"); + //Close button + JButton closeButton = new JButton(trans.get("dlg.but.close")); closeButton.addActionListener(new ActionListener() { @Override public void actionPerformed (ActionEvent e) { diff --git a/src/net/sf/openrocket/gui/dialogs/SwingWorkerDialog.java b/src/net/sf/openrocket/gui/dialogs/SwingWorkerDialog.java index 939514b0..13fb93b0 100644 --- a/src/net/sf/openrocket/gui/dialogs/SwingWorkerDialog.java +++ b/src/net/sf/openrocket/gui/dialogs/SwingWorkerDialog.java @@ -15,6 +15,7 @@ import javax.swing.JProgressBar; import javax.swing.SwingWorker; import net.miginfocom.swing.MigLayout; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.logging.LogHelper; import net.sf.openrocket.startup.Application; import net.sf.openrocket.util.MathUtil; @@ -30,7 +31,8 @@ import net.sf.openrocket.util.MathUtil; */ public class SwingWorkerDialog extends JDialog implements PropertyChangeListener { private static final LogHelper log = Application.getLogger(); - + private static final Translator trans = Application.getTranslator(); + /** Number of milliseconds to wait at a time between checking worker status */ private static final int DELAY = 100; @@ -65,7 +67,8 @@ public class SwingWorkerDialog extends JDialog implements PropertyChangeListener progressBar = new JProgressBar(); panel.add(progressBar, "growx, wrap para"); - JButton cancel = new JButton("Cancel"); + //// Cancel button + JButton cancel = new JButton(trans.get("dlg.but.cancel")); cancel.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { diff --git a/src/net/sf/openrocket/gui/dialogs/UpdateInfoDialog.java b/src/net/sf/openrocket/gui/dialogs/UpdateInfoDialog.java index 02bcfec1..08f72089 100644 --- a/src/net/sf/openrocket/gui/dialogs/UpdateInfoDialog.java +++ b/src/net/sf/openrocket/gui/dialogs/UpdateInfoDialog.java @@ -15,6 +15,8 @@ import javax.swing.JPanel; import net.miginfocom.swing.MigLayout; import net.sf.openrocket.communication.UpdateInfo; import net.sf.openrocket.gui.components.URLLabel; +import net.sf.openrocket.l10n.Translator; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.util.Chars; import net.sf.openrocket.util.ComparablePair; import net.sf.openrocket.util.GUIUtil; @@ -23,8 +25,10 @@ import net.sf.openrocket.util.Icons; public class UpdateInfoDialog extends JDialog { private final JCheckBox remind; + private static final Translator trans = Application.getTranslator(); public UpdateInfoDialog(UpdateInfo info) { + //// OpenRocket update available super((Window)null, "OpenRocket update available", ModalityType.APPLICATION_MODAL); JPanel panel = new JPanel(new MigLayout("fill")); @@ -33,12 +37,13 @@ public class UpdateInfoDialog extends JDialog { panel.add(new JLabel(Icons.loadImageIcon("pix/icon/icon-about.png", "OpenRocket")), "spany 100, top"); - + //// OpenRocket version panel.add(new JLabel("OpenRocket version " + info.getLatestVersion() + " is available!"), "wrap para"); List> updates = info.getUpdates(); if (updates.size() > 0) { + //// Updates include: panel.add(new JLabel("Updates include:"), "wrap rel"); Collections.sort(updates); @@ -55,16 +60,20 @@ public class UpdateInfoDialog extends JDialog { } } + //// Download the new version from: panel.add(new JLabel("Download the new version from:"), "gaptop para, alignx 50%, wrap unrel"); panel.add(new URLLabel(AboutDialog.OPENROCKET_URL), "alignx 50%, wrap para"); + //// Remind me later remind = new JCheckBox("Remind me later"); + //// Show this update also the next time you start OpenRocket remind.setToolTipText("Show this update also the next time you start OpenRocket"); remind.setSelected(true); panel.add(remind); - JButton button = new JButton("Close"); + //Close button + JButton button = new JButton(trans.get("dlg.but.close")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { diff --git a/src/net/sf/openrocket/gui/dialogs/motor/MotorChooserDialog.java b/src/net/sf/openrocket/gui/dialogs/motor/MotorChooserDialog.java index 2258251f..8c6849e9 100644 --- a/src/net/sf/openrocket/gui/dialogs/motor/MotorChooserDialog.java +++ b/src/net/sf/openrocket/gui/dialogs/motor/MotorChooserDialog.java @@ -14,8 +14,10 @@ import javax.swing.JPanel; import net.miginfocom.swing.MigLayout; import net.sf.openrocket.gui.dialogs.MotorDatabaseLoadingDialog; import net.sf.openrocket.gui.dialogs.motor.thrustcurve.ThrustCurveMotorSelectionPanel; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.motor.Motor; import net.sf.openrocket.motor.ThrustCurveMotor; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.util.GUIUtil; public class MotorChooserDialog extends JDialog implements CloseableDialog { @@ -23,7 +25,8 @@ public class MotorChooserDialog extends JDialog implements CloseableDialog { private final ThrustCurveMotorSelectionPanel selectionPanel; private boolean okClicked = false; - + private static final Translator trans = Application.getTranslator(); + public MotorChooserDialog(Motor current, double delay, double diameter, Window owner) { super(owner, "Select a rocket motor", Dialog.ModalityType.APPLICATION_MODAL); @@ -40,8 +43,7 @@ public class MotorChooserDialog extends JDialog implements CloseableDialog { // OK / Cancel buttons - - JButton okButton = new JButton("OK"); + JButton okButton = new JButton(trans.get("dlg.but.ok")); okButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -50,7 +52,8 @@ public class MotorChooserDialog extends JDialog implements CloseableDialog { }); panel.add(okButton, "tag ok, spanx, split"); - JButton cancelButton = new JButton("Cancel"); + //// Cancel button + JButton cancelButton = new JButton(trans.get("dlg.but.cancel")); cancelButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { diff --git a/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/ThrustCurveMotorColumns.java b/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/ThrustCurveMotorColumns.java index 145a9956..50eb75d6 100644 --- a/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/ThrustCurveMotorColumns.java +++ b/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/ThrustCurveMotorColumns.java @@ -4,15 +4,19 @@ import java.text.Collator; import java.util.Comparator; import net.sf.openrocket.database.ThrustCurveMotorSet; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.motor.DesignationComparator; import net.sf.openrocket.motor.ThrustCurveMotor; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.unit.UnitGroup; import net.sf.openrocket.unit.Value; import net.sf.openrocket.unit.ValueComparator; + /** * Enum defining the table columns. */ + enum ThrustCurveMotorColumns { MANUFACTURER("Manufacturer", 100) { @Override @@ -73,6 +77,7 @@ enum ThrustCurveMotorColumns { private final String title; private final int width; + private static final Translator trans = Application.getTranslator(); ThrustCurveMotorColumns(String title) { this(title, 50); diff --git a/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/ThrustCurveMotorPlotDialog.java b/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/ThrustCurveMotorPlotDialog.java index 314219a3..22238caa 100644 --- a/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/ThrustCurveMotorPlotDialog.java +++ b/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/ThrustCurveMotorPlotDialog.java @@ -13,7 +13,9 @@ import javax.swing.JDialog; import javax.swing.JPanel; import net.miginfocom.swing.MigLayout; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.motor.ThrustCurveMotor; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.unit.UnitGroup; import net.sf.openrocket.util.GUIUtil; @@ -27,6 +29,7 @@ import org.jfree.data.xy.XYSeries; import org.jfree.data.xy.XYSeriesCollection; public class ThrustCurveMotorPlotDialog extends JDialog { + private static final Translator trans = Application.getTranslator(); public ThrustCurveMotorPlotDialog(List motors, int selected, Window parent) { super(parent, "Motor thrust curves", ModalityType.APPLICATION_MODAL); @@ -101,7 +104,7 @@ public class ThrustCurveMotorPlotDialog extends JDialog { // Close button - JButton close = new JButton("Close"); + JButton close = new JButton(trans.get("dlg.but.close")); close.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { diff --git a/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/ThrustCurveMotorSelectionPanel.java b/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/ThrustCurveMotorSelectionPanel.java index d3d5e57f..359c485b 100644 --- a/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/ThrustCurveMotorSelectionPanel.java +++ b/src/net/sf/openrocket/gui/dialogs/motor/thrustcurve/ThrustCurveMotorSelectionPanel.java @@ -47,6 +47,7 @@ import net.sf.openrocket.gui.components.StyledLabel; import net.sf.openrocket.gui.components.StyledLabel.Style; import net.sf.openrocket.gui.dialogs.motor.CloseableDialog; import net.sf.openrocket.gui.dialogs.motor.MotorSelector; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.logging.LogHelper; import net.sf.openrocket.motor.Motor; import net.sf.openrocket.motor.MotorDigest; @@ -72,7 +73,8 @@ import org.jfree.data.xy.XYSeriesCollection; public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelector { private static final LogHelper log = Application.getLogger(); - + private static final Translator trans = Application.getTranslator(); + private static final double MOTOR_SIMILARITY_THRESHOLD = 0.95; private static final int SHOW_ALL = 0; @@ -191,6 +193,7 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec // Selection label + //// Select rocket motor: label = new StyledLabel("Select rocket motor:", Style.BOLD); panel.add(label, "spanx, wrap para"); @@ -225,7 +228,7 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec }); panel.add(filterComboBox, "spanx, growx, wrap rel"); - + //// Hide very similar thrust curves hideSimilarBox = new JCheckBox("Hide very similar thrust curves"); GUIUtil.changeFontSize(hideSimilarBox, -1); hideSimilarBox.setSelected(Prefs.getBoolean(Prefs.MOTOR_HIDE_SIMILAR, true)); @@ -291,6 +294,7 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec // Motor mount diameter label + //// Motor mount diameter: label = new StyledLabel("Motor mount diameter: " + UnitGroup.UNITS_MOTOR_DIMENSIONS.getDefaultUnit().toStringUnit(diameter)); panel.add(label, "gapright 30lp, spanx, split"); @@ -298,6 +302,7 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec // Search field + //// Search: label = new StyledLabel("Search:"); panel.add(label, ""); @@ -345,6 +350,7 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec // Thrust curve selection + //// Select thrust curve: curveSelectionLabel = new JLabel("Select thrust curve:"); panel.add(curveSelectionLabel); @@ -366,7 +372,7 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec - // Ejection charge delay + // Ejection charge delay: panel.add(new JLabel("Ejection charge delay:")); delayBox = new JComboBox(); @@ -388,6 +394,7 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec } }); panel.add(delayBox, "growx, wrap rel"); + //// (Number of seconds or \"None\") panel.add(new StyledLabel("(Number of seconds or \"None\")", -3), "skip, wrap para"); setDelays(false); @@ -397,35 +404,43 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec // Thrust curve info + //// Total impulse: panel.add(new JLabel("Total impulse:")); totalImpulseLabel = new JLabel(); panel.add(totalImpulseLabel, "wrap"); + //// Avg. thrust: panel.add(new JLabel("Avg. thrust:")); avgThrustLabel = new JLabel(); panel.add(avgThrustLabel, "wrap"); + //// Max. thrust: panel.add(new JLabel("Max. thrust:")); maxThrustLabel = new JLabel(); panel.add(maxThrustLabel, "wrap"); + //// Burn time: panel.add(new JLabel("Burn time:")); burnTimeLabel = new JLabel(); panel.add(burnTimeLabel, "wrap"); + //// Launch mass: panel.add(new JLabel("Launch mass:")); launchMassLabel = new JLabel(); panel.add(launchMassLabel, "wrap"); + //// Empty mass: panel.add(new JLabel("Empty mass:")); emptyMassLabel = new JLabel(); panel.add(emptyMassLabel, "wrap"); + //// Data points: panel.add(new JLabel("Data points:")); dataPointsLabel = new JLabel(); panel.add(dataPointsLabel, "wrap para"); if (System.getProperty("openrocket.debug.motordigest") != null) { + //// Digest: panel.add(new JLabel("Digest:")); digestLabel = new JLabel(); panel.add(digestLabel, "w :300:, wrap para"); @@ -466,6 +481,7 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec changeLabelFont(plot.getRangeAxis(), -2); changeLabelFont(plot.getDomainAxis(), -2); + //// Thrust curve: chart.setTitle(new TextTitle("Thrust curve:", this.getFont())); chart.setBackgroundPaint(this.getBackground()); plot.setBackgroundPaint(Color.WHITE); @@ -680,6 +696,7 @@ public class ThrustCurveMotorSelectionPanel extends JPanel implements MotorSelec for (int i = 0; i < motors.size(); i++) { ThrustCurveMotor m = motors.get(i); + //// Thrust XYSeries series = new XYSeries("Thrust"); double[] time = m.getTimePoints(); double[] thrust = m.getThrustPoints(); diff --git a/src/net/sf/openrocket/gui/dialogs/optimization/GeneralOptimizationDialog.java b/src/net/sf/openrocket/gui/dialogs/optimization/GeneralOptimizationDialog.java index ed55079f..7c5894c7 100644 --- a/src/net/sf/openrocket/gui/dialogs/optimization/GeneralOptimizationDialog.java +++ b/src/net/sf/openrocket/gui/dialogs/optimization/GeneralOptimizationDialog.java @@ -12,10 +12,12 @@ import java.util.ServiceLoader; import javax.swing.JDialog; import net.sf.openrocket.document.OpenRocketDocument; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.optimization.rocketoptimization.OptimizableParameter; import net.sf.openrocket.optimization.rocketoptimization.OptimizableParameterService; import net.sf.openrocket.optimization.rocketoptimization.SimulationModifier; import net.sf.openrocket.optimization.rocketoptimization.SimulationModifierService; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.util.BugException; public class GeneralOptimizationDialog extends JDialog { @@ -23,7 +25,8 @@ public class GeneralOptimizationDialog extends JDialog { private final List optimizationParameters = new ArrayList(); private final Map> simulationModifiers = new HashMap>(); - + private static final Translator trans = Application.getTranslator(); + private final OpenRocketDocument document; diff --git a/src/net/sf/openrocket/gui/dialogs/preferences/MaterialEditPanel.java b/src/net/sf/openrocket/gui/dialogs/preferences/MaterialEditPanel.java index e6d66f46..183a02eb 100644 --- a/src/net/sf/openrocket/gui/dialogs/preferences/MaterialEditPanel.java +++ b/src/net/sf/openrocket/gui/dialogs/preferences/MaterialEditPanel.java @@ -25,7 +25,9 @@ import net.sf.openrocket.database.Databases; import net.sf.openrocket.gui.adaptors.Column; import net.sf.openrocket.gui.adaptors.ColumnTableModel; import net.sf.openrocket.gui.dialogs.CustomMaterialDialog; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.material.Material; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.unit.UnitGroup; import net.sf.openrocket.unit.Value; @@ -37,7 +39,8 @@ public class MaterialEditPanel extends JPanel { private final JButton editButton; private final JButton deleteButton; private final JButton revertButton; - + private static final Translator trans = Application.getTranslator(); + public MaterialEditPanel() { super(new MigLayout("fill")); @@ -45,14 +48,15 @@ public class MaterialEditPanel extends JPanel { // TODO: LOW: Create sorter that keeps material types always in order final ColumnTableModel model = new ColumnTableModel( - new Column("Material") { + //// Material + new Column(trans.get("matedtpan.col.Material")) { @Override public Object getValueAt(int row) { return getMaterial(row).getName(); } }, - - new Column("Type") { + //// Type + new Column(trans.get("matedtpan.col.Type")) { @Override public Object getValueAt(int row) { return getMaterial(row).getType().toString(); @@ -62,8 +66,8 @@ public class MaterialEditPanel extends JPanel { return 15; } }, - - new Column("Density") { + //// Density + new Column(trans.get("matedtpan.col.Density")) { @Override public Object getValueAt(int row) { Material m = getMaterial(row); @@ -106,15 +110,17 @@ public class MaterialEditPanel extends JPanel { this.add(new JScrollPane(table), "w 200px, h 100px, grow 100"); - - addButton = new JButton("New"); - addButton.setToolTipText("Add a new material"); + //// New button + addButton = new JButton(trans.get("matedtpan.but.new")); + //// Add a new material + addButton.setToolTipText(trans.get("matedtpan.col.but.ttip.New")); addButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { CustomMaterialDialog dialog = new CustomMaterialDialog( SwingUtilities.getWindowAncestor(MaterialEditPanel.this), - null, false, "Add a custom material"); + //// Add a custom material + null, false, trans.get("matedtpan.title.Addcustmaterial")); dialog.setVisible(true); if (dialog.getOkClicked()) { Material mat = dialog.getMaterial(); @@ -126,9 +132,10 @@ public class MaterialEditPanel extends JPanel { }); this.add(addButton, "gap rel rel para para, w 70lp, split 5, flowy, growx 1, top"); - - editButton = new JButton("Edit"); - editButton.setToolTipText("Edit an existing material"); + //// Edit button + editButton = new JButton(trans.get("matedtpan.but.edit")); + //// Edit an existing material + editButton.setToolTipText(trans.get("matedtpan.but.ttip.edit")); editButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -142,12 +149,15 @@ public class MaterialEditPanel extends JPanel { if (m.isUserDefined()) { dialog = new CustomMaterialDialog( SwingUtilities.getWindowAncestor(MaterialEditPanel.this), - m, false, "Edit material"); + //// Edit material + m, false, trans.get("matedtpan.title.Editmaterial")); } else { dialog = new CustomMaterialDialog( SwingUtilities.getWindowAncestor(MaterialEditPanel.this), - m, false, "Add a custom material", - "The built-in materials cannot be modified."); + //// Add a custom material + m, false, trans.get("matedtpan.title.Addcustmaterial"), + //// The built-in materials cannot be modified. + trans.get("matedtpan.title2.Editmaterial")); } dialog.setVisible(true); @@ -165,9 +175,10 @@ public class MaterialEditPanel extends JPanel { }); this.add(editButton, "gap rel rel para para, growx 1, top"); - - deleteButton = new JButton("Delete"); - deleteButton.setToolTipText("Delete a user-defined material"); + //// Delete button + deleteButton = new JButton(trans.get("matedtpan.but.delete")); + //// Delete a user-defined material + deleteButton.setToolTipText(trans.get("matedtpan.but.ttip.delete")); deleteButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -188,13 +199,18 @@ public class MaterialEditPanel extends JPanel { this.add(new JPanel(), "grow 1"); - revertButton = new JButton("Revert all"); - revertButton.setToolTipText("Delete all user-defined materials"); + //// Revert all button + revertButton = new JButton(trans.get("matedtpan.but.revertall")); + //// Delete all user-defined materials + revertButton.setToolTipText(trans.get("matedtpan.but.ttip.revertall")); revertButton.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { int sel = JOptionPane.showConfirmDialog(MaterialEditPanel.this, - "Delete all user-defined materials?", "Revert all?", + //// Delete all user-defined materials? + trans.get("matedtpan.title.Deletealluser-defined"), + //// Revert all? + trans.get("matedtpan.title.Revertall"), JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE); if (sel == JOptionPane.YES_OPTION) { Iterator iterator; @@ -239,9 +255,9 @@ public class MaterialEditPanel extends JPanel { } }); - - this.add(new JLabel("Editing materials will not affect existing " + - "rocket designs."), "span"); + //// Editing materials will not affect existing + //// rocket designs. + this.add(new JLabel(trans.get("matedtpan.lbl.edtmaterials")), "span"); } diff --git a/src/net/sf/openrocket/gui/dialogs/preferences/PreferencesDialog.java b/src/net/sf/openrocket/gui/dialogs/preferences/PreferencesDialog.java index f0861208..04654de8 100644 --- a/src/net/sf/openrocket/gui/dialogs/preferences/PreferencesDialog.java +++ b/src/net/sf/openrocket/gui/dialogs/preferences/PreferencesDialog.java @@ -34,6 +34,7 @@ import net.sf.openrocket.gui.components.DescriptionArea; import net.sf.openrocket.gui.components.StyledLabel; import net.sf.openrocket.gui.dialogs.UpdateInfoDialog; import net.sf.openrocket.gui.main.SimpleFileFilter; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.logging.LogHelper; import net.sf.openrocket.startup.Application; import net.sf.openrocket.unit.Unit; @@ -47,22 +48,29 @@ public class PreferencesDialog extends JDialog { private final List unitSelectors = new ArrayList(); private File defaultDirectory = null; - + private static final Translator trans = Application.getTranslator(); + private PreferencesDialog() { - super((Window) null, "Preferences", Dialog.ModalityType.APPLICATION_MODAL); + //// Preferences + super((Window) null, trans.get("pref.dlg.title.Preferences"), Dialog.ModalityType.APPLICATION_MODAL); JPanel panel = new JPanel(new MigLayout("fill, gap unrel", "[grow]", "[grow][]")); JTabbedPane tabbedPane = new JTabbedPane(); panel.add(tabbedPane, "grow, wrap"); - - tabbedPane.addTab("Units", null, unitsPane(), "Default units"); - tabbedPane.addTab("Materials", null, new MaterialEditPanel(), "Custom materials"); - tabbedPane.addTab("Options", null, optionsPane(), "Miscellaneous options"); - - - JButton close = new JButton("Close"); + //// Units and Default units + tabbedPane.addTab(trans.get("pref.dlg.tab.Units"), null, unitsPane(), + trans.get("pref.dlg.tab.Defaultunits")); + //// Materials and Custom materials + tabbedPane.addTab(trans.get("pref.dlg.tab.Materials"), null, new MaterialEditPanel(), + trans.get("pref.dlg.tab.Custommaterials")); + //// Options and Miscellaneous options + tabbedPane.addTab(trans.get("pref.dlg.tab.Options"), null, optionsPane(), + trans.get("pref.dlg.tab.Miscellaneousoptions")); + + //// Close button + JButton close = new JButton(trans.get("dlg.but.close")); close.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent arg0) { @@ -90,17 +98,18 @@ public class PreferencesDialog extends JDialog { private JPanel optionsPane() { JPanel panel = new JPanel(new MigLayout("fillx, ins 30lp n n n")); - - panel.add(new JLabel("Position to insert new body components:"), "gapright para"); + //// Position to insert new body components: + panel.add(new JLabel(trans.get("pref.dlg.lbl.Positiontoinsert")), "gapright para"); panel.add(new JComboBox(new PrefChoiseSelector(Prefs.BODY_COMPONENT_INSERT_POSITION_KEY, "Always ask", "Insert in middle", "Add to end")), "wrap para, growx, sg combos"); - panel.add(new JLabel("Confirm deletion of simulations:")); + //// Confirm deletion of simulations: + panel.add(new JLabel(trans.get("pref.dlg.lbl.Confirmdeletion"))); panel.add(new JComboBox(new PrefBooleanSelector(Prefs.CONFIRM_DELETE_SIMULATION, "Delete", "Confirm", true)), "wrap 40lp, growx, sg combos"); - - panel.add(new JLabel("User-defined thrust curves:"), "spanx, wrap"); + //// User-defined thrust curves: + panel.add(new JLabel(trans.get("pref.dlg.lbl.User-definedthrust")), "spanx, wrap"); final JTextField field = new JTextField(); List files = Prefs.getUserThrustCurveFiles(); String str = ""; @@ -141,19 +150,26 @@ public class PreferencesDialog extends JDialog { }); panel.add(field, "w 100px, gapright unrel, spanx, growx, split"); - JButton button = new JButton("Add"); + //// Add button + JButton button = new JButton(trans.get("pref.dlg.but.add")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { JFileChooser chooser = new JFileChooser(); - SimpleFileFilter filter = new SimpleFileFilter("All thrust curve files (*.eng; *.rse; *.zip; directories)", + SimpleFileFilter filter = + new SimpleFileFilter( + //// All thrust curve files (*.eng; *.rse; *.zip; directories) + trans.get("pref.dlg.Allthrustcurvefiles"), true, "eng", "rse", "zip"); chooser.addChoosableFileFilter(filter); - chooser.addChoosableFileFilter(new SimpleFileFilter("RASP motor files (*.eng)", + //// RASP motor files (*.eng) + chooser.addChoosableFileFilter(new SimpleFileFilter(trans.get("pref.dlg.RASPfiles"), true, "eng")); - chooser.addChoosableFileFilter(new SimpleFileFilter("RockSim engine files (*.rse)", + //// RockSim engine files (*.rse) + chooser.addChoosableFileFilter(new SimpleFileFilter(trans.get("pref.dlg.RockSimfiles"), true, "rse")); - chooser.addChoosableFileFilter(new SimpleFileFilter("ZIP archives (*.zip)", + //// ZIP archives (*.zip) + chooser.addChoosableFileFilter(new SimpleFileFilter(trans.get("pref.dlg.ZIParchives"), true, "zip")); chooser.setFileFilter(filter); chooser.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES); @@ -176,7 +192,8 @@ public class PreferencesDialog extends JDialog { }); panel.add(button, "gapright unrel"); - button = new JButton("Reset"); + //// Reset button + button = new JButton(trans.get("pref.dlg.but.reset")); button.addActionListener(new ActionListener() { @Override @@ -196,8 +213,9 @@ public class PreferencesDialog extends JDialog { - - final JCheckBox softwareUpdateBox = new JCheckBox("Check for software updates at startup"); + //// Check for software updates at startup + final JCheckBox softwareUpdateBox = + new JCheckBox(trans.get("pref.dlg.checkbox.Checkupdates")); softwareUpdateBox.setSelected(Prefs.getCheckUpdates()); softwareUpdateBox.addActionListener(new ActionListener() { @Override @@ -207,8 +225,10 @@ public class PreferencesDialog extends JDialog { }); panel.add(softwareUpdateBox); - button = new JButton("Check now"); - button.setToolTipText("Check for software updates now"); + //// Check now button + button = new JButton(trans.get("pref.dlg.but.checknow")); + //// Check for software updates now + button.setToolTipText(trans.get("pref.dlg.ttip.Checkupdatesnow")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -225,106 +245,117 @@ public class PreferencesDialog extends JDialog { JPanel panel = new JPanel(new MigLayout("", "[][]40lp[][]")); JComboBox combo; - panel.add(new JLabel("Select your preferred units:"), "span, wrap paragraph"); + //// Select your preferred units: + panel.add(new JLabel(trans.get("pref.dlg.lbl.Selectprefunits")), "span, wrap paragraph"); - panel.add(new JLabel("Rocket dimensions:")); + //// Rocket dimensions: + panel.add(new JLabel(trans.get("pref.dlg.lbl.Rocketdimensions"))); combo = new JComboBox(new DefaultUnitSelector(UnitGroup.UNITS_LENGTH)); panel.add(combo, "sizegroup boxes"); - panel.add(new JLabel("Line density:")); + //// Line density: + panel.add(new JLabel(trans.get("pref.dlg.lbl.Linedensity"))); combo = new JComboBox(new DefaultUnitSelector(UnitGroup.UNITS_DENSITY_LINE)); panel.add(combo, "sizegroup boxes, wrap"); - - panel.add(new JLabel("Motor dimensions:")); + //// Motor dimensions: + panel.add(new JLabel(trans.get("pref.dlg.lbl.Motordimensions"))); combo = new JComboBox(new DefaultUnitSelector(UnitGroup.UNITS_MOTOR_DIMENSIONS)); panel.add(combo, "sizegroup boxes"); - panel.add(new JLabel("Surface density:")); + //// Surface density: + panel.add(new JLabel(trans.get("pref.dlg.lbl.Surfacedensity"))); combo = new JComboBox(new DefaultUnitSelector(UnitGroup.UNITS_DENSITY_SURFACE)); panel.add(combo, "sizegroup boxes, wrap"); - - panel.add(new JLabel("Distance:")); + //// Distance: + panel.add(new JLabel(trans.get("pref.dlg.lbl.Distance"))); combo = new JComboBox(new DefaultUnitSelector(UnitGroup.UNITS_DISTANCE)); panel.add(combo, "sizegroup boxes"); - panel.add(new JLabel("Bulk density::")); + //// Bulk density:: + panel.add(new JLabel(trans.get("pref.dlg.lbl.Bulkdensity"))); combo = new JComboBox(new DefaultUnitSelector(UnitGroup.UNITS_DENSITY_BULK)); panel.add(combo, "sizegroup boxes, wrap"); - - panel.add(new JLabel("Velocity:")); + //// Velocity: + panel.add(new JLabel(trans.get("pref.dlg.lbl.Velocity"))); combo = new JComboBox(new DefaultUnitSelector(UnitGroup.UNITS_VELOCITY)); panel.add(combo, "sizegroup boxes"); - panel.add(new JLabel("Surface roughness:")); + //// Surface roughness: + panel.add(new JLabel(trans.get("pref.dlg.lbl.Surfaceroughness"))); combo = new JComboBox(new DefaultUnitSelector(UnitGroup.UNITS_ROUGHNESS)); panel.add(combo, "sizegroup boxes, wrap"); - - panel.add(new JLabel("Acceleration:")); + //// Acceleration: + panel.add(new JLabel(trans.get("pref.dlg.lbl.Acceleration"))); combo = new JComboBox(new DefaultUnitSelector(UnitGroup.UNITS_ACCELERATION)); panel.add(combo, "sizegroup boxes"); - panel.add(new JLabel("Area:")); + //// Area: + panel.add(new JLabel(trans.get("pref.dlg.lbl.Area"))); combo = new JComboBox(new DefaultUnitSelector(UnitGroup.UNITS_AREA)); panel.add(combo, "sizegroup boxes, wrap"); - - panel.add(new JLabel("Mass:")); + //// Mass: + panel.add(new JLabel(trans.get("pref.dlg.lbl.Mass"))); combo = new JComboBox(new DefaultUnitSelector(UnitGroup.UNITS_MASS)); panel.add(combo, "sizegroup boxes"); - panel.add(new JLabel("Angle:")); + //// Angle: + panel.add(new JLabel(trans.get("pref.dlg.lbl.Angle"))); combo = new JComboBox(new DefaultUnitSelector(UnitGroup.UNITS_ANGLE)); panel.add(combo, "sizegroup boxes, wrap"); - - panel.add(new JLabel("Force:")); + //// Force: + panel.add(new JLabel(trans.get("pref.dlg.lbl.Force"))); combo = new JComboBox(new DefaultUnitSelector(UnitGroup.UNITS_FORCE)); panel.add(combo, "sizegroup boxes"); - panel.add(new JLabel("Roll rate:")); + //// Roll rate: + panel.add(new JLabel(trans.get("pref.dlg.lbl.Rollrate"))); combo = new JComboBox(new DefaultUnitSelector(UnitGroup.UNITS_ROLL)); panel.add(combo, "sizegroup boxes, wrap"); - - panel.add(new JLabel("Total impulse:")); + //// Total impulse: + panel.add(new JLabel(trans.get("pref.dlg.lbl.Totalimpulse"))); combo = new JComboBox(new DefaultUnitSelector(UnitGroup.UNITS_IMPULSE)); panel.add(combo, "sizegroup boxes"); - panel.add(new JLabel("Temperature:")); + //// Temperature: + panel.add(new JLabel(trans.get("pref.dlg.lbl.Temperature"))); combo = new JComboBox(new DefaultUnitSelector(UnitGroup.UNITS_TEMPERATURE)); panel.add(combo, "sizegroup boxes, wrap"); - - panel.add(new JLabel("Moment of inertia:")); + //// Moment of inertia: + panel.add(new JLabel(trans.get("pref.dlg.lbl.Momentofinertia"))); combo = new JComboBox(new DefaultUnitSelector(UnitGroup.UNITS_INERTIA)); panel.add(combo, "sizegroup boxes"); - panel.add(new JLabel("Pressure:")); + //// Pressure: + panel.add(new JLabel(trans.get("pref.dlg.lbl.Pressure"))); combo = new JComboBox(new DefaultUnitSelector(UnitGroup.UNITS_PRESSURE)); panel.add(combo, "sizegroup boxes, wrap"); - - panel.add(new JLabel("Stability:")); + //// Stability: + panel.add(new JLabel(trans.get("pref.dlg.lbl.Stability"))); combo = new JComboBox(new DefaultUnitSelector(UnitGroup.UNITS_STABILITY)); panel.add(combo, "sizegroup boxes, wrap para"); - - JButton button = new JButton("Default metric"); + //// Default metric button + JButton button = new JButton(trans.get("pref.dlg.but.defaultmetric")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -335,7 +366,8 @@ public class PreferencesDialog extends JDialog { }); panel.add(button, "spanx, split 2, grow"); - button = new JButton("Default imperial"); + //// Default imperial button + button = new JButton(trans.get("pref.dlg.but.defaultimperial")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -346,8 +378,9 @@ public class PreferencesDialog extends JDialog { }); panel.add(button, "grow, wrap para"); - - panel.add(new StyledLabel("The effects will take place the next time you open a window.", -2), + //// The effects will take place the next time you open a window. + panel.add(new StyledLabel( + trans.get("pref.dlg.lbl.effect1"), -2), "spanx, wrap"); @@ -520,13 +553,15 @@ public class PreferencesDialog extends JDialog { final JDialog dialog = new JDialog(this, ModalityType.APPLICATION_MODAL); JPanel panel = new JPanel(new MigLayout()); - panel.add(new JLabel("Checking for updates..."), "wrap"); + //// Checking for updates... + panel.add(new JLabel(trans.get("pref.dlg.lbl.Checkingupdates")), "wrap"); JProgressBar bar = new JProgressBar(); bar.setIndeterminate(true); panel.add(bar, "growx, wrap para"); - JButton cancel = new JButton("Cancel"); + //// Cancel button + JButton cancel = new JButton(trans.get("dlg.but.cancel")); cancel.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -564,14 +599,18 @@ public class PreferencesDialog extends JDialog { UpdateInfo info = retriever.getUpdateInfo(); if (info == null) { JOptionPane.showMessageDialog(this, - "An error occurred while communicating with the server.", - "Unable to retrieve update information", JOptionPane.WARNING_MESSAGE, null); + //// An error occurred while communicating with the server. + trans.get("pref.dlg.lbl.msg1"), + //// Unable to retrieve update information + trans.get("pref.dlg.lbl.msg2"), JOptionPane.WARNING_MESSAGE, null); } else if (info.getLatestVersion() == null || info.getLatestVersion().equals("") || Prefs.getVersion().equalsIgnoreCase(info.getLatestVersion())) { JOptionPane.showMessageDialog(this, - "You are running the latest version of OpenRocket.", - "No updates available", JOptionPane.INFORMATION_MESSAGE, null); + //// You are running the latest version of OpenRocket. + trans.get("pref.dlg.lbl.msg3"), + //// No updates available + trans.get("pref.dlg.lbl.msg4"), JOptionPane.INFORMATION_MESSAGE, null); } else { UpdateInfoDialog infoDialog = new UpdateInfoDialog(info); infoDialog.setVisible(true); diff --git a/src/net/sf/openrocket/gui/figureelements/RocketInfo.java b/src/net/sf/openrocket/gui/figureelements/RocketInfo.java index 0e9ef165..4832c61f 100644 --- a/src/net/sf/openrocket/gui/figureelements/RocketInfo.java +++ b/src/net/sf/openrocket/gui/figureelements/RocketInfo.java @@ -2,8 +2,10 @@ package net.sf.openrocket.gui.figureelements; import net.sf.openrocket.aerodynamics.Warning; import net.sf.openrocket.aerodynamics.WarningSet; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.rocketcomponent.Configuration; import net.sf.openrocket.simulation.FlightData; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.unit.Unit; import net.sf.openrocket.unit.UnitGroup; import net.sf.openrocket.util.MathUtil; @@ -28,6 +30,7 @@ import static net.sf.openrocket.util.Chars.THETA; */ public class RocketInfo implements FigureElement { + private static final Translator trans = Application.getTranslator(); // Margin around the figure edges, pixels private static final int MARGIN = 8; diff --git a/src/net/sf/openrocket/gui/main/BasicFrame.java b/src/net/sf/openrocket/gui/main/BasicFrame.java index 9d79c13b..63fbc9e5 100644 --- a/src/net/sf/openrocket/gui/main/BasicFrame.java +++ b/src/net/sf/openrocket/gui/main/BasicFrame.java @@ -81,6 +81,7 @@ import net.sf.openrocket.gui.dialogs.WarningDialog; import net.sf.openrocket.gui.dialogs.preferences.PreferencesDialog; import net.sf.openrocket.gui.main.componenttree.ComponentTree; import net.sf.openrocket.gui.scalefigure.RocketPanel; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.logging.LogHelper; import net.sf.openrocket.rocketcomponent.ComponentChangeEvent; import net.sf.openrocket.rocketcomponent.ComponentChangeListener; @@ -109,20 +110,24 @@ public class BasicFrame extends JFrame { private static final RocketSaver ROCKET_SAVER = new OpenRocketSaver(); - + private static final Translator trans = Application.getTranslator(); + // FileFilters for different types of rocket design files private static final FileFilter ALL_DESIGNS_FILTER = - new SimpleFileFilter("All rocket designs (*.ork; *.rkt)", + //// All rocket designs (*.ork; *.rkt) + new SimpleFileFilter(trans.get("BasicFrame.SimpleFileFilter1"), ".ork", ".ork.gz", ".rkt", ".rkt.gz"); private static final FileFilter OPENROCKET_DESIGN_FILTER = - new SimpleFileFilter("OpenRocket designs (*.ork)", ".ork", ".ork.gz"); + //// OpenRocket designs (*.ork) + new SimpleFileFilter(trans.get("BasicFrame.SimpleFileFilter2"), ".ork", ".ork.gz"); private static final FileFilter ROCKSIM_DESIGN_FILTER = - new SimpleFileFilter("RockSim designs (*.rkt)", ".rkt", ".rkt.gz"); + //// RockSim designs (*.rkt) + new SimpleFileFilter(trans.get("BasicFrame.SimpleFileFilter3"), ".rkt", ".rkt.gz"); - + public static final int COMPONENT_TAB = 0; public static final int SIMULATION_TAB = 1; @@ -213,8 +218,10 @@ public class BasicFrame extends JFrame { // The top tabbed pane tabbedPane = new JTabbedPane(); - tabbedPane.addTab("Rocket design", null, designTab()); - tabbedPane.addTab("Flight simulations", null, simulationPanel); + //// Rocket design + tabbedPane.addTab(trans.get("BasicFrame.tab.Rocketdesign"), null, designTab()); + //// Flight simulations + tabbedPane.addTab(trans.get("BasicFrame.tab.Flightsim"), null, simulationPanel); vertical.setTopComponent(tabbedPane); @@ -375,7 +382,7 @@ public class BasicFrame extends JFrame { scroll.setBorder(null); scroll.setViewportBorder(null); - TitledBorder border = new TitledBorder("Add new component"); + TitledBorder border = new TitledBorder(trans.get("BasicFrame.title.Addnewcomp")); border.setTitleFont(border.getTitleFont().deriveFont(Font.BOLD)); scroll.setBorder(border); @@ -397,14 +404,17 @@ public class BasicFrame extends JFrame { JMenuItem item; //// File - menu = new JMenu("File"); + menu = new JMenu(trans.get("main.menu.file")); menu.setMnemonic(KeyEvent.VK_F); + //// File-handling related tasks menu.getAccessibleContext().setAccessibleDescription("File-handling related tasks"); menubar.add(menu); - item = new JMenuItem("New", KeyEvent.VK_N); + //// New + item = new JMenuItem(trans.get("main.menu.file.new"), KeyEvent.VK_N); item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_N, ActionEvent.CTRL_MASK)); item.setMnemonic(KeyEvent.VK_N); + //// Create a new rocket design item.getAccessibleContext().setAccessibleDescription("Create a new rocket design"); item.setIcon(Icons.FILE_NEW); item.addActionListener(new ActionListener() { @@ -420,9 +430,11 @@ public class BasicFrame extends JFrame { }); menu.add(item); - item = new JMenuItem("Open...", KeyEvent.VK_O); + //// Open... + item = new JMenuItem(trans.get("main.menu.file.open"), KeyEvent.VK_O); item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, ActionEvent.CTRL_MASK)); - item.getAccessibleContext().setAccessibleDescription("Open a rocket design"); + //// Open a rocket design + item.getAccessibleContext().setAccessibleDescription(trans.get("BasicFrame.item.Openrocketdesign")); item.setIcon(Icons.FILE_OPEN); item.addActionListener(new ActionListener() { @Override @@ -433,8 +445,10 @@ public class BasicFrame extends JFrame { }); menu.add(item); - item = new JMenuItem("Open example..."); - item.getAccessibleContext().setAccessibleDescription("Open an example rocket design"); + //// Open example... + item = new JMenuItem(trans.get("main.menu.file.openExample")); + //// Open an example rocket design + item.getAccessibleContext().setAccessibleDescription(trans.get("BasicFrame.item.Openexamplerocketdesign")); item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_O, ActionEvent.CTRL_MASK | ActionEvent.SHIFT_MASK)); item.setIcon(Icons.FILE_OPEN_EXAMPLE); @@ -455,9 +469,11 @@ public class BasicFrame extends JFrame { menu.addSeparator(); - item = new JMenuItem("Save", KeyEvent.VK_S); + //// Save + item = new JMenuItem(trans.get("main.menu.file.save"), KeyEvent.VK_S); item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, ActionEvent.CTRL_MASK)); - item.getAccessibleContext().setAccessibleDescription("Save the current rocket design"); + //// Save the current rocket design + item.getAccessibleContext().setAccessibleDescription(trans.get("BasicFrame.item.SavecurRocketdesign")); item.setIcon(Icons.FILE_SAVE); item.addActionListener(new ActionListener() { @Override @@ -468,11 +484,12 @@ public class BasicFrame extends JFrame { }); menu.add(item); - item = new JMenuItem("Save as...", KeyEvent.VK_A); + //// Save as... + item = new JMenuItem(trans.get("main.menu.file.saveAs"), KeyEvent.VK_A); item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_S, ActionEvent.CTRL_MASK | ActionEvent.SHIFT_MASK)); - item.getAccessibleContext().setAccessibleDescription("Save the current rocket design " + - "to a new file"); + //// Save the current rocket design to a new file + item.getAccessibleContext().setAccessibleDescription(trans.get("BasicFrame.item.SavecurRocketdesnewfile")); item.setIcon(Icons.FILE_SAVE_AS); item.addActionListener(new ActionListener() { @Override @@ -483,10 +500,11 @@ public class BasicFrame extends JFrame { }); menu.add(item); - - item = new JMenuItem("Print...", KeyEvent.VK_P); + //// Print... + item = new JMenuItem(trans.get("main.menu.file.print"), KeyEvent.VK_P); item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_P, ActionEvent.CTRL_MASK)); - item.getAccessibleContext().setAccessibleDescription("Print parts list and fin template"); + //// Print parts list and fin template + item.getAccessibleContext().setAccessibleDescription(trans.get("BasicFrame.item.Printpart")); item.setIcon(Icons.FILE_PRINT); item.addActionListener(new ActionListener() { @Override @@ -499,9 +517,11 @@ public class BasicFrame extends JFrame { menu.addSeparator(); - item = new JMenuItem("Close", KeyEvent.VK_C); + //// Close + item = new JMenuItem(trans.get("main.menu.file.close"), KeyEvent.VK_C); item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_W, ActionEvent.CTRL_MASK)); - item.getAccessibleContext().setAccessibleDescription("Close the current rocket design"); + //// Close the current rocket design + item.getAccessibleContext().setAccessibleDescription(trans.get("BasicFrame.item.Closedesign")); item.setIcon(Icons.FILE_CLOSE); item.addActionListener(new ActionListener() { @Override @@ -514,9 +534,11 @@ public class BasicFrame extends JFrame { menu.addSeparator(); - item = new JMenuItem("Quit", KeyEvent.VK_Q); + //// Quit + item = new JMenuItem(trans.get("main.menu.file.quit"), KeyEvent.VK_Q); item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q, ActionEvent.CTRL_MASK)); - item.getAccessibleContext().setAccessibleDescription("Quit the program"); + //// Quit the program + item.getAccessibleContext().setAccessibleDescription(trans.get("BasicFrame.item.Quitprogram")); item.setIcon(Icons.FILE_QUIT); item.addActionListener(new ActionListener() { @Override @@ -530,9 +552,10 @@ public class BasicFrame extends JFrame { //// Edit - menu = new JMenu("Edit"); + menu = new JMenu(trans.get("main.menu.edit")); menu.setMnemonic(KeyEvent.VK_E); - menu.getAccessibleContext().setAccessibleDescription("Rocket editing"); + //// Rocket editing + menu.getAccessibleContext().setAccessibleDescription(trans.get("BasicFrame.menu.Rocketedt")); menubar.add(menu); @@ -540,6 +563,7 @@ public class BasicFrame extends JFrame { item = new JMenuItem(action); item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Z, ActionEvent.CTRL_MASK)); item.setMnemonic(KeyEvent.VK_U); + //// Undo the previous operation item.getAccessibleContext().setAccessibleDescription("Undo the previous operation"); menu.add(item); @@ -548,6 +572,7 @@ public class BasicFrame extends JFrame { item = new JMenuItem(action); item.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Y, ActionEvent.CTRL_MASK)); item.setMnemonic(KeyEvent.VK_R); + //// Redo the previously undone operation item.getAccessibleContext().setAccessibleDescription("Redo the previously undone " + "operation"); menu.add(item); @@ -569,8 +594,10 @@ public class BasicFrame extends JFrame { menu.addSeparator(); - item = new JMenuItem("Preferences"); + //// Preferences + item = new JMenuItem(trans.get("main.menu.edit.preferences")); item.setIcon(Icons.PREFERENCES); + //// Setup the application preferences item.getAccessibleContext().setAccessibleDescription("Setup the application " + "preferences"); item.addActionListener(new ActionListener() { @@ -586,12 +613,15 @@ public class BasicFrame extends JFrame { //// Analyze - menu = new JMenu("Analyze"); + menu = new JMenu(trans.get("main.menu.analyze")); menu.setMnemonic(KeyEvent.VK_A); + //// Analyzing the rocket menu.getAccessibleContext().setAccessibleDescription("Analyzing the rocket"); menubar.add(menu); - item = new JMenuItem("Component analysis", KeyEvent.VK_C); + //// Component analysis + item = new JMenuItem(trans.get("main.menu.analyze.componentAnalysis"), KeyEvent.VK_C); + //// Analyze the rocket components separately item.getAccessibleContext().setAccessibleDescription("Analyze the rocket components " + "separately"); item.addActionListener(new ActionListener() { @@ -614,14 +644,16 @@ public class BasicFrame extends JFrame { //// Help - menu = new JMenu("Help"); + menu = new JMenu(trans.get("main.menu.help")); menu.setMnemonic(KeyEvent.VK_H); + //// Information about OpenRocket menu.getAccessibleContext().setAccessibleDescription("Information about OpenRocket"); menubar.add(menu); - - item = new JMenuItem("License", KeyEvent.VK_L); + //// License + item = new JMenuItem(trans.get("main.menu.help.license"), KeyEvent.VK_L); + //// OpenRocket license information item.getAccessibleContext().setAccessibleDescription("OpenRocket license information"); item.addActionListener(new ActionListener() { @Override @@ -634,7 +666,9 @@ public class BasicFrame extends JFrame { menu.addSeparator(); - item = new JMenuItem("Bug report", KeyEvent.VK_B); + //// Bug report + item = new JMenuItem(trans.get("main.menu.help.bugReport"), KeyEvent.VK_B); + //// Information about reporting bugs in OpenRocket item.getAccessibleContext().setAccessibleDescription("Information about reporting " + "bugs in OpenRocket"); item.addActionListener(new ActionListener() { @@ -646,7 +680,9 @@ public class BasicFrame extends JFrame { }); menu.add(item); - item = new JMenuItem("Debug log"); + //// Debug log + item = new JMenuItem(trans.get("main.menu.help.debugLog")); + //// View the OpenRocket debug log item.getAccessibleContext().setAccessibleDescription("View the OpenRocket debug log"); item.addActionListener(new ActionListener() { @Override @@ -659,7 +695,9 @@ public class BasicFrame extends JFrame { menu.addSeparator(); - item = new JMenuItem("About", KeyEvent.VK_A); + //// About + item = new JMenuItem(trans.get("main.menu.help.about"), KeyEvent.VK_A); + //// About OpenRocket item.getAccessibleContext().setAccessibleDescription("About OpenRocket"); item.addActionListener(new ActionListener() { @Override @@ -681,8 +719,10 @@ public class BasicFrame extends JFrame { //// Debug menu menu = new JMenu("Debug"); + //// OpenRocket debugging tasks menu.getAccessibleContext().setAccessibleDescription("OpenRocket debugging tasks"); + //// What is this menu? item = new JMenuItem("What is this menu?"); item.addActionListener(new ActionListener() { @Override @@ -702,6 +742,7 @@ public class BasicFrame extends JFrame { menu.addSeparator(); + //// Create test rocket item = new JMenuItem("Create test rocket"); item.addActionListener(new ActionListener() { @Override @@ -808,7 +849,7 @@ public class BasicFrame extends JFrame { }); menu.add(item); - + //// Exhaust memory item = new JMenuItem("Exhaust memory"); item.addActionListener(new ActionListener() { @Override @@ -841,6 +882,7 @@ public class BasicFrame extends JFrame { menu.addSeparator(); + //// Exception here item = new JMenuItem("Exception here"); item.addActionListener(new ActionListener() { @Override @@ -1261,9 +1303,10 @@ public class BasicFrame extends JFrame { log.info("Confirming whether to save the design"); ComponentConfigDialog.hideDialog(); int result = JOptionPane.showConfirmDialog(this, - "Design '" + rocket.getName() + "' has not been saved. " + - "Do you want to save it?", - "Design not saved", JOptionPane.YES_NO_CANCEL_OPTION, + trans.get("BasicFrame.dlg.lbl1") + rocket.getName() + + trans.get("BasicFrame.dlg.lbl2")+ " " + + trans.get("BasicFrame.dlg.lbl3"), + trans.get("BasicFrame.dlg.title"), JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE); if (result == JOptionPane.YES_OPTION) { // Save diff --git a/src/net/sf/openrocket/gui/main/ComponentAddButtons.java b/src/net/sf/openrocket/gui/main/ComponentAddButtons.java index e5429e3a..a5bdb789 100644 --- a/src/net/sf/openrocket/gui/main/ComponentAddButtons.java +++ b/src/net/sf/openrocket/gui/main/ComponentAddButtons.java @@ -30,6 +30,7 @@ import net.sf.openrocket.document.OpenRocketDocument; import net.sf.openrocket.gui.components.StyledLabel; import net.sf.openrocket.gui.configdialog.ComponentConfigDialog; import net.sf.openrocket.gui.main.componenttree.ComponentTreeModel; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.logging.LogHelper; import net.sf.openrocket.rocketcomponent.BodyComponent; import net.sf.openrocket.rocketcomponent.BodyTube; @@ -66,6 +67,7 @@ import net.sf.openrocket.util.Reflection; public class ComponentAddButtons extends JPanel implements Scrollable { private static final LogHelper log = Application.getLogger(); + private static final Translator trans = Application.getTranslator(); private static final int ROWS = 3; private static final int MAXCOLS = 6; @@ -103,39 +105,57 @@ public class ComponentAddButtons extends JPanel implements Scrollable { //////////////////////////////////////////// - - addButtonRow("Body components and fin sets", row, - new BodyComponentButton(NoseCone.class, "Nose cone"), - new BodyComponentButton(BodyTube.class, "Body tube"), - new BodyComponentButton(Transition.class, "Transition"), - new FinButton(TrapezoidFinSet.class, "Trapezoidal"), // TODO: MEDIUM: freer fin placing - new FinButton(EllipticalFinSet.class, "Elliptical"), - new FinButton(FreeformFinSet.class, "Freeform"), - new FinButton(LaunchLug.class, "Launch lug")); + //// Body components and fin sets + addButtonRow(trans.get("compaddbuttons.Bodycompandfinsets"), row, + //// Nose cone + new BodyComponentButton(NoseCone.class, trans.get("compaddbuttons.Nosecone")), + //// Body tube + new BodyComponentButton(BodyTube.class, trans.get("compaddbuttons.Bodytube")), + //// Transition + new BodyComponentButton(Transition.class, trans.get("compaddbuttons.Transition")), + //// Trapezoidal + new FinButton(TrapezoidFinSet.class, trans.get("compaddbuttons.Trapezoidal")), // TODO: MEDIUM: freer fin placing + //// Elliptical + new FinButton(EllipticalFinSet.class, trans.get("compaddbuttons.Elliptical")), + //// Freeform + new FinButton(FreeformFinSet.class, trans.get("compaddbuttons.Freeform")), + //// Launch lug + new FinButton(LaunchLug.class, trans.get("compaddbuttons.Launchlug"))); row++; ///////////////////////////////////////////// - addButtonRow("Inner component", row, - new ComponentButton(InnerTube.class, "Inner tube"), - new ComponentButton(TubeCoupler.class, "Coupler"), - new ComponentButton(CenteringRing.class, "Centering\nring"), - new ComponentButton(Bulkhead.class, "Bulkhead"), - new ComponentButton(EngineBlock.class, "Engine\nblock")); + //// Inner component + addButtonRow(trans.get("compaddbuttons.Innercomponent"), row, + //// Inner tube + new ComponentButton(InnerTube.class, trans.get("compaddbuttons.Innertube")), + //// Coupler + new ComponentButton(TubeCoupler.class, trans.get("compaddbuttons.Coupler")), + //// Centering\nring + new ComponentButton(CenteringRing.class, trans.get("compaddbuttons.Centeringring")), + //// Bulkhead + new ComponentButton(Bulkhead.class, trans.get("compaddbuttons.Bulkhead")), + //// Engine\nblock + new ComponentButton(EngineBlock.class, trans.get("compaddbuttons.Engineblock"))); row++; //////////////////////////////////////////// - addButtonRow("Mass objects", row, - new ComponentButton(Parachute.class, "Parachute"), - new ComponentButton(Streamer.class, "Streamer"), - new ComponentButton(ShockCord.class, "Shock cord"), + //// Mass objects + addButtonRow(trans.get("compaddbuttons.Massobjects"), row, + //// Parachute + new ComponentButton(Parachute.class, trans.get("compaddbuttons.Parachute")), + //// Streamer + new ComponentButton(Streamer.class, trans.get("compaddbuttons.Streamer")), + //// Shock cord + new ComponentButton(ShockCord.class, trans.get("compaddbuttons.Shockcord")), // new ComponentButton("Motor clip"), // new ComponentButton("Payload"), - new ComponentButton(MassComponent.class, "Mass\ncomponent")); + //// Mass\ncomponent + new ComponentButton(MassComponent.class, trans.get("compaddbuttons.Masscomponent"))); // Get maximum button size @@ -511,20 +531,27 @@ public class ComponentAddButtons extends JPanel implements Scrollable { } private int askPosition() { - Object[] options = { "Insert here", "Add to the end", "Cancel" }; + //// Insert here + //// Add to the end + //// Cancel + Object[] options = { trans.get("compaddbuttons.askPosition.Inserthere"), + trans.get("compaddbuttons.askPosition.Addtotheend"), + trans.get("compaddbuttons.askPosition.Cancel") }; JPanel panel = new JPanel(new MigLayout()); - JCheckBox check = new JCheckBox("Do not ask me again"); + //// Do not ask me again + JCheckBox check = new JCheckBox(trans.get("compaddbuttons.Donotaskmeagain")); panel.add(check, "wrap"); - panel.add(new StyledLabel("You can change the default operation in the " + - "preferences.", -2)); + //// You can change the default operation in the preferences. + panel.add(new StyledLabel(trans.get("compaddbuttons.lbl.Youcanchange"), -2)); int sel = JOptionPane.showOptionDialog(null, // parent component + //// Insert the component after the current component or as the last component? new Object[] { - "Insert the component after the current component or as the last " + - "component?", + trans.get("compaddbuttons.lbl.insertcomp"), panel }, - "Select component position", // title + //// Select component position + trans.get("compaddbuttons.Selectcomppos"), // title JOptionPane.DEFAULT_OPTION, // default selections JOptionPane.QUESTION_MESSAGE, // dialog type null, // icon diff --git a/src/net/sf/openrocket/gui/main/RocketActions.java b/src/net/sf/openrocket/gui/main/RocketActions.java index 76f3c633..625afdab 100644 --- a/src/net/sf/openrocket/gui/main/RocketActions.java +++ b/src/net/sf/openrocket/gui/main/RocketActions.java @@ -17,11 +17,13 @@ import net.sf.openrocket.document.OpenRocketDocument; import net.sf.openrocket.document.Simulation; import net.sf.openrocket.gui.components.StyledLabel; import net.sf.openrocket.gui.configdialog.ComponentConfigDialog; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.rocketcomponent.ComponentChangeEvent; import net.sf.openrocket.rocketcomponent.ComponentChangeListener; import net.sf.openrocket.rocketcomponent.Rocket; import net.sf.openrocket.rocketcomponent.RocketComponent; import net.sf.openrocket.rocketcomponent.Stage; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.util.Icons; import net.sf.openrocket.util.Pair; import net.sf.openrocket.util.Prefs; @@ -59,7 +61,8 @@ public class RocketActions { private final RocketAction newStageAction; private final RocketAction moveUpAction; private final RocketAction moveDownAction; - + private static final Translator trans = Application.getTranslator(); + public RocketActions(OpenRocketDocument document, DocumentSelectionModel selectionModel, BasicFrame parentFrame) { @@ -207,19 +210,23 @@ public class RocketActions { boolean verify = Prefs.NODE.getBoolean(Prefs.CONFIRM_DELETE_SIMULATION, true); if (verify) { JPanel panel = new JPanel(new MigLayout()); - JCheckBox dontAsk = new JCheckBox("Do not ask me again"); + //// Do not ask me again + JCheckBox dontAsk = new JCheckBox(trans.get("RocketActions.checkbox.Donotaskmeagain")); panel.add(dontAsk,"wrap"); - panel.add(new StyledLabel("You can change the default operation in the " + - "preferences.",-2)); + //// You can change the default operation in the preferences. + panel.add(new StyledLabel(trans.get("RocketActions.lbl.Youcanchangedefop"),-2)); int ret = JOptionPane.showConfirmDialog( parentFrame, new Object[] { - "Delete the selected simulations?", - "This operation cannot be undone.", + //// Delete the selected simulations? + trans.get("RocketActions.showConfirmDialog.lbl1"), + //// This operation cannot be undone. + trans.get("RocketActions.showConfirmDialog.lbl2"), "", panel }, - "Delete simulations", + //// Delete simulations + trans.get("RocketActions.showConfirmDialog.title"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE); if (ret != JOptionPane.OK_OPTION) @@ -278,8 +285,10 @@ public class RocketActions { */ private class DeleteComponentAction extends RocketAction { public DeleteComponentAction() { - this.putValue(NAME, "Delete"); - this.putValue(SHORT_DESCRIPTION, "Delete the selected component."); + //// Delete + this.putValue(NAME, trans.get("RocketActions.DelCompAct.Delete")); + //// Delete the selected component. + this.putValue(SHORT_DESCRIPTION, trans.get("RocketActions.DelCompAct.ttip.Delete")); this.putValue(MNEMONIC_KEY, KeyEvent.VK_D); // this.putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0)); this.putValue(SMALL_ICON, Icons.EDIT_DELETE); @@ -311,8 +320,10 @@ public class RocketActions { */ private class DeleteSimulationAction extends RocketAction { public DeleteSimulationAction() { - this.putValue(NAME, "Delete"); - this.putValue(SHORT_DESCRIPTION, "Delete the selected simulation."); + //// Delete + this.putValue(NAME, trans.get("RocketActions.DelSimuAct.Delete")); + //// Delete the selected simulation. + this.putValue(SHORT_DESCRIPTION, trans.get("RocketActions.DelSimuAct.ttip.Delete")); this.putValue(MNEMONIC_KEY, KeyEvent.VK_D); // this.putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0)); this.putValue(SMALL_ICON, Icons.EDIT_DELETE); @@ -344,8 +355,10 @@ public class RocketActions { */ private class DeleteAction extends RocketAction { public DeleteAction() { - this.putValue(NAME, "Delete"); - this.putValue(SHORT_DESCRIPTION, "Delete the selected component or simulation."); + //// Delete + this.putValue(NAME, trans.get("RocketActions.DelAct.Delete")); + //// Delete the selected component or simulation. + this.putValue(SHORT_DESCRIPTION, trans.get("RocketActions.DelAct.ttip.Delete")); this.putValue(MNEMONIC_KEY, KeyEvent.VK_D); this.putValue(ACCELERATOR_KEY, KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0)); this.putValue(SMALL_ICON, Icons.EDIT_DELETE); @@ -377,11 +390,12 @@ public class RocketActions { */ private class CutAction extends RocketAction { public CutAction() { - this.putValue(NAME, "Cut"); + //// Cut + this.putValue(NAME, trans.get("RocketActions.CutAction.Cut")); this.putValue(MNEMONIC_KEY, KeyEvent.VK_T); this.putValue(ACCELERATOR_KEY, CUT_KEY_STROKE); - this.putValue(SHORT_DESCRIPTION, "Cut this component or simulation to " - + "the clipboard and remove from this design"); + //// Cut this component or simulation to the clipboard and remove from this design + this.putValue(SHORT_DESCRIPTION, trans.get("RocketActions.CutAction.ttip.Cut")); this.putValue(SMALL_ICON, Icons.EDIT_CUT); clipboardChanged(); } @@ -427,11 +441,12 @@ public class RocketActions { */ private class CopyAction extends RocketAction { public CopyAction() { - this.putValue(NAME, "Copy"); + //// Copy + this.putValue(NAME, trans.get("RocketActions.CopyAct.Copy")); this.putValue(MNEMONIC_KEY, KeyEvent.VK_C); this.putValue(ACCELERATOR_KEY, COPY_KEY_STROKE); - this.putValue(SHORT_DESCRIPTION, "Copy this component (and subcomponents) to " - + "the clipboard."); + //// Copy this component (and subcomponents) to the clipboard. + this.putValue(SHORT_DESCRIPTION, trans.get("RocketActions.CopyAct.Copy")); this.putValue(SMALL_ICON, Icons.EDIT_COPY); clipboardChanged(); } @@ -472,11 +487,12 @@ public class RocketActions { */ private class PasteAction extends RocketAction { public PasteAction() { - this.putValue(NAME, "Paste"); + //// Paste + this.putValue(NAME, trans.get("RocketActions.PasteAct.Paste")); this.putValue(MNEMONIC_KEY, KeyEvent.VK_P); this.putValue(ACCELERATOR_KEY, PASTE_KEY_STROKE); - this.putValue(SHORT_DESCRIPTION, "Paste the component or simulation on " - + "the clipboard to the design."); + //// Paste the component or simulation on the clipboard to the design. + this.putValue(SHORT_DESCRIPTION, trans.get("RocketActions.PasteAct.ttip.Paste")); this.putValue(SMALL_ICON, Icons.EDIT_PASTE); clipboardChanged(); } @@ -534,8 +550,10 @@ public class RocketActions { */ private class EditAction extends RocketAction { public EditAction() { - this.putValue(NAME, "Edit"); - this.putValue(SHORT_DESCRIPTION, "Edit the selected component."); + //// Edit + this.putValue(NAME, trans.get("RocketActions.EditAct.Edit")); + //// Edit the selected component. + this.putValue(SHORT_DESCRIPTION, trans.get("RocketActions.EditAct.ttip.Edit")); clipboardChanged(); } @@ -565,8 +583,10 @@ public class RocketActions { */ private class NewStageAction extends RocketAction { public NewStageAction() { - this.putValue(NAME, "New stage"); - this.putValue(SHORT_DESCRIPTION, "Add a new stage to the rocket design."); + //// New stage + this.putValue(NAME, trans.get("RocketActions.NewStageAct.Newstage")); + //// Add a new stage to the rocket design. + this.putValue(SHORT_DESCRIPTION, trans.get("RocketActions.NewStageAct.Newstage")); clipboardChanged(); } @@ -576,7 +596,9 @@ public class RocketActions { ComponentConfigDialog.hideDialog(); RocketComponent stage = new Stage(); - stage.setName("Booster stage"); + //// Booster stage + stage.setName(trans.get("RocketActions.ActBoosterstage")); + //// Add stage document.addUndoPosition("Add stage"); rocket.addChild(stage); rocket.getDefaultConfiguration().setAllStages(); @@ -599,8 +621,10 @@ public class RocketActions { */ private class MoveUpAction extends RocketAction { public MoveUpAction() { - this.putValue(NAME, "Move up"); - this.putValue(SHORT_DESCRIPTION, "Move this component upwards."); + //// Move up + this.putValue(NAME, trans.get("RocketActions.MoveUpAct.Moveup")); + //// Move this component upwards. + this.putValue(SHORT_DESCRIPTION, trans.get("RocketActions.MoveUpAct.ttip.Moveup")); clipboardChanged(); } @@ -640,8 +664,10 @@ public class RocketActions { */ private class MoveDownAction extends RocketAction { public MoveDownAction() { - this.putValue(NAME, "Move down"); - this.putValue(SHORT_DESCRIPTION, "Move this component downwards."); + //// Move down + this.putValue(NAME, trans.get("RocketActions.MoveDownAct.Movedown")); + //// Move this component downwards. + this.putValue(SHORT_DESCRIPTION, trans.get("RocketActions.MoveDownAct.ttip.Movedown")); clipboardChanged(); } diff --git a/src/net/sf/openrocket/gui/main/SimulationEditDialog.java b/src/net/sf/openrocket/gui/main/SimulationEditDialog.java index 16e4d06f..ed9bbede 100644 --- a/src/net/sf/openrocket/gui/main/SimulationEditDialog.java +++ b/src/net/sf/openrocket/gui/main/SimulationEditDialog.java @@ -42,6 +42,7 @@ import net.sf.openrocket.gui.components.UnitSelector; import net.sf.openrocket.gui.plot.Axis; import net.sf.openrocket.gui.plot.PlotConfiguration; import net.sf.openrocket.gui.plot.SimulationPlotPanel; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.models.atmosphere.ExtendedISAModel; import net.sf.openrocket.rocketcomponent.Configuration; import net.sf.openrocket.simulation.FlightData; @@ -51,6 +52,7 @@ import net.sf.openrocket.simulation.GUISimulationConditions; import net.sf.openrocket.simulation.FlightDataType; import net.sf.openrocket.simulation.listeners.SimulationListener; import net.sf.openrocket.simulation.listeners.example.CSVSaveListener; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.unit.Unit; import net.sf.openrocket.unit.UnitGroup; import net.sf.openrocket.util.Chars; @@ -81,14 +83,16 @@ public class SimulationEditDialog extends JDialog { private final Simulation simulation; private final GUISimulationConditions conditions; private final Configuration configuration; - + private static final Translator trans = Application.getTranslator(); + public SimulationEditDialog(Window parent, Simulation s) { this(parent, s, 0); } public SimulationEditDialog(Window parent, Simulation s, int tab) { - super(parent, "Edit simulation", JDialog.ModalityType.DOCUMENT_MODAL); + //// Edit simulation + super(parent, trans.get("simedtdlg.title.Editsim"), JDialog.ModalityType.DOCUMENT_MODAL); this.parentWindow = parent; this.simulation = s; @@ -97,7 +101,8 @@ public class SimulationEditDialog extends JDialog { JPanel mainPanel = new JPanel(new MigLayout("fill","[grow, fill]")); - mainPanel.add(new JLabel("Simulation name: "), "span, split 2, shrink"); + //// Simulation name: + mainPanel.add(new JLabel(trans.get("simedtdlg.lbl.Simname") + " "), "span, split 2, shrink"); final JTextField field = new JTextField(simulation.getName()); field.getDocument().addDocumentListener(new DocumentListener() { @Override @@ -125,11 +130,14 @@ public class SimulationEditDialog extends JDialog { JTabbedPane tabbedPane = new JTabbedPane(); - - tabbedPane.addTab("Launch conditions", flightConditionsTab()); - tabbedPane.addTab("Simulation options", simulationOptionsTab()); - tabbedPane.addTab("Plot data", plotTab()); - tabbedPane.addTab("Export data", exportTab()); + //// Launch conditions + tabbedPane.addTab(trans.get("simedtdlg.tab.Launchcond"), flightConditionsTab()); + //// Simulation options + tabbedPane.addTab(trans.get("simedtdlg.tab.Simopt"), simulationOptionsTab()); + //// Plot data + tabbedPane.addTab(trans.get("simedtdlg.tab.Plotdata"), plotTab()); + //// Export data + tabbedPane.addTab(trans.get("simedtdlg.tab.Exportdata"), exportTab()); // Select the initial tab if (tab == EDIT) { @@ -151,7 +159,8 @@ public class SimulationEditDialog extends JDialog { mainPanel.add(new JPanel(), "spanx, split, growx"); JButton button; - button = new JButton("Run simulation"); + //// Run simulation button + button = new JButton(trans.get("simedtdlg.but.runsimulation")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -161,8 +170,8 @@ public class SimulationEditDialog extends JDialog { }); mainPanel.add(button, "gapright para"); - - JButton close = new JButton("Close"); + //// Close button + JButton close = new JButton(trans.get("dlg.but.close")); close.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -194,12 +203,15 @@ public class SimulationEditDialog extends JDialog { JSpinner spin; //// Motor selector - JLabel label = new JLabel("Motor configuration:"); - label.setToolTipText("Select the motor configuration to use."); + //// Motor configuration: + JLabel label = new JLabel(trans.get("simedtdlg.lbl.Motorcfg")); + //// Select the motor configuration to use. + label.setToolTipText(trans.get("simedtdlg.lbl.ttip.Motorcfg")); panel.add(label, "shrinkx, spanx, split 2"); JComboBox combo = new JComboBox(new MotorConfigurationModel(configuration)); - combo.setToolTipText("Select the motor configuration to use."); + //// Select the motor configuration to use. + combo.setToolTipText(trans.get("simedtdlg.combo.ttip.motorconf")); combo.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -212,13 +224,16 @@ public class SimulationEditDialog extends JDialog { //// Wind settings: Average wind speed, turbulence intensity, std. deviation sub = new JPanel(new MigLayout("fill, gap rel unrel", "[grow][65lp!][30lp!][75lp!]","")); - sub.setBorder(BorderFactory.createTitledBorder("Wind")); + //// Wind + sub.setBorder(BorderFactory.createTitledBorder(trans.get("simedtdlg.lbl.Wind"))); panel.add(sub, "growx, split 2, aligny 0, flowy, gapright para"); // Wind average - label = new JLabel("Average windspeed:"); - tip = "The average windspeed relative to the ground."; + //// Average windspeed: + label = new JLabel(trans.get("simedtdlg.lbl.Averwindspeed")); + //// The average windspeed relative to the ground. + tip = trans.get("simedtdlg.lbl.ttip.Averwindspeed"); label.setToolTipText(tip); sub.add(label); @@ -239,10 +254,11 @@ public class SimulationEditDialog extends JDialog { // Wind std. deviation - label = new JLabel("Standard deviation:"); - tip = "The standard deviation of the windspeed.
" + - "The windspeed is within twice the standard deviation from the average for " + - "95% of the time."; + //// Standard deviation: + label = new JLabel(trans.get("simedtdlg.lbl.Stddeviation")); + //// The standard deviation of the windspeed.
+ //// The windspeed is within twice the standard deviation from the average for 95% of the time. + tip = trans.get("simedtdlg.lbl.ttip.Stddeviation"); label.setToolTipText(tip); sub.add(label); @@ -264,12 +280,15 @@ public class SimulationEditDialog extends JDialog { // Wind turbulence intensity - label = new JLabel("Turbulence intensity:"); - tip = "The turbulence intensity is the standard deviation " + - "divided by the average windspeed.
" + - "Typical values range from "+ + //// Turbulence intensity: + label = new JLabel(trans.get("simedtdlg.lbl.Turbulenceintensity")); + //// The turbulence intensity is the standard deviation divided by the average windspeed.
+ //// Typical values range from + //// to + tip = trans.get("simedtdlg.lbl.ttip.Turbulenceintensity1") + + trans.get("simedtdlg.lbl.ttip.Turbulenceintensity2") + " "+ UnitGroup.UNITS_RELATIVE.getDefaultUnit().toStringUnit(0.05) + - " to " + + " " + trans.get("simedtdlg.lbl.ttip.Turbulenceintensity3") +" " + UnitGroup.UNITS_RELATIVE.getDefaultUnit().toStringUnit(0.20) + "."; label.setToolTipText(tip); sub.add(label); @@ -304,24 +323,30 @@ public class SimulationEditDialog extends JDialog { //// Temperature and pressure sub = new JPanel(new MigLayout("fill, gap rel unrel", "[grow][65lp!][30lp!][75lp!]","")); - sub.setBorder(BorderFactory.createTitledBorder("Atmospheric conditions")); + //// Atmospheric conditions + sub.setBorder(BorderFactory.createTitledBorder(trans.get("simedtdlg.border.Atmoscond"))); panel.add(sub, "growx, aligny 0, gapright para"); BooleanModel isa = new BooleanModel(conditions, "ISAAtmosphere"); JCheckBox check = new JCheckBox(isa); - check.setText("Use International Standard Atmosphere"); - check.setToolTipText("Select to use the International Standard Atmosphere model."+ - "
This model has a temperature of " + + //// Use International Standard Atmosphere + check.setText(trans.get("simedtdlg.checkbox.InterStdAtmosphere")); + //// Select to use the International Standard Atmosphere model. + ////
This model has a temperature of + //// and a pressure of + //// at sea level. + check.setToolTipText(trans.get("simedtdlg.checkbox.ttip.InterStdAtmosphere1") +" " + UnitGroup.UNITS_TEMPERATURE.toStringUnit(ExtendedISAModel.STANDARD_TEMPERATURE)+ - " and a pressure of " + + " " + trans.get("simedtdlg.checkbox.ttip.InterStdAtmosphere2") + " " + UnitGroup.UNITS_PRESSURE.toStringUnit(ExtendedISAModel.STANDARD_PRESSURE) + - " at sea level."); + " " + trans.get("simedtdlg.checkbox.ttip.InterStdAtmosphere3")); sub.add(check, "spanx, wrap unrel"); - // Temperature - label = new JLabel("Temperature:"); - tip = "The temperature at the launch site."; + // Temperature: + label = new JLabel(trans.get("simedtdlg.lbl.Temperature")); + //// The temperature at the launch site. + tip = trans.get("simedtdlg.lbl.ttip.Temperature"); label.setToolTipText(tip); isa.addEnableComponent(label, false); sub.add(label); @@ -345,9 +370,10 @@ public class SimulationEditDialog extends JDialog { - // Pressure - label = new JLabel("Pressure:"); - tip = "The atmospheric pressure at the launch site."; + // Pressure: + label = new JLabel(trans.get("simedtdlg.lbl.Pressure")); + //// The atmospheric pressure at the launch site. + tip = trans.get("simedtdlg.lbl.ttip.Pressure"); label.setToolTipText(tip); isa.addEnableComponent(label, false); sub.add(label); @@ -376,15 +402,16 @@ public class SimulationEditDialog extends JDialog { //// Launch site conditions sub = new JPanel(new MigLayout("fill, gap rel unrel", "[grow][65lp!][30lp!][75lp!]","")); - sub.setBorder(BorderFactory.createTitledBorder("Launch site")); + //// Launch site + sub.setBorder(BorderFactory.createTitledBorder(trans.get("simedtdlg.lbl.Launchsite"))); panel.add(sub, "growx, split 2, aligny 0, flowy"); - // Latitude - label = new JLabel("Latitude:"); - tip = "The launch site latitude affects the gravitational pull of Earth.
" + - "Positive values are on the Northern hemisphere, negative values on the " + - "Southern hemisphere."; + // Latitude: + label = new JLabel(trans.get("simedtdlg.lbl.Latitude")); + //// The launch site latitude affects the gravitational pull of Earth.
+ //// Positive values are on the Northern hemisphere, negative values on the Southern hemisphere. + tip = trans.get("simedtdlg.lbl.ttip.Latitude"); label.setToolTipText(tip); sub.add(label); @@ -404,10 +431,11 @@ public class SimulationEditDialog extends JDialog { - // Altitude - label = new JLabel("Altitude:"); - tip = "The launch altitude above mean sea level.
" + - "This affects the position of the rocket in the atmospheric model."; + // Altitude: + label = new JLabel(trans.get("simedtdlg.lbl.Altitude")); + //// The launch altitude above mean sea level.
+ //// This affects the position of the rocket in the atmospheric model. + tip = trans.get("simedtdlg.lbl.ttip.Altitude"); label.setToolTipText(tip); sub.add(label); @@ -432,13 +460,15 @@ public class SimulationEditDialog extends JDialog { //// Launch rod sub = new JPanel(new MigLayout("fill, gap rel unrel", "[grow][65lp!][30lp!][75lp!]","")); - sub.setBorder(BorderFactory.createTitledBorder("Launch rod")); + //// Launch rod + sub.setBorder(BorderFactory.createTitledBorder(trans.get("simedtdlg.border.Launchrod"))); panel.add(sub, "growx, aligny 0, wrap"); - // Length - label = new JLabel("Length:"); - tip = "The length of the launch rod."; + // Length: + label = new JLabel(trans.get("simedtdlg.lbl.Length")); + //// The length of the launch rod. + tip = trans.get("simedtdlg.lbl.ttip.Length"); label.setToolTipText(tip); sub.add(label); @@ -458,9 +488,10 @@ public class SimulationEditDialog extends JDialog { - // Angle - label = new JLabel("Angle:"); - tip = "The angle of the launch rod from vertical."; + // Angle: + label = new JLabel(trans.get("simedtdlg.lbl.Angle")); + //// The angle of the launch rod from vertical. + tip = trans.get("simedtdlg.lbl.ttip.Angle"); label.setToolTipText(tip); sub.add(label); @@ -482,13 +513,16 @@ public class SimulationEditDialog extends JDialog { - // Direction - label = new JLabel("Direction:"); - tip = "Direction of the launch rod relative to the wind.
" + + // Direction: + label = new JLabel(trans.get("simedtdlg.lbl.Direction")); + //// Direction of the launch rod relative to the wind.
+ //// = towards the wind, + //// = downwind. + tip = trans.get("simedtdlg.lbl.ttip.Direction1") + UnitGroup.UNITS_ANGLE.toStringUnit(0) + - " = towards the wind, "+ + " " + trans.get("simedtdlg.lbl.ttip.Direction2") + " "+ UnitGroup.UNITS_ANGLE.toStringUnit(Math.PI) + - " = downwind."; + " " + trans.get("simedtdlg.lbl.ttip.Direction3"); label.setToolTipText(tip); sub.add(label); @@ -543,32 +577,35 @@ public class SimulationEditDialog extends JDialog { //// Simulation options sub = new JPanel(new MigLayout("fill, gap rel unrel", "[grow][65lp!][30lp!][75lp!]","")); - sub.setBorder(BorderFactory.createTitledBorder("Simulator options")); + //// Simulator options + sub.setBorder(BorderFactory.createTitledBorder(trans.get("simedtdlg.border.Simopt"))); panel.add(sub, "w 330lp!, growy, aligny 0"); // Calculation method - tip = "" + - "The Extended Barrowman method calculates aerodynamic forces according
" + - "to the Barrowman equations extended to accommodate more components."; + //// The Extended Barrowman method calculates aerodynamic forces according
+ //// to the Barrowman equations extended to accommodate more components. + tip = trans.get("simedtdlg.lbl.ttip.Calcmethod"); - label = new JLabel("Calculation method:"); + //// Calculation method: + label = new JLabel(trans.get("simedtdlg.lbl.Calcmethod")); label.setToolTipText(tip); sub.add(label, "gaptop unrel, gapright para, spanx, split 2, w 150lp!"); - label = new JLabel("Extended Barrowman"); + //// Extended Barrowman + label = new JLabel(trans.get("simedtdlg.lbl.ExtBarrowman")); label.setToolTipText(tip); sub.add(label, "growx, wrap para"); // Simulation method - tip = "" + - "The six degree-of-freedom simulator allows the rocket total freedom during " + - "flight.
" + - "Integration is performed using a 4th order Runge-Kutta 4 " + - "numerical integration."; + //// The six degree-of-freedom simulator allows the rocket total freedom during flight.
+ //// Integration is performed using a 4th order Runge-Kutta 4 numerical integration. + tip = trans.get("simedtdlg.lbl.ttip.Simmethod1") + + trans.get("simedtdlg.lbl.ttip.Simmethod2"); - label = new JLabel("Simulation method:"); + //// Simulation method: + label = new JLabel(trans.get("simedtdlg.lbl.Simmethod")); label.setToolTipText(tip); sub.add(label, "gaptop unrel, gapright para, spanx, split 2, w 150lp!"); @@ -578,11 +615,13 @@ public class SimulationEditDialog extends JDialog { // Wind average - label = new JLabel("Time step:"); - tip = "The time between simulation steps.
" + - "A smaller time step results in a more accurate but slower simulation.
" + - "The 4th order simulation method is quite accurate with a time " + - "step of " + + //// Time step: + label = new JLabel(trans.get("simedtdlg.lbl.Timestep")); + //// The time between simulation steps.
+ //// A smaller time step results in a more accurate but slower simulation.
+ //// The 4th order simulation method is quite accurate with a time step of + tip = trans.get("simedtdlg.lbl.ttip.Timestep1") + + trans.get("simedtdlg.lbl.ttip.Timestep2") + " " + UnitGroup.UNITS_TIME_STEP.toStringUnit(RK4SimulationStepper.RECOMMENDED_TIME_STEP) + "."; label.setToolTipText(tip); @@ -631,8 +670,10 @@ public class SimulationEditDialog extends JDialog { sub.add(slider,"w 75lp, wrap para"); */ - JButton button = new JButton("Reset to default"); - button.setToolTipText("Reset the time step to its default value (" + + //// Reset to default button + JButton button = new JButton(trans.get("simedtdlg.but.resettodefault")); + //// Reset the time step to its default value ( + button.setToolTipText(trans.get("simedtdlg.but.ttip.resettodefault") + UnitGroup.UNITS_SHORT_TIME.toStringUnit(RK4SimulationStepper.RECOMMENDED_TIME_STEP) + ")."); button.addActionListener(new ActionListener() { @@ -654,20 +695,20 @@ public class SimulationEditDialog extends JDialog { //// Simulation listeners sub = new JPanel(new MigLayout("fill, gap 0 0")); - sub.setBorder(BorderFactory.createTitledBorder("Simulator listeners")); + //// Simulator listeners + sub.setBorder(BorderFactory.createTitledBorder(trans.get("simedtdlg.border.Simlist"))); panel.add(sub, "growx, growy"); DescriptionArea desc = new DescriptionArea(5); - desc.setText("" + - "Simulation listeners is an advanced feature that allows "+ - "user-written code to listen to and interact with the simulation. " + - "For details on writing simulation listeners, see the OpenRocket " + - "technical documentation."); + //// Simulation listeners is an advanced feature that allows user-written code to listen to and interact with the simulation. + //// For details on writing simulation listeners, see the OpenRocket technical documentation. + desc.setText(trans.get("simedtdlg.txt.longA1") + + trans.get("simedtdlg.txt.longA2")); sub.add(desc, "aligny 0, growx, wrap para"); - - label = new JLabel("Current listeners:"); + //// Current listeners: + label = new JLabel(trans.get("simedtdlg.lbl.Curlist")); sub.add(label, "spanx, wrap rel"); final ListenerListModel listenerModel = new ListenerListModel(); @@ -677,17 +718,19 @@ public class SimulationEditDialog extends JDialog { // scroll.setPreferredSize(new Dimension(1,1)); sub.add(scroll, "height 1px, grow, wrap rel"); - - button = new JButton("Add"); + //// Add button + button = new JButton(trans.get("simedtdlg.but.add")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { String previous = Prefs.NODE.get("previousListenerName", ""); String input = (String)JOptionPane.showInputDialog(SimulationEditDialog.this, new Object[] { + //// Type the full Java class name of the simulation listener, for example: "Type the full Java class name of the simulation listener, for example:", "" + CSVSaveListener.class.getName() + "" }, - "Add simulation listener", + //// Add simulation listener + trans.get("simedtdlg.lbl.Addsimlist"), JOptionPane.QUESTION_MESSAGE, null, null, previous @@ -702,7 +745,8 @@ public class SimulationEditDialog extends JDialog { }); sub.add(button, "split 2, sizegroup buttons, alignx 50%, gapright para"); - button = new JButton("Remove"); + //// Remove button + button = new JButton(trans.get("simedtdlg.but.remove")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -783,9 +827,11 @@ public class SimulationEditDialog extends JDialog { JPanel panel = new JPanel(new MigLayout("fill")); // No data available - panel.add(new JLabel("No flight data available."), + //// No flight data available. + panel.add(new JLabel(trans.get("simedtdlg.lbl.Noflightdata")), "alignx 50%, aligny 100%, wrap para"); - panel.add(new JLabel("Please run the simulation first."), + //// Please run the simulation first. + panel.add(new JLabel(trans.get("simedtdlg.lbl.runsimfirst")), "alignx 50%, aligny 0%, wrap"); return panel; } @@ -842,7 +888,8 @@ public class SimulationEditDialog extends JDialog { // Create the chart using the factory to get all default settings JFreeChart chart = ChartFactory.createXYLineChart( - "Simulated flight", + //// Simulated flight + trans.get("simedtdlg.chart.Simflight"), null, null, null, @@ -881,7 +928,8 @@ public class SimulationEditDialog extends JDialog { // Create the dialog - final JDialog dialog = new JDialog(this, "Simulation results"); + //// Simulation results + final JDialog dialog = new JDialog(this, trans.get("simedtdlg.dlg.Simres")); dialog.setModalityType(ModalityType.DOCUMENT_MODAL); JPanel panel = new JPanel(new MigLayout("fill")); @@ -901,7 +949,8 @@ public class SimulationEditDialog extends JDialog { panel.add(chartPanel, "grow, wrap 20lp"); - JButton button = new JButton("Close"); + //// Close button + JButton button = new JButton(trans.get("dlg.but.close")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -965,9 +1014,11 @@ public class SimulationEditDialog extends JDialog { if (ex == null) { setIcon(Icons.SIMULATION_LISTENER_OK); + //// Listener instantiated successfully. setToolTipText("Listener instantiated successfully."); } else { setIcon(Icons.SIMULATION_LISTENER_ERROR); + //// Unable to instantiate listener due to exception:
setToolTipText("Unable to instantiate listener due to exception:
" + ex.toString()); } diff --git a/src/net/sf/openrocket/gui/main/SimulationPanel.java b/src/net/sf/openrocket/gui/main/SimulationPanel.java index 1760ed54..6a4bef03 100644 --- a/src/net/sf/openrocket/gui/main/SimulationPanel.java +++ b/src/net/sf/openrocket/gui/main/SimulationPanel.java @@ -34,6 +34,7 @@ import net.sf.openrocket.document.events.SimulationChangeEvent; import net.sf.openrocket.gui.adaptors.Column; import net.sf.openrocket.gui.adaptors.ColumnTableModel; import net.sf.openrocket.gui.components.StyledLabel; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.logging.LogHelper; import net.sf.openrocket.rocketcomponent.ComponentChangeEvent; import net.sf.openrocket.rocketcomponent.ComponentChangeListener; @@ -45,6 +46,8 @@ import net.sf.openrocket.util.Prefs; public class SimulationPanel extends JPanel { private static final LogHelper log = Application.getLogger(); + private static final Translator trans = Application.getTranslator(); + private static final Color WARNING_COLOR = Color.RED; private static final String WARNING_TEXT = "\uFF01"; // Fullwidth exclamation mark @@ -72,8 +75,10 @@ public class SimulationPanel extends JPanel { //////// The simulation action buttons - button = new JButton("New simulation"); - button.setToolTipText("Add a new simulation"); + //// New simulation button + button = new JButton(trans.get("simpanel.but.newsimulation")); + //// Add a new simulation + button.setToolTipText(trans.get("simpanel.but.ttip.newsimulation")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -91,8 +96,10 @@ public class SimulationPanel extends JPanel { }); this.add(button, "skip 1, gapright para"); - button = new JButton("Edit simulation"); - button.setToolTipText("Edit the selected simulation"); + //// Edit simulation button + button = new JButton(trans.get("simpanel.but.editsimulation")); + //// Edit the selected simulation + button.setToolTipText(trans.get("simpanel.but.ttip.editsim")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -109,8 +116,10 @@ public class SimulationPanel extends JPanel { }); this.add(button, "gapright para"); - button = new JButton("Run simulations"); - button.setToolTipText("Re-run the selected simulations"); + //// Run simulations + button = new JButton(trans.get("simpanel.but.runsimulations")); + //// Re-run the selected simulations + button.setToolTipText(trans.get("simpanel.but.ttip.runsimu")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -133,8 +142,10 @@ public class SimulationPanel extends JPanel { }); this.add(button, "gapright para"); - button = new JButton("Delete simulations"); - button.setToolTipText("Delete the selected simulations"); + //// Delete simulations button + button = new JButton(trans.get("simpanel.but.deletesimulations")); + //// Delete the selected simulations + button.setToolTipText(trans.get("simpanel.but.ttip.deletesim")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -147,18 +158,22 @@ public class SimulationPanel extends JPanel { if (verify) { JPanel panel = new JPanel(new MigLayout()); - JCheckBox dontAsk = new JCheckBox("Do not ask me again"); + //// Do not ask me again + JCheckBox dontAsk = new JCheckBox(trans.get("simpanel.checkbox.donotask")); panel.add(dontAsk, "wrap"); - panel.add(new StyledLabel("You can change the default operation in the " + - "preferences.", -2)); + //// You can change the default operation in the preferences. + panel.add(new StyledLabel(trans.get("simpanel.lbl.defpref"), -2)); int ret = JOptionPane.showConfirmDialog(SimulationPanel.this, new Object[] { - "Delete the selected simulations?", - "This operation cannot be undone.", + //// Delete the selected simulations? + trans.get("simpanel.dlg.lbl.DeleteSim1"), + //// This operation cannot be undone. + trans.get("simpanel.dlg.lbl.DeleteSim2"), "", panel }, - "Delete simulations", + //// Delete simulations + trans.get("simpanel.dlg.lbl.DeleteSim3"), JOptionPane.OK_CANCEL_OPTION, JOptionPane.WARNING_MESSAGE); if (ret != JOptionPane.OK_OPTION) @@ -182,8 +197,8 @@ public class SimulationPanel extends JPanel { }); this.add(button, "gapright para"); - - button = new JButton("Plot / export"); + //// Plot / export button + button = new JButton(trans.get("simpanel.but.plotexport")); // button = new JButton("Plot flight"); button.addActionListener(new ActionListener() { @Override @@ -264,7 +279,8 @@ public class SimulationPanel extends JPanel { }, //// Simulation name - new Column("Name") { + //// Name + new Column(trans.get("simpanel.col.Name")) { @Override public Object getValueAt(int row) { if (row < 0 || row >= document.getSimulationCount()) @@ -279,7 +295,8 @@ public class SimulationPanel extends JPanel { }, //// Simulation motors - new Column("Motors") { + //// Motors + new Column(trans.get("simpanel.col.Motors")) { @Override public Object getValueAt(int row) { if (row < 0 || row >= document.getSimulationCount()) @@ -295,7 +312,7 @@ public class SimulationPanel extends JPanel { }, //// Apogee - new Column("Apogee") { + new Column(trans.get("simpanel.col.Apogee")) { @Override public Object getValueAt(int row) { if (row < 0 || row >= document.getSimulationCount()) @@ -311,7 +328,7 @@ public class SimulationPanel extends JPanel { }, //// Maximum velocity - new Column("Max. velocity") { + new Column(trans.get("simpanel.col.Maxvelocity")) { @Override public Object getValueAt(int row) { if (row < 0 || row >= document.getSimulationCount()) @@ -327,7 +344,7 @@ public class SimulationPanel extends JPanel { }, //// Maximum acceleration - new Column("Max. acceleration") { + new Column(trans.get("simpanel.col.Maxacceleration")) { @Override public Object getValueAt(int row) { if (row < 0 || row >= document.getSimulationCount()) @@ -343,7 +360,7 @@ public class SimulationPanel extends JPanel { }, //// Time to apogee - new Column("Time to apogee") { + new Column(trans.get("simpanel.col.Timetoapogee")) { @Override public Object getValueAt(int row) { if (row < 0 || row >= document.getSimulationCount()) @@ -359,7 +376,7 @@ public class SimulationPanel extends JPanel { }, //// Flight time - new Column("Flight time") { + new Column(trans.get("simpanel.col.Flighttime")) { @Override public Object getValueAt(int row) { if (row < 0 || row >= document.getSimulationCount()) @@ -375,7 +392,7 @@ public class SimulationPanel extends JPanel { }, //// Ground hit velocity - new Column("Ground hit velocity") { + new Column(trans.get("simpanel.col.Groundhitvelocity")) { @Override public Object getValueAt(int row) { if (row < 0 || row >= document.getSimulationCount()) @@ -522,10 +539,12 @@ public class SimulationPanel extends JPanel { tip = "" + sim.getName() + "
"; switch (sim.getStatus()) { case UPTODATE: + //// Up to date
tip += "Up to date
"; break; case LOADED: + //// Data loaded from a file
tip += "Data loaded from a file
"; break; diff --git a/src/net/sf/openrocket/gui/main/SimulationRunDialog.java b/src/net/sf/openrocket/gui/main/SimulationRunDialog.java index 9b94ec61..96693eb6 100644 --- a/src/net/sf/openrocket/gui/main/SimulationRunDialog.java +++ b/src/net/sf/openrocket/gui/main/SimulationRunDialog.java @@ -25,6 +25,7 @@ import javax.swing.JProgressBar; import net.miginfocom.swing.MigLayout; import net.sf.openrocket.document.Simulation; import net.sf.openrocket.gui.dialogs.DetailDialog; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.logging.LogHelper; import net.sf.openrocket.rocketcomponent.Configuration; import net.sf.openrocket.rocketcomponent.MotorMount; @@ -46,6 +47,8 @@ import net.sf.openrocket.util.Prefs; public class SimulationRunDialog extends JDialog { private static final LogHelper log = Application.getLogger(); + private static final Translator trans = Application.getTranslator(); + /** Update the dialog status every this many ms */ private static final long UPDATE_MS = 200; @@ -83,7 +86,8 @@ public class SimulationRunDialog extends JDialog { private final boolean[] simulationDone; public SimulationRunDialog(Window window, Simulation... simulations) { - super(window, "Running simulations...", Dialog.ModalityType.DOCUMENT_MODAL); + //// Running simulations... + super(window, trans.get("SimuRunDlg.title.RunSim"), Dialog.ModalityType.DOCUMENT_MODAL); if (simulations.length == 0) { throw new IllegalArgumentException("Called with no simulations to run"); @@ -109,18 +113,21 @@ public class SimulationRunDialog extends JDialog { // Build the dialog JPanel panel = new JPanel(new MigLayout("fill", "[][grow]")); - simLabel = new JLabel("Running ..."); + //// Running ... + simLabel = new JLabel(trans.get("SimuRunDlg.lbl.Running")); panel.add(simLabel, "spanx, wrap para"); - - panel.add(new JLabel("Simulation time: "), "gapright para"); + //// Simulation time: + panel.add(new JLabel(trans.get("SimuRunDlg.lbl.Simutime") + " "), "gapright para"); timeLabel = new JLabel(""); panel.add(timeLabel, "growx, wrap rel"); - panel.add(new JLabel("Altitude: ")); + //// Altitude: + panel.add(new JLabel(trans.get("SimuRunDlg.lbl.Altitude") + " ")); altLabel = new JLabel(""); panel.add(altLabel, "growx, wrap rel"); - panel.add(new JLabel("Velocity: ")); + //// Velocity: + panel.add(new JLabel(trans.get("SimuRunDlg.lbl.Velocity") +" ")); velLabel = new JLabel(""); panel.add(velLabel, "growx, wrap para"); @@ -129,7 +136,7 @@ public class SimulationRunDialog extends JDialog { // Add cancel button - JButton cancel = new JButton("Cancel"); + JButton cancel = new JButton(trans.get("dlg.but.cancel")); cancel.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -380,7 +387,8 @@ public class SimulationRunDialog extends JDialog { DetailDialog.showDetailedMessageDialog(SimulationRunDialog.this, new Object[] { - "Unable to simulate:", + //// Unable to simulate: + trans.get("SimuRunDlg.msg.Unabletosim"), t.getMessage() }, null, simulation.getName(), JOptionPane.ERROR_MESSAGE); @@ -389,7 +397,8 @@ public class SimulationRunDialog extends JDialog { DetailDialog.showDetailedMessageDialog(SimulationRunDialog.this, new Object[] { - "A error occurred during the simulation:", + //// A error occurred during the simulation: + trans.get("SimuRunDlg.msg.errorOccurred"), t.getMessage() }, stackTrace, simulation.getName(), JOptionPane.ERROR_MESSAGE); @@ -400,10 +409,11 @@ public class SimulationRunDialog extends JDialog { t.printStackTrace(); DetailDialog.showDetailedMessageDialog(SimulationRunDialog.this, new Object[] { - "An exception occurred during the simulation:", + //// An exception occurred during the simulation: + trans.get("SimuRunDlg.msg.AnException1"), t.getMessage(), simulation.getSimulationListeners().isEmpty() ? - "Please report this as a bug along with the details below." : "" + trans.get("SimuRunDlg.msg.AnException2") : "" }, stackTrace, simulation.getName(), JOptionPane.ERROR_MESSAGE); @@ -412,8 +422,10 @@ public class SimulationRunDialog extends JDialog { t.printStackTrace(); DetailDialog.showDetailedMessageDialog(SimulationRunDialog.this, new Object[] { - "A computation error occurred during the simulation.", - "Please report this as a bug along with the details below." + //// A computation error occurred during the simulation. + trans.get("SimuRunDlg.msg.AssertionError1"), + //// Please report this as a bug along with the details below. + trans.get("SimuRunDlg.msg.AssertionError2") }, stackTrace, simulation.getName(), JOptionPane.ERROR_MESSAGE); @@ -422,9 +434,10 @@ public class SimulationRunDialog extends JDialog { // Probably an Error DetailDialog.showDetailedMessageDialog(SimulationRunDialog.this, new Object[] { - "An unknown error was encountered during the simulation.", - "The program may be unstable, you should save all your designs " + - "and restart OpenRocket now!" + //// An unknown error was encountered during the simulation. + trans.get("SimuRunDlg.msg.unknownerror1"), + //// The program may be unstable, you should save all your designs and restart OpenRocket now! + trans.get("SimuRunDlg.msg.unknownerror2") }, stackTrace, simulation.getName(), JOptionPane.ERROR_MESSAGE); diff --git a/src/net/sf/openrocket/gui/plot/PlotConfiguration.java b/src/net/sf/openrocket/gui/plot/PlotConfiguration.java index 1cf5e974..2fd10d2b 100644 --- a/src/net/sf/openrocket/gui/plot/PlotConfiguration.java +++ b/src/net/sf/openrocket/gui/plot/PlotConfiguration.java @@ -4,9 +4,11 @@ import java.util.EnumSet; import java.util.List; import java.util.Set; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.simulation.FlightDataBranch; import net.sf.openrocket.simulation.FlightDataType; import net.sf.openrocket.simulation.FlightEvent; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.unit.Unit; import net.sf.openrocket.util.ArrayList; import net.sf.openrocket.util.BugException; @@ -16,11 +18,14 @@ import net.sf.openrocket.util.Pair; public class PlotConfiguration implements Cloneable { + private static final Translator trans = Application.getTranslator(); + public static final PlotConfiguration[] DEFAULT_CONFIGURATIONS; static { ArrayList configs = new ArrayList(); PlotConfiguration config; + //// Vertical motion vs. time config = new PlotConfiguration("Vertical motion vs. time"); config.addPlotDataType(FlightDataType.TYPE_ALTITUDE, 0); config.addPlotDataType(FlightDataType.TYPE_VELOCITY_Z); @@ -33,6 +38,7 @@ public class PlotConfiguration implements Cloneable { config.setEvent(FlightEvent.Type.GROUND_HIT, true); configs.add(config); + //// Total motion vs. time config = new PlotConfiguration("Total motion vs. time"); config.addPlotDataType(FlightDataType.TYPE_ALTITUDE, 0); config.addPlotDataType(FlightDataType.TYPE_VELOCITY_TOTAL); @@ -45,6 +51,7 @@ public class PlotConfiguration implements Cloneable { config.setEvent(FlightEvent.Type.GROUND_HIT, true); configs.add(config); + //// Flight side profile config = new PlotConfiguration("Flight side profile", FlightDataType.TYPE_POSITION_X); config.addPlotDataType(FlightDataType.TYPE_ALTITUDE); config.setEvent(FlightEvent.Type.IGNITION, true); @@ -55,6 +62,7 @@ public class PlotConfiguration implements Cloneable { config.setEvent(FlightEvent.Type.GROUND_HIT, true); configs.add(config); + //// Stability vs. time config = new PlotConfiguration("Stability vs. time"); config.addPlotDataType(FlightDataType.TYPE_STABILITY, 0); config.addPlotDataType(FlightDataType.TYPE_CP_LOCATION, 1); @@ -67,6 +75,7 @@ public class PlotConfiguration implements Cloneable { config.setEvent(FlightEvent.Type.GROUND_HIT, true); configs.add(config); + //// Drag coefficients vs. Mach number config = new PlotConfiguration("Drag coefficients vs. Mach number", FlightDataType.TYPE_MACH_NUMBER); config.addPlotDataType(FlightDataType.TYPE_DRAG_COEFF, 0); @@ -75,6 +84,7 @@ public class PlotConfiguration implements Cloneable { config.addPlotDataType(FlightDataType.TYPE_PRESSURE_DRAG_COEFF, 0); configs.add(config); + //// Roll characteristics config = new PlotConfiguration("Roll characteristics"); config.addPlotDataType(FlightDataType.TYPE_ROLL_RATE, 0); config.addPlotDataType(FlightDataType.TYPE_ROLL_MOMENT_COEFF, 1); @@ -89,6 +99,7 @@ public class PlotConfiguration implements Cloneable { config.setEvent(FlightEvent.Type.GROUND_HIT, true); configs.add(config); + //// Angle of attack and orientation vs. time config = new PlotConfiguration("Angle of attack and orientation vs. time"); config.addPlotDataType(FlightDataType.TYPE_AOA, 0); config.addPlotDataType(FlightDataType.TYPE_ORIENTATION_PHI); @@ -101,6 +112,7 @@ public class PlotConfiguration implements Cloneable { config.setEvent(FlightEvent.Type.GROUND_HIT, true); configs.add(config); + //// Simulation time step and computation time config = new PlotConfiguration("Simulation time step and computation time"); config.addPlotDataType(FlightDataType.TYPE_TIME_STEP); config.addPlotDataType(FlightDataType.TYPE_COMPUTATION_TIME); diff --git a/src/net/sf/openrocket/gui/plot/PlotDialog.java b/src/net/sf/openrocket/gui/plot/PlotDialog.java index b36ff30b..714a0530 100644 --- a/src/net/sf/openrocket/gui/plot/PlotDialog.java +++ b/src/net/sf/openrocket/gui/plot/PlotDialog.java @@ -33,9 +33,11 @@ import javax.swing.JPanel; import net.miginfocom.swing.MigLayout; import net.sf.openrocket.document.Simulation; import net.sf.openrocket.gui.components.StyledLabel; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.simulation.FlightDataBranch; import net.sf.openrocket.simulation.FlightDataType; import net.sf.openrocket.simulation.FlightEvent; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.unit.Unit; import net.sf.openrocket.unit.UnitGroup; import net.sf.openrocket.util.BugException; @@ -66,7 +68,8 @@ import org.jfree.ui.TextAnchor; public class PlotDialog extends JDialog { private static final float PLOT_STROKE_WIDTH = 1.5f; - + private static final Translator trans = Application.getTranslator(); + private static final Color DEFAULT_EVENT_COLOR = new Color(0, 0, 0); private static final Map EVENT_COLORS = new HashMap(); @@ -126,7 +129,8 @@ public class PlotDialog extends JDialog { new ArrayList(); private PlotDialog(Window parent, Simulation simulation, PlotConfiguration config) { - super(parent, "Flight data plot"); + //// Flight data plot + super(parent, trans.get("PlotDialog.title.Flightdataplot")); this.setModalityType(ModalityType.DOCUMENT_MODAL); final boolean initialShowPoints = Prefs.getBoolean(Prefs.PLOT_SHOW_POINTS, false); @@ -195,7 +199,8 @@ public class PlotDialog extends JDialog { // Create the chart using the factory to get all default settings JFreeChart chart = ChartFactory.createXYLineChart( - "Simulated flight", + //// Simulated flight + trans.get("PlotDialog.Chart.Simulatedflight"), null, null, null, @@ -405,7 +410,8 @@ public class PlotDialog extends JDialog { panel.add(chartPanel, "grow, wrap 20lp"); - final JCheckBox check = new JCheckBox("Show data points"); + //// Show data points + final JCheckBox check = new JCheckBox(trans.get("PlotDialog.CheckBox.Showdatapoints")); check.setSelected(initialShowPoints); check.addActionListener(new ActionListener() { @Override @@ -420,13 +426,14 @@ public class PlotDialog extends JDialog { panel.add(check, "split, left"); - JLabel label = new StyledLabel("Click+drag down+right to zoom in, up+left to zoom out", -2); + JLabel label = new StyledLabel(trans.get("PlotDialog.lbl.Chart"), -2); panel.add(label, "gapleft para"); panel.add(new JPanel(), "growx"); - JButton button = new JButton("Close"); + //// Close button + JButton button = new JButton(trans.get("dlg.but.close")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { diff --git a/src/net/sf/openrocket/gui/plot/SimulationPlotPanel.java b/src/net/sf/openrocket/gui/plot/SimulationPlotPanel.java index 4e18be37..1cc0c788 100644 --- a/src/net/sf/openrocket/gui/plot/SimulationPlotPanel.java +++ b/src/net/sf/openrocket/gui/plot/SimulationPlotPanel.java @@ -24,15 +24,18 @@ import net.miginfocom.swing.MigLayout; import net.sf.openrocket.document.Simulation; import net.sf.openrocket.gui.components.DescriptionArea; import net.sf.openrocket.gui.components.UnitSelector; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.simulation.FlightDataBranch; import net.sf.openrocket.simulation.FlightDataType; import net.sf.openrocket.simulation.FlightEvent; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.unit.Unit; import net.sf.openrocket.util.GUIUtil; import net.sf.openrocket.util.Icons; public class SimulationPlotPanel extends JPanel { - + private static final Translator trans = Application.getTranslator(); + // TODO: LOW: Should these be somewhere else? public static final int AUTO = -1; public static final int LEFT = 0; @@ -120,15 +123,16 @@ public class SimulationPlotPanel extends JPanel { modifying--; } }); - this.add(new JLabel("Preset plot configurations: "), "spanx, split"); + //// Preset plot configurations: + this.add(new JLabel(trans.get("simplotpanel.lbl.Presetplotconf")), "spanx, split"); this.add(configurationSelector, "growx, wrap 20lp"); //// X axis - - this.add(new JLabel("X axis type:"), "spanx, split"); + //// X axis type: + this.add(new JLabel(trans.get("simplotpanel.lbl.Xaxistype")), "spanx, split"); domainTypeSelector = new JComboBox(types); domainTypeSelector.setSelectedItem(configuration.getDomainAxisType()); domainTypeSelector.addItemListener(new ItemListener() { @@ -145,8 +149,8 @@ public class SimulationPlotPanel extends JPanel { }); this.add(domainTypeSelector, "gapright para"); - - this.add(new JLabel("Unit:")); + //// Unit: + this.add(new JLabel(trans.get("simplotpanel.lbl.Unit"))); domainUnitSelector = new UnitSelector(configuration.getDomainAxisType().getUnitGroup()); domainUnitSelector.setSelectedUnit(configuration.getDomainAxisUnit()); domainUnitSelector.addItemListener(new ItemListener() { @@ -159,19 +163,18 @@ public class SimulationPlotPanel extends JPanel { }); this.add(domainUnitSelector, "width 40lp, gapright para"); - - DescriptionArea desc = new DescriptionArea("The data will be plotted in time order " + - "even if the X axis type is not time.", 2, -2f); + //// The data will be plotted in time order even if the X axis type is not time. + DescriptionArea desc = new DescriptionArea(trans.get("simplotpanel.Desc"), 2, -2f); desc.setViewportBorder(BorderFactory.createEmptyBorder()); this.add(desc, "width 1px, growx 1, wrap unrel"); //// Y axis selector panel - - this.add(new JLabel("Y axis types:")); - - this.add(new JLabel("Flight events:"), "wrap rel"); + //// Y axis types: + this.add(new JLabel(trans.get("simplotpanel.lbl.Yaxistypes"))); + //// Flight events: + this.add(new JLabel(trans.get("simplotpanel.lbl.Flightevents")), "wrap rel"); typeSelectorPanel = new JPanel(new MigLayout("gapy rel")); JScrollPane scroll = new JScrollPane(typeSelectorPanel); @@ -197,7 +200,7 @@ public class SimulationPlotPanel extends JPanel { //// All + None buttons - JButton button = new JButton("All"); + JButton button = new JButton(trans.get("simplotpanel.but.All")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -208,7 +211,8 @@ public class SimulationPlotPanel extends JPanel { }); this.add(button, "split 2, gapleft para, gapright para, growx, sizegroup buttons"); - button = new JButton("None"); + //// None + button = new JButton(trans.get("simplotpanel.but.None")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -221,14 +225,17 @@ public class SimulationPlotPanel extends JPanel { - - button = new JButton("New Y axis plot type"); + //// New Y axis plot type + button = new JButton(trans.get("simplotpanel.but.NewYaxisplottype")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { if (configuration.getTypeCount() >= 15) { JOptionPane.showMessageDialog(SimulationPlotPanel.this, - "A maximum of 15 plots is allowed.", "Cannot add plot", + //// A maximum of 15 plots is allowed. + //// Cannot add plot + trans.get("simplotpanel.OptionPane.lbl1"), + trans.get("simplotpanel.OptionPane.lbl2"), JOptionPane.ERROR_MESSAGE); return; } @@ -270,7 +277,8 @@ public class SimulationPlotPanel extends JPanel { this.add(new JPanel(), "growx"); - button = new JButton("Plot flight"); + //// Plot flight + button = new JButton(trans.get("simplotpanel.but.Plotflight")); button.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { @@ -353,7 +361,8 @@ public class SimulationPlotPanel extends JPanel { }); this.add(typeSelector, "gapright para"); - this.add(new JLabel("Unit:")); + //// Unit: + this.add(new JLabel(trans.get("simplotpanel.lbl.Unit"))); unitSelector = new UnitSelector(type.getUnitGroup()); if (unit != null) unitSelector.setSelectedUnit(unit); @@ -368,7 +377,8 @@ public class SimulationPlotPanel extends JPanel { }); this.add(unitSelector, "width 40lp, gapright para"); - this.add(new JLabel("Axis:")); + //// Axis: + this.add(new JLabel(trans.get("simplotpanel.lbl.Axis"))); axisSelector = new JComboBox(POSITIONS); if (position == LEFT) axisSelector.setSelectedIndex(1); @@ -389,7 +399,8 @@ public class SimulationPlotPanel extends JPanel { JButton button = new JButton(Icons.DELETE); - button.setToolTipText("Remove this plot"); + //// Remove this plot + button.setToolTipText(trans.get("simplotpanel.but.ttip.Removethisplot")); button.setBorderPainted(false); button.addActionListener(new ActionListener() { @Override diff --git a/src/net/sf/openrocket/gui/scalefigure/RocketPanel.java b/src/net/sf/openrocket/gui/scalefigure/RocketPanel.java index 774ad152..c367d7e2 100644 --- a/src/net/sf/openrocket/gui/scalefigure/RocketPanel.java +++ b/src/net/sf/openrocket/gui/scalefigure/RocketPanel.java @@ -20,6 +20,7 @@ import net.sf.openrocket.gui.figureelements.Caret; import net.sf.openrocket.gui.figureelements.RocketInfo; import net.sf.openrocket.gui.main.SimulationWorker; import net.sf.openrocket.gui.main.componenttree.ComponentTreeModel; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.masscalc.BasicMassCalculator; import net.sf.openrocket.masscalc.MassCalculator; import net.sf.openrocket.masscalc.MassCalculator.MassCalcType; @@ -31,6 +32,7 @@ import net.sf.openrocket.simulation.FlightData; import net.sf.openrocket.simulation.listeners.SimulationListener; import net.sf.openrocket.simulation.listeners.system.ApogeeEndListener; import net.sf.openrocket.simulation.listeners.system.InterruptListener; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.unit.UnitGroup; import net.sf.openrocket.util.ChangeSource; import net.sf.openrocket.util.Chars; @@ -73,6 +75,7 @@ import java.util.concurrent.ThreadFactory; */ public class RocketPanel extends JPanel implements TreeSelectionListener, ChangeSource { + private static final Translator trans = Application.getTranslator(); private final RocketFigure figure; private final ScaleScrollPane scrollPane; @@ -179,14 +182,18 @@ public class RocketPanel extends JPanel implements TreeSelectionListener, Change // Side/back buttons FigureTypeAction action = new FigureTypeAction(RocketFigure.TYPE_SIDE); - action.putValue(Action.NAME, "Side view"); - action.putValue(Action.SHORT_DESCRIPTION, "Side view"); + //// Side view + action.putValue(Action.NAME, trans.get("RocketPanel.FigTypeAct.Sideview")); + //// Side view + action.putValue(Action.SHORT_DESCRIPTION, trans.get("RocketPanel.FigTypeAct.ttip.Sideview")); JToggleButton toggle = new JToggleButton(action); add(toggle, "spanx, split"); action = new FigureTypeAction(RocketFigure.TYPE_BACK); - action.putValue(Action.NAME, "Back view"); - action.putValue(Action.SHORT_DESCRIPTION, "Rear view"); + //// Back view + action.putValue(Action.NAME, trans.get("RocketPanel.FigTypeAct.Backview")); + //// Back view + action.putValue(Action.SHORT_DESCRIPTION, trans.get("RocketPanel.FigTypeAct.ttip.Backview")); toggle = new JToggleButton(action); add(toggle, "gap rel"); @@ -204,8 +211,8 @@ public class RocketPanel extends JPanel implements TreeSelectionListener, Change // Motor configuration selector - - JLabel label = new JLabel("Motor configuration:"); + //// Motor configuration: + JLabel label = new JLabel(trans.get("RocketPanel.lbl.Motorcfg")); label.setHorizontalAlignment(JLabel.RIGHT); add(label, "growx, right"); add(new JComboBox(new MotorConfigurationModel(configuration)), "wrap"); @@ -234,12 +241,9 @@ public class RocketPanel extends JPanel implements TreeSelectionListener, Change add(new BasicSlider(theta.getSliderModel(0, 2 * Math.PI), JSlider.VERTICAL, true), "ax 50%, wrap, width " + (d.width + 6) + "px:null:null, growy"); - - infoMessage = new JLabel("" + - "Click to select    " + - "Shift+click to select other    " + - "Double-click to edit    " + - "Click+drag to move"); + + //// Click to select    Shift+click to select other    Double-click to edit    Click+drag to move + infoMessage = new JLabel(trans.get("RocketPanel.lbl.infoMessage")); infoMessage.setFont(new Font("Sans Serif", Font.PLAIN, 9)); add(infoMessage, "skip, span, gapleft 25, wrap"); diff --git a/src/net/sf/openrocket/utils/MotorPlot.java b/src/net/sf/openrocket/utils/MotorPlot.java index 1f3eb90c..96814695 100644 --- a/src/net/sf/openrocket/utils/MotorPlot.java +++ b/src/net/sf/openrocket/utils/MotorPlot.java @@ -20,8 +20,10 @@ import javax.swing.SwingUtilities; import net.miginfocom.swing.MigLayout; import net.sf.openrocket.file.motor.GeneralMotorLoader; +import net.sf.openrocket.l10n.Translator; import net.sf.openrocket.motor.Motor; import net.sf.openrocket.motor.ThrustCurveMotor; +import net.sf.openrocket.startup.Application; import net.sf.openrocket.util.GUIUtil; import org.jfree.chart.ChartFactory; @@ -35,15 +37,18 @@ import org.jfree.data.xy.XYSeriesCollection; public class MotorPlot extends JDialog { private int selected = -1; + private static final Translator trans = Application.getTranslator(); public MotorPlot(List filenames, List motors) { - super((JFrame) null, "Motor plot", true); + //// Motor plot + super((JFrame) null, trans.get("MotorPlot.title.Motorplot"), true); JTabbedPane tabs = new JTabbedPane(); for (int i = 0; i < filenames.size(); i++) { JPanel pane = createPlotPanel((ThrustCurveMotor) motors.get(i)); - JButton button = new JButton("Select"); + //// Select button + JButton button = new JButton(trans.get("MotorPlot.but.Select")); final int number = i; button.addActionListener(new ActionListener() { @Override @@ -80,9 +85,12 @@ public class MotorPlot extends JDialog { // Create the chart using the factory to get all default settings JFreeChart chart = ChartFactory.createXYLineChart( - "Motor thrust curve", - "Time / s", - "Thrust / N", + //// Motor thrust curve + trans.get("MotorPlot.Chart.Motorthrustcurve"), + //// Time / s + trans.get("MotorPlot.Chart.Time"), + //// Thrust / N + trans.get("MotorPlot.Chart.Thrust"), new XYSeriesCollection(series), PlotOrientation.VERTICAL, true, @@ -109,11 +117,16 @@ public class MotorPlot extends JDialog { JTextArea area = new JTextArea(5, 40); StringBuilder sb = new StringBuilder(); - sb.append("Designation: ").append(motor.getDesignation()).append(" "); - sb.append("Manufacturer: ").append(motor.getManufacturer()).append(" "); - sb.append("Type: ").append(motor.getMotorType()).append('\n'); - sb.append("Delays: ").append(Arrays.toString(motor.getStandardDelays())).append('\n'); - sb.append("Comment:\n").append(motor.getDescription()); + //// Designation: + sb.append("MotorPlot.txt.Designation" + " ").append(motor.getDesignation()).append(" "); + //// Manufacturer: + sb.append("MotorPlot.txt.Manufacturer" + " ").append(motor.getManufacturer()).append(" "); + //// Type: + sb.append("MotorPlot.txt.Type" + " ").append(motor.getMotorType()).append('\n'); + //// Delays: + sb.append("MotorPlot.txt.Delays" +" ").append(Arrays.toString(motor.getStandardDelays())).append('\n'); + //// Comment:\n + sb.append("MotorPlot.txt.Comment" + " ").append(motor.getDescription()); area.setText(sb.toString()); panel.add(area, "grow, wrap");