mirror of https://github.com/zlatinb/muwire
externalize few more strings
parent
d4eb8631d0
commit
17cc7d4275
|
@ -4,6 +4,7 @@ import griffon.core.artifact.GriffonController
|
|||
import griffon.core.controller.ControllerAction
|
||||
import griffon.inject.MVCMember
|
||||
import griffon.metadata.ArtifactProviderFor
|
||||
import static com.muwire.gui.Translator.trans
|
||||
import javax.annotation.Nonnull
|
||||
import javax.swing.JOptionPane
|
||||
|
||||
|
@ -25,7 +26,7 @@ class WizardController {
|
|||
def errors = model.steps[model.currentStep].validate()
|
||||
if (errors != null && !errors.isEmpty()) {
|
||||
String errorMessage = String.join("\n", errors)
|
||||
JOptionPane.showMessageDialog(model.parent, errorMessage, "Invalid Input", JOptionPane.ERROR_MESSAGE)
|
||||
JOptionPane.showMessageDialog(model.parent, errorMessage, trans("INVALID_INPUT"), JOptionPane.ERROR_MESSAGE)
|
||||
} else {
|
||||
model.currentStep++
|
||||
view.updateLayout()
|
||||
|
|
|
@ -4,11 +4,18 @@ COLON=:
|
|||
EXIT=Exit
|
||||
OPEN_MUWIRE=Open MuWire
|
||||
|
||||
# Startup general
|
||||
MUWIRE_WILL_EXIT=MuWire will now exit.
|
||||
CORE_INIT_ERROR_HEADER=Couldn't initialize MuWire
|
||||
CORE_INIT_ERROR_BODY_EMBEDDED=MuWire failed to initialize
|
||||
CORE_INIT_ERROR_BODY_EXTERNAL=MuWire couldn't connect to the I2P router. Please make sure I2P is running.
|
||||
|
||||
# Wizard general
|
||||
CANCEL=Cancel
|
||||
PREVIOUS=Previous
|
||||
NEXT=Next
|
||||
FINISH=Finish
|
||||
INVALID_INPUT=Invalid Input
|
||||
|
||||
# Wizard nickname step
|
||||
SELECT_A_NICKNAME=Select a nickname
|
||||
|
|
|
@ -13,6 +13,7 @@ import com.muwire.core.UILoadedEvent
|
|||
import com.muwire.core.files.FileSharedEvent
|
||||
import com.muwire.core.util.DataUtil
|
||||
import com.muwire.gui.wizard.WizardDefaults
|
||||
import static com.muwire.gui.Translator.trans
|
||||
|
||||
import javax.annotation.Nonnull
|
||||
import javax.inject.Inject
|
||||
|
@ -82,7 +83,7 @@ class Ready extends AbstractLifecycleHandler {
|
|||
application.mvcGroupManager.createMVCGroup("wizard", params)
|
||||
|
||||
if (!finished['applied']) {
|
||||
JOptionPane.showMessageDialog(parent, "MuWire will now exit")
|
||||
JOptionPane.showMessageDialog(parent, trans("MUWIRE_WILL_EXIT"))
|
||||
System.exit(0)
|
||||
}
|
||||
|
||||
|
@ -115,8 +116,11 @@ class Ready extends AbstractLifecycleHandler {
|
|||
core.eventBus.publish(new UILoadedEvent())
|
||||
} catch (Exception bad) {
|
||||
log.log(Level.SEVERE,"couldn't initialize core",bad)
|
||||
JOptionPane.showMessageDialog(null, "Couldn't connect to I2P router. Make sure I2P is running and restart MuWire",
|
||||
"Can't connect to I2P router", JOptionPane.WARNING_MESSAGE)
|
||||
|
||||
String key = props.embeddedRouter ? "CORE_INIT_ERROR_BODY_EMBEDDED" : "CORE_INIT_ERROR_BODY_EXTERNAL"
|
||||
|
||||
JOptionPane.showMessageDialog(null, trans(key),
|
||||
trans("CORE_INIT_ERROR_HEADER"), JOptionPane.WARNING_MESSAGE)
|
||||
System.exit(0)
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue