mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
[WIP] Add translations support, using js-lingui, to newIDE (including libGD.js)
* Upgrade to Flow 0.92 and make fixes for it * Convert all extensions to use _("...") instead of t("...") for translations, to be able to be parsed by gettext * Handle translation in JS extensions * Move Providers out of MainFrame * Remove i18next * Adapt ExtractTranslations script to handle js files (for extensions)
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -9,6 +9,7 @@
|
||||
/ExtLibs/*.7z
|
||||
/scripts/Repository keys
|
||||
/scripts/logs/*.txt
|
||||
/scripts/gdcore-gdcpp-gdjs-extensions-messages.pot
|
||||
/Binaries/.build*
|
||||
/Binaries/.embuild*
|
||||
/Binaries/build*
|
||||
|
@@ -15,7 +15,11 @@
|
||||
|
||||
namespace gd {
|
||||
InstructionMetadata::InstructionMetadata()
|
||||
: sentence(_("Unknown or unsupported instruction")),
|
||||
: sentence(
|
||||
"Unknown or unsupported instruction"), // Avoid translating this
|
||||
// string, so that it's safe
|
||||
// and *fast* to use a
|
||||
// InstructionMetadata.
|
||||
canHaveSubInstructions(false),
|
||||
hidden(true) {}
|
||||
|
||||
|
35
Core/GDCore/Tools/Localization.cpp
Normal file
35
Core/GDCore/Tools/Localization.cpp
Normal file
@@ -0,0 +1,35 @@
|
||||
/*
|
||||
* GDevelop Core
|
||||
* Copyright 2008-present Florian Rival (Florian.Rival@gmail.com). All rights
|
||||
* reserved. This project is released under the MIT License.
|
||||
*/
|
||||
|
||||
#if defined(EMSCRIPTEN)
|
||||
#include <emscripten.h>
|
||||
#include "GDCore/String.h"
|
||||
|
||||
namespace gd {
|
||||
gd::String GetTranslation(const char* str) { // TODO: Inline?
|
||||
const char* translatedStr = (const char*)EM_ASM_INT(
|
||||
{
|
||||
var getTranslation = Module['getTranslation'];
|
||||
if (!getTranslation) {
|
||||
return $0;
|
||||
}
|
||||
|
||||
// Uncomment lines to display a warning if the cache
|
||||
// for strings is not ready.
|
||||
// if (!ensureCache) {
|
||||
// console.warn('No ensureCache initialized');
|
||||
// return $0;
|
||||
// }
|
||||
ensureCache.prepare();
|
||||
|
||||
var translatedStr = getTranslation(Pointer_stringify($0));
|
||||
return ensureString(translatedStr);
|
||||
},
|
||||
str);
|
||||
return gd::String(translatedStr); // TODO: Is copying necessary?
|
||||
}
|
||||
} // namespace gd
|
||||
#endif
|
@@ -6,20 +6,55 @@
|
||||
#ifndef GDCORE_LOCALIZATION_H
|
||||
#define GDCORE_LOCALIZATION_H
|
||||
|
||||
/** @file
|
||||
* Provide a way to mark strings to be translated.
|
||||
*
|
||||
* Strings to be translated in GDevelop Core codebase (and GDCpp),
|
||||
* are marked with the underscore macro, for example: _("Hello World").
|
||||
*
|
||||
* The macro is then defined to be using the translation function
|
||||
* of the underlying platform (Emscripten for GD5, wxWidgets for GD4,
|
||||
* no translation for GDCpp Runtime).
|
||||
*/
|
||||
|
||||
#if defined(GD_IDE_ONLY) && !defined(GD_NO_WX_GUI)
|
||||
// When compiling with wxWidgets, use the translation method
|
||||
// provided by wxWidgets, but return a gd::String.
|
||||
|
||||
#include <wx/intl.h>
|
||||
#include "GDCore/String.h"
|
||||
|
||||
// Create a new macro to return UTF8 gd::String from a translation
|
||||
#if defined(_)
|
||||
#undef _
|
||||
#endif
|
||||
#define _(s) gd::String(wxGetTranslation(wxString::FromUTF8(u8##s)))
|
||||
|
||||
#elif defined(EMSCRIPTEN)
|
||||
// When compiling with Emscripten, use a translation function that is calling a
|
||||
// JS method on the module, so that an external translation library can be used.
|
||||
|
||||
#include "GDCore/String.h"
|
||||
#if defined(_)
|
||||
#undef _
|
||||
#endif
|
||||
|
||||
namespace gd {
|
||||
gd::String GetTranslation(const char* str);
|
||||
}
|
||||
|
||||
#define _(s) gd::GetTranslation(u8##s)
|
||||
|
||||
#else
|
||||
// When compiling without Emscripten or wxWidgets (typically for GDC++ Runtime),
|
||||
// just return an untranslated gd::String.
|
||||
|
||||
// Create a new macro to return UTF8 gd::String from a translation
|
||||
#if defined(_)
|
||||
#undef _
|
||||
#endif
|
||||
#define _(s) gd::String(u8##s)
|
||||
|
||||
#endif
|
||||
|
||||
#endif // GDCORE_LOCALIZATION_H
|
||||
|
@@ -11,12 +11,12 @@
|
||||
* More information on https://github.com/4ian/GDevelop/blob/master/newIDE/README-extensions.md
|
||||
*/
|
||||
module.exports = {
|
||||
createExtension: function(t, gd) {
|
||||
createExtension: function(_, gd) {
|
||||
const extension = new gd.PlatformExtension();
|
||||
extension.setExtensionInformation(
|
||||
'AdMob',
|
||||
t('AdMob'),
|
||||
t(
|
||||
_('AdMob'),
|
||||
_(
|
||||
'Allow the game to display AdMob banner, interstitial and reward video ads'
|
||||
),
|
||||
'Franco Maciel',
|
||||
@@ -27,10 +27,10 @@ module.exports = {
|
||||
extension
|
||||
.addCondition(
|
||||
'BannerLoading',
|
||||
t('Banner loading'),
|
||||
t('Check if a banner is currently loading.'),
|
||||
t('Banner is loading'),
|
||||
t('AdMob'),
|
||||
_('Banner loading'),
|
||||
_('Check if a banner is currently loading.'),
|
||||
_('Banner is loading'),
|
||||
_('AdMob'),
|
||||
'JsPlatform/Extensions/admobicon24.png',
|
||||
'JsPlatform/Extensions/admobicon16.png'
|
||||
)
|
||||
@@ -41,10 +41,10 @@ module.exports = {
|
||||
extension
|
||||
.addCondition(
|
||||
'BannerReady',
|
||||
t('Banner ready'),
|
||||
t('Check if a banner is ready to be displayed.'),
|
||||
t('Banner is ready'),
|
||||
t('AdMob'),
|
||||
_('Banner ready'),
|
||||
_('Check if a banner is ready to be displayed.'),
|
||||
_('Banner is ready'),
|
||||
_('AdMob'),
|
||||
'JsPlatform/Extensions/admobicon24.png',
|
||||
'JsPlatform/Extensions/admobicon16.png'
|
||||
)
|
||||
@@ -55,10 +55,10 @@ module.exports = {
|
||||
extension
|
||||
.addCondition(
|
||||
'BannerShowing',
|
||||
t('Banner showing'),
|
||||
t('Check if there is a banner being displayed.'),
|
||||
t('Banner is showing'),
|
||||
t('AdMob'),
|
||||
_('Banner showing'),
|
||||
_('Check if there is a banner being displayed.'),
|
||||
_('Banner is showing'),
|
||||
_('AdMob'),
|
||||
'JsPlatform/Extensions/admobicon24.png',
|
||||
'JsPlatform/Extensions/admobicon16.png'
|
||||
)
|
||||
@@ -69,10 +69,10 @@ module.exports = {
|
||||
extension
|
||||
.addCondition(
|
||||
'BannerExists',
|
||||
t('Banner exists'),
|
||||
t('Check if there is a banner in memory (visible or hidden).'),
|
||||
t('Banner exists'),
|
||||
t('AdMob'),
|
||||
_('Banner exists'),
|
||||
_('Check if there is a banner in memory (visible or hidden).'),
|
||||
_('Banner exists'),
|
||||
_('AdMob'),
|
||||
'JsPlatform/Extensions/admobicon24.png',
|
||||
'JsPlatform/Extensions/admobicon16.png'
|
||||
)
|
||||
@@ -83,31 +83,31 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
'LoadBanner',
|
||||
t('Load banner'),
|
||||
t(
|
||||
_('Load banner'),
|
||||
_(
|
||||
'Start loading a banner, you can display it automatically when finish loading.\nIf test mode is set to true a test banner will be displayed.'
|
||||
),
|
||||
t(
|
||||
_(
|
||||
'Load banner (at top: _PARAM2_, overlap: _PARAM3_, show on load: _PARAM4_, test mode: _PARAM5_)'
|
||||
),
|
||||
t('AdMob'),
|
||||
_('AdMob'),
|
||||
'JsPlatform/Extensions/admobicon24.png',
|
||||
'JsPlatform/Extensions/admobicon16.png'
|
||||
)
|
||||
.addParameter('string', t('Android banner ID'), '', false)
|
||||
.addParameter('string', t('iOS banner ID'), '', false)
|
||||
.addParameter('string', _('Android banner ID'), '', false)
|
||||
.addParameter('string', _('iOS banner ID'), '', false)
|
||||
.addParameter(
|
||||
'yesorno',
|
||||
t('Display at top? (bottom otherwise)'),
|
||||
_('Display at top? (bottom otherwise)'),
|
||||
'',
|
||||
false
|
||||
)
|
||||
.setDefaultValue('false')
|
||||
.addParameter('yesorno', t('Overlap webview?'), '', false)
|
||||
.addParameter('yesorno', _('Overlap webview?'), '', false)
|
||||
.setDefaultValue('true')
|
||||
.addParameter('yesorno', t('Display on load complete?'), '', false)
|
||||
.addParameter('yesorno', _('Display on load complete?'), '', false)
|
||||
.setDefaultValue('true')
|
||||
.addParameter('yesorno', t('Test mode?'), '', false)
|
||||
.addParameter('yesorno', _('Test mode?'), '', false)
|
||||
.setDefaultValue('true')
|
||||
.getCodeExtraInformation()
|
||||
.setIncludeFile('Extensions/AdMob/admobtools.js')
|
||||
@@ -116,10 +116,10 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
'ShowBanner',
|
||||
t('Show banner'),
|
||||
t('Show the banner, will work only when the banner is fully loaded.'),
|
||||
t('Show banner'),
|
||||
t('AdMob'),
|
||||
_('Show banner'),
|
||||
_('Show the banner, will work only when the banner is fully loaded.'),
|
||||
_('Show banner'),
|
||||
_('AdMob'),
|
||||
'JsPlatform/Extensions/admobicon24.png',
|
||||
'JsPlatform/Extensions/admobicon16.png'
|
||||
)
|
||||
@@ -130,12 +130,12 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
'HideBanner',
|
||||
t('Hide banner'),
|
||||
t(
|
||||
_('Hide banner'),
|
||||
_(
|
||||
'Hide the banner. You can show it again with the corresponding action.'
|
||||
),
|
||||
t('Hide banner'),
|
||||
t('AdMob'),
|
||||
_('Hide banner'),
|
||||
_('AdMob'),
|
||||
'JsPlatform/Extensions/admobicon24.png',
|
||||
'JsPlatform/Extensions/admobicon16.png'
|
||||
)
|
||||
@@ -146,12 +146,12 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
'RemoveBanner',
|
||||
t('Remove banner'),
|
||||
t(
|
||||
_('Remove banner'),
|
||||
_(
|
||||
'Remove the banner. You have to load another banner to show it again.'
|
||||
),
|
||||
t('Remove banner'),
|
||||
t('AdMob'),
|
||||
_('Remove banner'),
|
||||
_('AdMob'),
|
||||
'JsPlatform/Extensions/admobicon24.png',
|
||||
'JsPlatform/Extensions/admobicon16.png'
|
||||
)
|
||||
@@ -163,10 +163,10 @@ module.exports = {
|
||||
extension
|
||||
.addCondition(
|
||||
'InterstitialLoading',
|
||||
t('Interstitial loading'),
|
||||
t('Check if an interstitial is currently loading.'),
|
||||
t('Interstitial is loading'),
|
||||
t('AdMob'),
|
||||
_('Interstitial loading'),
|
||||
_('Check if an interstitial is currently loading.'),
|
||||
_('Interstitial is loading'),
|
||||
_('AdMob'),
|
||||
'JsPlatform/Extensions/admobicon24.png',
|
||||
'JsPlatform/Extensions/admobicon16.png'
|
||||
)
|
||||
@@ -177,10 +177,10 @@ module.exports = {
|
||||
extension
|
||||
.addCondition(
|
||||
'InterstitialReady',
|
||||
t('Interstitial ready'),
|
||||
t('Check if an interstitial is ready to be displayed.'),
|
||||
t('Interstitial is ready'),
|
||||
t('AdMob'),
|
||||
_('Interstitial ready'),
|
||||
_('Check if an interstitial is ready to be displayed.'),
|
||||
_('Interstitial is ready'),
|
||||
_('AdMob'),
|
||||
'JsPlatform/Extensions/admobicon24.png',
|
||||
'JsPlatform/Extensions/admobicon16.png'
|
||||
)
|
||||
@@ -191,10 +191,10 @@ module.exports = {
|
||||
extension
|
||||
.addCondition(
|
||||
'InterstitialShowing',
|
||||
t('Interstitial showing'),
|
||||
t('Check if there is an interstitial being displayed.'),
|
||||
t('Interstitial is showing'),
|
||||
t('AdMob'),
|
||||
_('Interstitial showing'),
|
||||
_('Check if there is an interstitial being displayed.'),
|
||||
_('Interstitial is showing'),
|
||||
_('AdMob'),
|
||||
'JsPlatform/Extensions/admobicon24.png',
|
||||
'JsPlatform/Extensions/admobicon16.png'
|
||||
)
|
||||
@@ -205,20 +205,20 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
'LoadInterstitial',
|
||||
t('Load interstitial'),
|
||||
t(
|
||||
_('Load interstitial'),
|
||||
_(
|
||||
'Start loading an interstitial, you can display it automatically when finish loading.\nIf test mode is set to true a test interstitial will be displayed.'
|
||||
),
|
||||
t('Load interstitial (show on load: _PARAM2_, test mode: _PARAM3_)'),
|
||||
t('AdMob'),
|
||||
_('Load interstitial (show on load: _PARAM2_, test mode: _PARAM3_)'),
|
||||
_('AdMob'),
|
||||
'JsPlatform/Extensions/admobicon24.png',
|
||||
'JsPlatform/Extensions/admobicon16.png'
|
||||
)
|
||||
.addParameter('string', t('Android interstitial ID'), '', false)
|
||||
.addParameter('string', t('iOS interstitial ID'), '', false)
|
||||
.addParameter('yesorno', t('Display on load complete?'), '', false)
|
||||
.addParameter('string', _('Android interstitial ID'), '', false)
|
||||
.addParameter('string', _('iOS interstitial ID'), '', false)
|
||||
.addParameter('yesorno', _('Display on load complete?'), '', false)
|
||||
.setDefaultValue('true')
|
||||
.addParameter('yesorno', t('Test mode?'), '', false)
|
||||
.addParameter('yesorno', _('Test mode?'), '', false)
|
||||
.setDefaultValue('true')
|
||||
.getCodeExtraInformation()
|
||||
.setIncludeFile('Extensions/AdMob/admobtools.js')
|
||||
@@ -227,12 +227,12 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
'ShowInterstitial',
|
||||
t('Show interstitial'),
|
||||
t(
|
||||
_('Show interstitial'),
|
||||
_(
|
||||
'Show the interstitial, will work only when the interstitial is fully loaded.'
|
||||
),
|
||||
t('Show interstitial'),
|
||||
t('AdMob'),
|
||||
_('Show interstitial'),
|
||||
_('AdMob'),
|
||||
'JsPlatform/Extensions/admobicon24.png',
|
||||
'JsPlatform/Extensions/admobicon16.png'
|
||||
)
|
||||
@@ -244,10 +244,10 @@ module.exports = {
|
||||
extension
|
||||
.addCondition(
|
||||
'VideoLoading',
|
||||
t('Video loading'),
|
||||
t('Check if a reward video is currently loading.'),
|
||||
t('Reward video is loading'),
|
||||
t('AdMob'),
|
||||
_('Video loading'),
|
||||
_('Check if a reward video is currently loading.'),
|
||||
_('Reward video is loading'),
|
||||
_('AdMob'),
|
||||
'JsPlatform/Extensions/admobicon24.png',
|
||||
'JsPlatform/Extensions/admobicon16.png'
|
||||
)
|
||||
@@ -258,10 +258,10 @@ module.exports = {
|
||||
extension
|
||||
.addCondition(
|
||||
'VideoReady',
|
||||
t('Video ready'),
|
||||
t('Check if a reward video is ready to be displayed.'),
|
||||
t('Reward video is ready'),
|
||||
t('AdMob'),
|
||||
_('Video ready'),
|
||||
_('Check if a reward video is ready to be displayed.'),
|
||||
_('Reward video is ready'),
|
||||
_('AdMob'),
|
||||
'JsPlatform/Extensions/admobicon24.png',
|
||||
'JsPlatform/Extensions/admobicon16.png'
|
||||
)
|
||||
@@ -272,10 +272,10 @@ module.exports = {
|
||||
extension
|
||||
.addCondition(
|
||||
'VideoShowing',
|
||||
t('Video showing'),
|
||||
t('Check if there is a reward video being displayed.'),
|
||||
t('Reward video is showing'),
|
||||
t('AdMob'),
|
||||
_('Video showing'),
|
||||
_('Check if there is a reward video being displayed.'),
|
||||
_('Reward video is showing'),
|
||||
_('AdMob'),
|
||||
'JsPlatform/Extensions/admobicon24.png',
|
||||
'JsPlatform/Extensions/admobicon16.png'
|
||||
)
|
||||
@@ -286,16 +286,16 @@ module.exports = {
|
||||
extension
|
||||
.addCondition(
|
||||
'VideoReward',
|
||||
t('Video reward'),
|
||||
t(
|
||||
_('Video reward'),
|
||||
_(
|
||||
'Check if there is a video reward.\nYou can mark it as non-claimed yet, so you can check this reward in other events.'
|
||||
),
|
||||
t('Video reward given'),
|
||||
t('AdMob'),
|
||||
_('Video reward given'),
|
||||
_('AdMob'),
|
||||
'JsPlatform/Extensions/admobicon24.png',
|
||||
'JsPlatform/Extensions/admobicon16.png'
|
||||
)
|
||||
.addParameter('yesorno', t('Mark as claimed'), '', false)
|
||||
.addParameter('yesorno', _('Mark as claimed'), '', false)
|
||||
.setDefaultValue('true')
|
||||
.getCodeExtraInformation()
|
||||
.setIncludeFile('Extensions/AdMob/admobtools.js')
|
||||
@@ -304,20 +304,20 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
'LoadVideo',
|
||||
t('Load video'),
|
||||
t(
|
||||
_('Load video'),
|
||||
_(
|
||||
'Start loading a reward video, you can display it automatically when finish loading.\nIf test mode is set to true a test video will be displayed.'
|
||||
),
|
||||
t('Load reward video (show on load: _PARAM2_, test mode: _PARAM3_)'),
|
||||
t('AdMob'),
|
||||
_('Load reward video (show on load: _PARAM2_, test mode: _PARAM3_)'),
|
||||
_('AdMob'),
|
||||
'JsPlatform/Extensions/admobicon24.png',
|
||||
'JsPlatform/Extensions/admobicon16.png'
|
||||
)
|
||||
.addParameter('string', t('Android reward video ID'), '', false)
|
||||
.addParameter('string', t('iOS reward video ID'), '', false)
|
||||
.addParameter('yesorno', t('Display on load complete?'), '', false)
|
||||
.addParameter('string', _('Android reward video ID'), '', false)
|
||||
.addParameter('string', _('iOS reward video ID'), '', false)
|
||||
.addParameter('yesorno', _('Display on load complete?'), '', false)
|
||||
.setDefaultValue('true')
|
||||
.addParameter('yesorno', t('Test mode?'), '', false)
|
||||
.addParameter('yesorno', _('Test mode?'), '', false)
|
||||
.setDefaultValue('true')
|
||||
.getCodeExtraInformation()
|
||||
.setIncludeFile('Extensions/AdMob/admobtools.js')
|
||||
@@ -326,12 +326,12 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
'ShowVideo',
|
||||
t('Show video'),
|
||||
t(
|
||||
_('Show video'),
|
||||
_(
|
||||
'Show the reward video, will work only when the video is fully loaded.'
|
||||
),
|
||||
t('Show reward video'),
|
||||
t('AdMob'),
|
||||
_('Show reward video'),
|
||||
_('AdMob'),
|
||||
'JsPlatform/Extensions/admobicon24.png',
|
||||
'JsPlatform/Extensions/admobicon16.png'
|
||||
)
|
||||
@@ -342,10 +342,10 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
'ClaimReward',
|
||||
t('Claim reward'),
|
||||
t('Mark the video reward as claimed.'),
|
||||
t('Claim video reward'),
|
||||
t('AdMob'),
|
||||
_('Claim reward'),
|
||||
_('Mark the video reward as claimed.'),
|
||||
_('Claim video reward'),
|
||||
_('AdMob'),
|
||||
'JsPlatform/Extensions/admobicon24.png',
|
||||
'JsPlatform/Extensions/admobicon16.png'
|
||||
)
|
||||
|
@@ -147,7 +147,7 @@ class Extension : public ExtensionBase {
|
||||
_("Z Position"),
|
||||
_("Modify the Z Position of a 3D Box."),
|
||||
_("Do _PARAM1__PARAM2_ to the Z position of _PARAM0_"),
|
||||
_(""),
|
||||
"",
|
||||
"res/actions/position24.png",
|
||||
"res/actions/position.png")
|
||||
|
||||
@@ -164,7 +164,7 @@ class Extension : public ExtensionBase {
|
||||
_("Z Position"),
|
||||
_("Compare the Z position of a 3D Box."),
|
||||
_("Z position of _PARAM0_ is _PARAM1__PARAM2_"),
|
||||
_(""),
|
||||
"",
|
||||
"res/conditions/position24.png",
|
||||
"res/conditions/position.png")
|
||||
|
||||
|
@@ -39,7 +39,7 @@ void DeclareDestroyOutsideBehaviorExtension(gd::PlatformExtension& extension) {
|
||||
_("Compare the additional border that the object must cross "
|
||||
"before being deleted."),
|
||||
_("The additional border of _PARAM0_ is _PARAM2__PARAM3_"),
|
||||
_(""),
|
||||
"",
|
||||
"CppPlatform/Extensions/destroyoutsideicon24.png",
|
||||
"CppPlatform/Extensions/destroyoutsideicon16.png")
|
||||
.AddParameter("object", _("Object"))
|
||||
@@ -56,7 +56,7 @@ void DeclareDestroyOutsideBehaviorExtension(gd::PlatformExtension& extension) {
|
||||
_("Change the additional border that the object must cross "
|
||||
"before being deleted."),
|
||||
_("Do _PARAM2__PARAM3_ to the additional border of _PARAM0_"),
|
||||
_(""),
|
||||
"",
|
||||
"CppPlatform/Extensions/destroyoutsideicon24.png",
|
||||
"CppPlatform/Extensions/destroyoutsideicon16.png")
|
||||
.AddParameter("object", _("Object"))
|
||||
|
@@ -11,12 +11,12 @@
|
||||
* More information on https://github.com/4ian/GDevelop/blob/master/newIDE/README-extensions.md
|
||||
*/
|
||||
module.exports = {
|
||||
createExtension: function(t, gd) {
|
||||
createExtension: function(_, gd) {
|
||||
const extension = new gd.PlatformExtension();
|
||||
extension.setExtensionInformation(
|
||||
"DeviceSensors",
|
||||
t("Device sensors"),
|
||||
t(
|
||||
_("Device sensors"),
|
||||
_(
|
||||
"Allow the game to access the sensors of a mobile device."
|
||||
),
|
||||
"Matthias Meike",
|
||||
@@ -26,12 +26,12 @@ module.exports = {
|
||||
extension
|
||||
.addCondition(
|
||||
"OrientationSensorActive",
|
||||
t("Sensor active"),
|
||||
t(
|
||||
_("Sensor active"),
|
||||
_(
|
||||
"The condition is true if the device orientation sensor is currently active"
|
||||
),
|
||||
t("Orientation sensor is active"),
|
||||
t("Sensors/Orientation"),
|
||||
_("Orientation sensor is active"),
|
||||
_("Sensors/Orientation"),
|
||||
"JsPlatform/Extensions/orientation_active24.png",
|
||||
"JsPlatform/Extensions/orientation_active32.png"
|
||||
)
|
||||
@@ -44,17 +44,17 @@ module.exports = {
|
||||
extension
|
||||
.addCondition(
|
||||
"OrientationAlpha",
|
||||
t("Compare the value of orientation alpha"),
|
||||
t(
|
||||
_("Compare the value of orientation alpha"),
|
||||
_(
|
||||
"Compare the value of orientation alpha. (Range: 0 to 360°)"
|
||||
),
|
||||
t("Orientation alpha is _PARAM0__PARAM1_"),
|
||||
t("Sensors/Orientation"),
|
||||
_("Orientation alpha is _PARAM0__PARAM1_"),
|
||||
_("Sensors/Orientation"),
|
||||
"JsPlatform/Extensions/orientation_alpha24.png",
|
||||
"JsPlatform/Extensions/orientation_alpha32.png"
|
||||
)
|
||||
.addParameter("relationalOperator", t("Sign of the test"))
|
||||
.addParameter("expression", t("Value"))
|
||||
.addParameter("relationalOperator", _("Sign of the test"))
|
||||
.addParameter("expression", _("Value"))
|
||||
.getCodeExtraInformation()
|
||||
.setIncludeFile(
|
||||
"Extensions/DeviceSensors/devicesensortools.js"
|
||||
@@ -64,17 +64,17 @@ module.exports = {
|
||||
extension
|
||||
.addCondition(
|
||||
"OrientationBeta",
|
||||
t("Compare the value of orientation beta"),
|
||||
t(
|
||||
_("Compare the value of orientation beta"),
|
||||
_(
|
||||
"Compare the value of orientation beta. (Range: -180 to 180°)"
|
||||
),
|
||||
t("Orientation beta is _PARAM0__PARAM1_"),
|
||||
t("Sensors/Orientation"),
|
||||
_("Orientation beta is _PARAM0__PARAM1_"),
|
||||
_("Sensors/Orientation"),
|
||||
"JsPlatform/Extensions/orientation_beta24.png",
|
||||
"JsPlatform/Extensions/orientation_beta32.png"
|
||||
)
|
||||
.addParameter("relationalOperator", t("Sign of the test"))
|
||||
.addParameter("expression", t("Value"))
|
||||
.addParameter("relationalOperator", _("Sign of the test"))
|
||||
.addParameter("expression", _("Value"))
|
||||
.getCodeExtraInformation()
|
||||
.setIncludeFile(
|
||||
"Extensions/DeviceSensors/devicesensortools.js"
|
||||
@@ -84,17 +84,17 @@ module.exports = {
|
||||
extension
|
||||
.addCondition(
|
||||
"OrientationGamma",
|
||||
t("Compare the value of orientation gamma"),
|
||||
t(
|
||||
_("Compare the value of orientation gamma"),
|
||||
_(
|
||||
"Compare the value of orientation gamma. (Range: -90 to 90°)"
|
||||
),
|
||||
t("Orientation gamma is _PARAM0__PARAM1_"),
|
||||
t("Sensors/Orientation"),
|
||||
_("Orientation gamma is _PARAM0__PARAM1_"),
|
||||
_("Sensors/Orientation"),
|
||||
"JsPlatform/Extensions/orientation_gamma24.png",
|
||||
"JsPlatform/Extensions/orientation_gamma32.png"
|
||||
)
|
||||
.addParameter("relationalOperator", t("Sign of the test"))
|
||||
.addParameter("expression", t("Value"))
|
||||
.addParameter("relationalOperator", _("Sign of the test"))
|
||||
.addParameter("expression", _("Value"))
|
||||
.getCodeExtraInformation()
|
||||
.setIncludeFile(
|
||||
"Extensions/DeviceSensors/devicesensortools.js"
|
||||
@@ -104,10 +104,10 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
"ActivateOrientationListener",
|
||||
t("Activate orientation sensor"),
|
||||
t("Activate the orientation sensor. (remember to turn it off again)"),
|
||||
t("Activate the orientation sensor."),
|
||||
t("Sensors/Orientation"),
|
||||
_("Activate orientation sensor"),
|
||||
_("Activate the orientation sensor. (remember to turn it off again)"),
|
||||
_("Activate the orientation sensor."),
|
||||
_("Sensors/Orientation"),
|
||||
"JsPlatform/Extensions/orientation_active24.png",
|
||||
"JsPlatform/Extensions/orientation_active32.png"
|
||||
)
|
||||
@@ -120,10 +120,10 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
"DeactivateOrientationListener",
|
||||
t("Deactivate orientation sensor"),
|
||||
t("Deactivate the orientation sensor."),
|
||||
t("Deactivate the orientation sensor."),
|
||||
t("Sensors/Orientation"),
|
||||
_("Deactivate orientation sensor"),
|
||||
_("Deactivate the orientation sensor."),
|
||||
_("Deactivate the orientation sensor."),
|
||||
_("Sensors/Orientation"),
|
||||
"JsPlatform/Extensions/orientation_inactive24.png",
|
||||
"JsPlatform/Extensions/orientation_inactive32.png"
|
||||
)
|
||||
@@ -136,9 +136,9 @@ module.exports = {
|
||||
extension
|
||||
.addExpression(
|
||||
"OrientationAbsolute",
|
||||
t("Is Absolute"),
|
||||
t("Get if the devices orientation is absolute and not relative"),
|
||||
t("Sensors/Orientation")
|
||||
_("Is Absolute"),
|
||||
_("Get if the devices orientation is absolute and not relative"),
|
||||
_("Sensors/Orientation")
|
||||
)
|
||||
.getCodeExtraInformation()
|
||||
.setIncludeFile(
|
||||
@@ -149,9 +149,9 @@ module.exports = {
|
||||
extension
|
||||
.addExpression(
|
||||
"OrientationAlpha",
|
||||
t("Alpha value"),
|
||||
t("Get the devices orientation Alpha (compass)"),
|
||||
t("Sensors/Orientation")
|
||||
_("Alpha value"),
|
||||
_("Get the devices orientation Alpha (compass)"),
|
||||
_("Sensors/Orientation")
|
||||
)
|
||||
.getCodeExtraInformation()
|
||||
.setIncludeFile(
|
||||
@@ -162,9 +162,9 @@ module.exports = {
|
||||
extension
|
||||
.addExpression(
|
||||
"OrientationBeta",
|
||||
t("Beta value"),
|
||||
t("Get the devices orientation Beta"),
|
||||
t("Sensors/Orientation")
|
||||
_("Beta value"),
|
||||
_("Get the devices orientation Beta"),
|
||||
_("Sensors/Orientation")
|
||||
)
|
||||
.getCodeExtraInformation()
|
||||
.setIncludeFile(
|
||||
@@ -175,9 +175,9 @@ module.exports = {
|
||||
extension
|
||||
.addExpression(
|
||||
"OrientationGamma",
|
||||
t("Gamma value"),
|
||||
t("Get the devices orientation Gamma value"),
|
||||
t("Sensors/Orientation")
|
||||
_("Gamma value"),
|
||||
_("Get the devices orientation Gamma value"),
|
||||
_("Sensors/Orientation")
|
||||
)
|
||||
.getCodeExtraInformation()
|
||||
.setIncludeFile(
|
||||
@@ -188,12 +188,12 @@ module.exports = {
|
||||
extension
|
||||
.addCondition(
|
||||
"MotionSensorActive",
|
||||
t("Sensor active"),
|
||||
t(
|
||||
_("Sensor active"),
|
||||
_(
|
||||
"The condition is true if the device motion sensor is currently active"
|
||||
),
|
||||
t("Motion sensor is active"),
|
||||
t("Sensors/Motion"),
|
||||
_("Motion sensor is active"),
|
||||
_("Sensors/Motion"),
|
||||
"JsPlatform/Extensions/motion_active24.png",
|
||||
"JsPlatform/Extensions/motion_active32.png"
|
||||
)
|
||||
@@ -206,17 +206,17 @@ module.exports = {
|
||||
extension
|
||||
.addCondition(
|
||||
"RotationAlpha",
|
||||
t("Compare the value of rotation alpha"),
|
||||
t(
|
||||
_("Compare the value of rotation alpha"),
|
||||
_(
|
||||
"Compare the value of rotation alpha. (Note: few devices support this sensor)"
|
||||
),
|
||||
t("Rotation alpha is _PARAM0__PARAM1_"),
|
||||
t("Sensors/Motion"),
|
||||
_("Rotation alpha is _PARAM0__PARAM1_"),
|
||||
_("Sensors/Motion"),
|
||||
"JsPlatform/Extensions/motion_rotation_alpha24.png",
|
||||
"JsPlatform/Extensions/motion_rotation_alpha32.png"
|
||||
)
|
||||
.addParameter("relationalOperator", t("Sign of the test"))
|
||||
.addParameter("expression", t("Value (m/s²)"))
|
||||
.addParameter("relationalOperator", _("Sign of the test"))
|
||||
.addParameter("expression", _("Value (m/s²)"))
|
||||
.getCodeExtraInformation()
|
||||
.setIncludeFile(
|
||||
"Extensions/DeviceSensors/devicesensortools.js"
|
||||
@@ -226,17 +226,17 @@ module.exports = {
|
||||
extension
|
||||
.addCondition(
|
||||
"RotationBeta",
|
||||
t("Compare the value of rotation beta"),
|
||||
t(
|
||||
_("Compare the value of rotation beta"),
|
||||
_(
|
||||
"Compare the value of rotation beta. (Note: few devices support this sensor)"
|
||||
),
|
||||
t("Rotation beta is _PARAM0__PARAM1_"),
|
||||
t("Sensors/Motion"),
|
||||
_("Rotation beta is _PARAM0__PARAM1_"),
|
||||
_("Sensors/Motion"),
|
||||
"JsPlatform/Extensions/motion_rotation_beta24.png",
|
||||
"JsPlatform/Extensions/motion_rotation_beta32.png"
|
||||
)
|
||||
.addParameter("relationalOperator", t("Sign of the test"))
|
||||
.addParameter("expression", t("Value (m/s²)"))
|
||||
.addParameter("relationalOperator", _("Sign of the test"))
|
||||
.addParameter("expression", _("Value (m/s²)"))
|
||||
.getCodeExtraInformation()
|
||||
.setIncludeFile(
|
||||
"Extensions/DeviceSensors/devicesensortools.js"
|
||||
@@ -246,17 +246,17 @@ module.exports = {
|
||||
extension
|
||||
.addCondition(
|
||||
"RotationGamma",
|
||||
t("Compare the value of rotation gamma"),
|
||||
t(
|
||||
_("Compare the value of rotation gamma"),
|
||||
_(
|
||||
"Compare the value of rotation gamma. (Note: few devices support this sensor)"
|
||||
),
|
||||
t("Rotation gamma is _PARAM0__PARAM1_"),
|
||||
t("Sensors/Motion"),
|
||||
_("Rotation gamma is _PARAM0__PARAM1_"),
|
||||
_("Sensors/Motion"),
|
||||
"JsPlatform/Extensions/motion_rotation_gamma24.png",
|
||||
"JsPlatform/Extensions/motion_rotation_gamma32.png"
|
||||
)
|
||||
.addParameter("relationalOperator", t("Sign of the test"))
|
||||
.addParameter("expression", t("Value (m/s²)"))
|
||||
.addParameter("relationalOperator", _("Sign of the test"))
|
||||
.addParameter("expression", _("Value (m/s²)"))
|
||||
.getCodeExtraInformation()
|
||||
.setIncludeFile(
|
||||
"Extensions/DeviceSensors/devicesensortools.js"
|
||||
@@ -266,17 +266,17 @@ module.exports = {
|
||||
extension
|
||||
.addCondition(
|
||||
"AccelerationX",
|
||||
t("Compare the value of acceleration on X-axis"),
|
||||
t(
|
||||
_("Compare the value of acceleration on X-axis"),
|
||||
_(
|
||||
"Compare the value of acceleration on the X-axis (m/s²)."
|
||||
),
|
||||
t("Acceleration X is _PARAM0__PARAM1_"),
|
||||
t("Sensors/Motion"),
|
||||
_("Acceleration X is _PARAM0__PARAM1_"),
|
||||
_("Sensors/Motion"),
|
||||
"JsPlatform/Extensions/motion_acceleration_x24.png",
|
||||
"JsPlatform/Extensions/motion_acceleration_x32.png"
|
||||
)
|
||||
.addParameter("relationalOperator", t("Sign of the test"))
|
||||
.addParameter("expression", t("Value (m/s²)"))
|
||||
.addParameter("relationalOperator", _("Sign of the test"))
|
||||
.addParameter("expression", _("Value (m/s²)"))
|
||||
.getCodeExtraInformation()
|
||||
.setIncludeFile(
|
||||
"Extensions/DeviceSensors/devicesensortools.js"
|
||||
@@ -286,17 +286,17 @@ module.exports = {
|
||||
extension
|
||||
.addCondition(
|
||||
"AccelerationY",
|
||||
t("Compare the value of acceleration on Y-axis"),
|
||||
t(
|
||||
_("Compare the value of acceleration on Y-axis"),
|
||||
_(
|
||||
"Compare the value of acceleration on the Y-axis (m/s²)."
|
||||
),
|
||||
t("Acceleration Y is _PARAM0__PARAM1_"),
|
||||
t("Sensors/Motion"),
|
||||
_("Acceleration Y is _PARAM0__PARAM1_"),
|
||||
_("Sensors/Motion"),
|
||||
"JsPlatform/Extensions/motion_acceleration_y24.png",
|
||||
"JsPlatform/Extensions/motion_acceleration_y32.png"
|
||||
)
|
||||
.addParameter("relationalOperator", t("Sign of the test"))
|
||||
.addParameter("expression", t("Value (m/s²)"))
|
||||
.addParameter("relationalOperator", _("Sign of the test"))
|
||||
.addParameter("expression", _("Value (m/s²)"))
|
||||
.getCodeExtraInformation()
|
||||
.setIncludeFile(
|
||||
"Extensions/DeviceSensors/devicesensortools.js"
|
||||
@@ -306,17 +306,17 @@ module.exports = {
|
||||
extension
|
||||
.addCondition(
|
||||
"AccelerationZ",
|
||||
t("Compare the value of acceleration on Z-axis"),
|
||||
t(
|
||||
_("Compare the value of acceleration on Z-axis"),
|
||||
_(
|
||||
"Compare the value of acceleration on the Z-axis (m/s²)."
|
||||
),
|
||||
t("Acceleration Z is _PARAM0__PARAM1_"),
|
||||
t("Sensors/Motion"),
|
||||
_("Acceleration Z is _PARAM0__PARAM1_"),
|
||||
_("Sensors/Motion"),
|
||||
"JsPlatform/Extensions/motion_acceleration_z24.png",
|
||||
"JsPlatform/Extensions/motion_acceleration_z32.png"
|
||||
)
|
||||
.addParameter("relationalOperator", t("Sign of the test"))
|
||||
.addParameter("expression", t("Value (m/s²)"))
|
||||
.addParameter("relationalOperator", _("Sign of the test"))
|
||||
.addParameter("expression", _("Value (m/s²)"))
|
||||
.getCodeExtraInformation()
|
||||
.setIncludeFile(
|
||||
"Extensions/DeviceSensors/devicesensortools.js"
|
||||
@@ -326,10 +326,10 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
"ActivateMotionListener",
|
||||
t("Activate motion sensor"),
|
||||
t("Activate the motion sensor. (remember to turn it off again)"),
|
||||
t("Activate the motion sensor."),
|
||||
t("Sensors/Motion"),
|
||||
_("Activate motion sensor"),
|
||||
_("Activate the motion sensor. (remember to turn it off again)"),
|
||||
_("Activate the motion sensor."),
|
||||
_("Sensors/Motion"),
|
||||
"JsPlatform/Extensions/motion_active24.png",
|
||||
"JsPlatform/Extensions/motion_active32.png"
|
||||
)
|
||||
@@ -342,10 +342,10 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
"DeactivateMotionListener",
|
||||
t("Deactivate motion sensor"),
|
||||
t("Deactivate the motion sensor."),
|
||||
t("Deactivate the motion sensor."),
|
||||
t("Sensors/Motion"),
|
||||
_("Deactivate motion sensor"),
|
||||
_("Deactivate the motion sensor."),
|
||||
_("Deactivate the motion sensor."),
|
||||
_("Sensors/Motion"),
|
||||
"JsPlatform/Extensions/motion_inactive24.png",
|
||||
"JsPlatform/Extensions/motion_inactive32.png"
|
||||
)
|
||||
@@ -358,9 +358,9 @@ module.exports = {
|
||||
extension
|
||||
.addExpression(
|
||||
"RotationAlpha",
|
||||
t("Alpha value"),
|
||||
t("Get the devices rotation Alpha"),
|
||||
t("Sensors/Motion")
|
||||
_("Alpha value"),
|
||||
_("Get the devices rotation Alpha"),
|
||||
_("Sensors/Motion")
|
||||
)
|
||||
.getCodeExtraInformation()
|
||||
.setIncludeFile(
|
||||
@@ -371,9 +371,9 @@ module.exports = {
|
||||
extension
|
||||
.addExpression(
|
||||
"RotationBeta",
|
||||
t("Beta value"),
|
||||
t("Get the devices rotation Beta"),
|
||||
t("Sensors/Motion")
|
||||
_("Beta value"),
|
||||
_("Get the devices rotation Beta"),
|
||||
_("Sensors/Motion")
|
||||
)
|
||||
.getCodeExtraInformation()
|
||||
.setIncludeFile(
|
||||
@@ -384,9 +384,9 @@ module.exports = {
|
||||
extension
|
||||
.addExpression(
|
||||
"RotationGamma",
|
||||
t("Gamma value"),
|
||||
t("Get the devices rotation Gamma"),
|
||||
t("Sensors/Motion")
|
||||
_("Gamma value"),
|
||||
_("Get the devices rotation Gamma"),
|
||||
_("Sensors/Motion")
|
||||
)
|
||||
.getCodeExtraInformation()
|
||||
.setIncludeFile(
|
||||
@@ -397,9 +397,9 @@ module.exports = {
|
||||
extension
|
||||
.addExpression(
|
||||
"AccelerationX",
|
||||
t("Acceleration X value"),
|
||||
t("Get the devices acceleration on the X-axis (m/s²)"),
|
||||
t("Sensors/Motion")
|
||||
_("Acceleration X value"),
|
||||
_("Get the devices acceleration on the X-axis (m/s²)"),
|
||||
_("Sensors/Motion")
|
||||
)
|
||||
.getCodeExtraInformation()
|
||||
.setIncludeFile(
|
||||
@@ -410,9 +410,9 @@ module.exports = {
|
||||
extension
|
||||
.addExpression(
|
||||
"AccelerationY",
|
||||
t("Acceleration Y value"),
|
||||
t("Get the devices acceleration on the Y-axis (m/s²)"),
|
||||
t("Sensors/Motion")
|
||||
_("Acceleration Y value"),
|
||||
_("Get the devices acceleration on the Y-axis (m/s²)"),
|
||||
_("Sensors/Motion")
|
||||
)
|
||||
.getCodeExtraInformation()
|
||||
.setIncludeFile(
|
||||
@@ -423,9 +423,9 @@ module.exports = {
|
||||
extension
|
||||
.addExpression(
|
||||
"AccelerationZ",
|
||||
t("Acceleration Z value"),
|
||||
t("Get the devices acceleration on the Z-axis (m/s²)"),
|
||||
t("Sensors/Motion")
|
||||
_("Acceleration Z value"),
|
||||
_("Get the devices acceleration on the Z-axis (m/s²)"),
|
||||
_("Sensors/Motion")
|
||||
)
|
||||
.getCodeExtraInformation()
|
||||
.setIncludeFile(
|
||||
|
@@ -11,12 +11,12 @@
|
||||
* More information on https://github.com/4ian/GDevelop/blob/master/newIDE/README-extensions.md
|
||||
*/
|
||||
module.exports = {
|
||||
createExtension: function(t, gd) {
|
||||
createExtension: function(_, gd) {
|
||||
const extension = new gd.PlatformExtension();
|
||||
extension.setExtensionInformation(
|
||||
"DeviceVibration",
|
||||
t("Device vibration"),
|
||||
t(
|
||||
_("Device vibration"),
|
||||
_(
|
||||
"Use the vibration of mobile devices."
|
||||
),
|
||||
"Matthias Meike",
|
||||
@@ -26,14 +26,14 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
"StartVibration",
|
||||
t("Vibrate"),
|
||||
t("Vibrate (Duration in ms)."),
|
||||
t("Start vibration for _PARAM0_ ms"),
|
||||
t("Vibration"),
|
||||
_("Vibrate"),
|
||||
_("Vibrate (Duration in ms)."),
|
||||
_("Start vibration for _PARAM0_ ms"),
|
||||
_("Vibration"),
|
||||
"JsPlatform/Extensions/vibration_start24.png",
|
||||
"JsPlatform/Extensions/vibration_start32.png"
|
||||
)
|
||||
.addParameter("expression", t("Duration"), "", false)
|
||||
.addParameter("expression", _("Duration"), "", false)
|
||||
.getCodeExtraInformation()
|
||||
.setIncludeFile(
|
||||
"Extensions/DeviceVibration/devicevibrationtools.js"
|
||||
@@ -43,14 +43,14 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
"StartVibrationPattern",
|
||||
t("Vibrate by pattern"),
|
||||
t("Vibrate (Duration in ms). You can add multiple comma separated values where every second value determins the silense inbetween two vibrations. This is a string value so use quotes."),
|
||||
t("Start vibration for _PARAM0_ ms"),
|
||||
t("Vibration"),
|
||||
_("Vibrate by pattern"),
|
||||
_("Vibrate (Duration in ms). You can add multiple comma separated values where every second value determins the silense inbetween two vibrations. This is a string value so use quotes."),
|
||||
_("Start vibration for _PARAM0_ ms"),
|
||||
_("Vibration"),
|
||||
"JsPlatform/Extensions/vibration_pattern_start24.png",
|
||||
"JsPlatform/Extensions/vibration_pattern_start32.png"
|
||||
)
|
||||
.addParameter("string", t("Intervals (for example \"500,100,200\""), "", false)
|
||||
.addParameter("string", _("Intervals (for example \"500,100,200\""), "", false)
|
||||
.getCodeExtraInformation()
|
||||
.setIncludeFile(
|
||||
"Extensions/DeviceVibration/devicevibrationtools.js"
|
||||
@@ -60,10 +60,10 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
"StopVibration",
|
||||
t("Stop vibration"),
|
||||
t("Stop the vibration"),
|
||||
t("Stop vibration"),
|
||||
t("Vibration"),
|
||||
_("Stop vibration"),
|
||||
_("Stop the vibration"),
|
||||
_("Stop vibration"),
|
||||
_("Vibration"),
|
||||
"JsPlatform/Extensions/vibration_stop24.png",
|
||||
"JsPlatform/Extensions/vibration_stop32.png"
|
||||
)
|
||||
|
@@ -36,7 +36,7 @@ void DeclareDraggableBehaviorExtension(gd::PlatformExtension& extension) {
|
||||
_("Being dragged"),
|
||||
_("Check if the object is being dragged"),
|
||||
_("_PARAM0_ is being dragged"),
|
||||
_(""),
|
||||
"",
|
||||
"CppPlatform/Extensions/draggableicon24.png",
|
||||
"CppPlatform/Extensions/draggableicon16.png")
|
||||
|
||||
|
@@ -11,7 +11,7 @@
|
||||
* More information on https://github.com/4ian/GDevelop/blob/master/newIDE/README-extensions.md
|
||||
*/
|
||||
module.exports = {
|
||||
createExtension: function(t, gd) {
|
||||
createExtension: function(_, gd) {
|
||||
const extension = new gd.PlatformExtension();
|
||||
extension.setExtensionInformation(
|
||||
"MyDummyExtension",
|
||||
@@ -25,17 +25,17 @@ module.exports = {
|
||||
extension
|
||||
.addCondition(
|
||||
"MyNewCondition",
|
||||
t("Dummy condition example"),
|
||||
t(
|
||||
_("Dummy condition example"),
|
||||
_(
|
||||
"This is an example of a condition displayed in the events sheet. Will return true if the number is less than 10 and the length of the text is less than 5."
|
||||
),
|
||||
t("Call the example condition with _PARAM0_ and _PARAM1_"),
|
||||
t("Dummy Extension"),
|
||||
_("Call the example condition with _PARAM0_ and _PARAM1_"),
|
||||
_("Dummy Extension"),
|
||||
"res/conditions/camera24.png",
|
||||
"res/conditions/camera.png"
|
||||
)
|
||||
.addParameter("expression", t("Number 1"), "", false)
|
||||
.addParameter("string", t("Text 1"), "", false)
|
||||
.addParameter("expression", _("Number 1"), "", false)
|
||||
.addParameter("string", _("Text 1"), "", false)
|
||||
.getCodeExtraInformation()
|
||||
.setIncludeFile(
|
||||
"Extensions/ExampleJsExtension/examplejsextensiontools.js"
|
||||
@@ -45,21 +45,21 @@ module.exports = {
|
||||
extension
|
||||
.addExpression(
|
||||
"DummyExpression",
|
||||
t("Dummy expression example"),
|
||||
t("This is an example of an expression"),
|
||||
t("Dummy Extension"),
|
||||
_("Dummy expression example"),
|
||||
_("This is an example of an expression"),
|
||||
_("Dummy Extension"),
|
||||
"res/actions/camera.png"
|
||||
)
|
||||
.addParameter("expression", t("Maximum"), "", false)
|
||||
.addParameter("expression", _("Maximum"), "", false)
|
||||
.getCodeExtraInformation()
|
||||
.setFunctionName("gdjs.random");
|
||||
|
||||
extension
|
||||
.addStrExpression(
|
||||
"DummyStrExpression",
|
||||
t("Dummy string expression example"),
|
||||
t("This is an example of an expression returning a string"),
|
||||
t("Dummy Extension"),
|
||||
_("Dummy string expression example"),
|
||||
_("This is an example of an expression returning a string"),
|
||||
_("Dummy Extension"),
|
||||
"res/actions/camera.png"
|
||||
)
|
||||
.getCodeExtraInformation()
|
||||
@@ -115,9 +115,9 @@ module.exports = {
|
||||
extension
|
||||
.addBehavior(
|
||||
"DummyBehavior",
|
||||
t("Dummy behavior for testing"),
|
||||
_("Dummy behavior for testing"),
|
||||
"DummyBehavior",
|
||||
t("This dummy behavior does nothing"),
|
||||
_("This dummy behavior does nothing"),
|
||||
"",
|
||||
"CppPlatform/Extensions/topdownmovementicon.png",
|
||||
"DummyBehavior",
|
||||
@@ -194,9 +194,9 @@ module.exports = {
|
||||
extension
|
||||
.addBehavior(
|
||||
"DummyBehaviorWithSharedData",
|
||||
t("Dummy behavior with shared data for testing"),
|
||||
_("Dummy behavior with shared data for testing"),
|
||||
"DummyBehaviorWithSharedData",
|
||||
t("This dummy behavior uses shared data and does nothing"),
|
||||
_("This dummy behavior uses shared data and does nothing"),
|
||||
"",
|
||||
"CppPlatform/Extensions/topdownmovementicon.png",
|
||||
"DummyBehaviorWithSharedData",
|
||||
@@ -314,8 +314,8 @@ module.exports = {
|
||||
const object = extension
|
||||
.addObject(
|
||||
"DummyObject",
|
||||
t("Dummy object for testing"),
|
||||
t("This dummy object does nothing"),
|
||||
_("Dummy object for testing"),
|
||||
_("This dummy object does nothing"),
|
||||
"CppPlatform/Extensions/topdownmovementicon.png",
|
||||
dummyObject
|
||||
)
|
||||
@@ -421,7 +421,7 @@ module.exports = {
|
||||
);
|
||||
|
||||
//Setup the PIXI object:
|
||||
this._pixiObject = new PIXI.Text("This is a dummy object", {
|
||||
this._pixiObject = new PIXI.Tex_("This is a dummy object", {
|
||||
align: "left"
|
||||
});
|
||||
this._pixiObject.anchor.x = 0.5;
|
||||
@@ -451,7 +451,7 @@ module.exports = {
|
||||
// Read a property from the object
|
||||
const property1Value = this._associatedObject
|
||||
.getProperties(this.project)
|
||||
.get("My first property")
|
||||
.ge_("My first property")
|
||||
.getValue();
|
||||
this._pixiObject.text = property1Value;
|
||||
|
||||
|
@@ -11,13 +11,13 @@
|
||||
* More information on https://github.com/4ian/GDevelop/blob/master/newIDE/README-extensions.md
|
||||
*/
|
||||
module.exports = {
|
||||
createExtension: function(t, gd) {
|
||||
createExtension: function(_, gd) {
|
||||
const extension = new gd.PlatformExtension();
|
||||
extension
|
||||
.setExtensionInformation(
|
||||
"FacebookInstantGames",
|
||||
t("Facebook Instant Games"),
|
||||
t(
|
||||
_("Facebook Instant Games"),
|
||||
_(
|
||||
"Allow your game to send scores and interact with Facebook Instant Games"
|
||||
),
|
||||
"Florian Rival",
|
||||
@@ -28,14 +28,14 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
"SavePlayerData",
|
||||
t("Save player data"),
|
||||
t(
|
||||
_("Save player data"),
|
||||
_(
|
||||
"Save the content of the given variable in the player data, stored on Facebook Instant Games servers"
|
||||
),
|
||||
t(
|
||||
_(
|
||||
"Save the content of _PARAM1_ in key _PARAM0_ of player data (store success message in _PARAM2_ or error in _PARAM3_)"
|
||||
),
|
||||
t("Facebook Instant Games/Player data"),
|
||||
_("Facebook Instant Games/Player data"),
|
||||
"JsPlatform/Extensions/facebookicon24.png",
|
||||
"JsPlatform/Extensions/facebookicon16.png"
|
||||
)
|
||||
@@ -43,13 +43,13 @@ module.exports = {
|
||||
.addParameter("scenevar", "Variable with the content to save", "", false)
|
||||
.addParameter(
|
||||
"scenevar",
|
||||
t("Variable where to store the success message (optional)"),
|
||||
_("Variable where to store the success message (optional)"),
|
||||
"",
|
||||
true
|
||||
)
|
||||
.addParameter(
|
||||
"scenevar",
|
||||
t("Variable where to error message (optional, if an error occurs)"),
|
||||
_("Variable where to error message (optional, if an error occurs)"),
|
||||
"",
|
||||
true
|
||||
)
|
||||
@@ -62,25 +62,25 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
"LoadPlayerData",
|
||||
t("Load player data"),
|
||||
t("Load the player data with the given key in a variable"),
|
||||
t(
|
||||
_("Load player data"),
|
||||
_("Load the player data with the given key in a variable"),
|
||||
_(
|
||||
"Load player data with key _PARAM0_ in _PARAM1_ (or error in _PARAM2_)"
|
||||
),
|
||||
t("Facebook Instant Games/Player data"),
|
||||
_("Facebook Instant Games/Player data"),
|
||||
"JsPlatform/Extensions/facebookicon24.png",
|
||||
"JsPlatform/Extensions/facebookicon16.png"
|
||||
)
|
||||
.addParameter("string", t('Data key name (e.g: "Lives")'), "", false)
|
||||
.addParameter("string", _('Data key name (e.g: "Lives")'), "", false)
|
||||
.addParameter(
|
||||
"scenevar",
|
||||
t("Variable where to store loaded data"),
|
||||
_("Variable where to store loaded data"),
|
||||
"",
|
||||
false
|
||||
)
|
||||
.addParameter(
|
||||
"scenevar",
|
||||
t("Variable where to error message (optional, if an error occurs)"),
|
||||
_("Variable where to error message (optional, if an error occurs)"),
|
||||
"",
|
||||
true
|
||||
)
|
||||
@@ -93,14 +93,14 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
"SavePlayerScore",
|
||||
t("Save player score"),
|
||||
t(
|
||||
_("Save player score"),
|
||||
_(
|
||||
"Save the score, and optionally the content of the given variable in the player score, for the given metadata."
|
||||
),
|
||||
t(
|
||||
_(
|
||||
"In leaderboard _PARAM0_, save score _PARAM1_ for the player and extra data from _PARAM2_ (store success message in _PARAM3_ or error in _PARAM4_)"
|
||||
),
|
||||
t("Facebook Instant Games/Leaderboards"),
|
||||
_("Facebook Instant Games/Leaderboards"),
|
||||
"JsPlatform/Extensions/facebookicon24.png",
|
||||
"JsPlatform/Extensions/facebookicon16.png"
|
||||
)
|
||||
@@ -113,19 +113,19 @@ module.exports = {
|
||||
.addParameter("expression", "Score to register for the player", "", false)
|
||||
.addParameter(
|
||||
"scenevar",
|
||||
t("Optional variable with metadata to save"),
|
||||
_("Optional variable with metadata to save"),
|
||||
"",
|
||||
true
|
||||
)
|
||||
.addParameter(
|
||||
"scenevar",
|
||||
t("Variable where to store the success message (optional)"),
|
||||
_("Variable where to store the success message (optional)"),
|
||||
"",
|
||||
true
|
||||
)
|
||||
.addParameter(
|
||||
"scenevar",
|
||||
t("Variable where to error message (optional, if an error occurs)"),
|
||||
_("Variable where to error message (optional, if an error occurs)"),
|
||||
"",
|
||||
true
|
||||
)
|
||||
@@ -138,42 +138,42 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
"LoadPlayerEntry",
|
||||
t("Load player entry"),
|
||||
t("Load the player entry in the given leaderboard"),
|
||||
t(
|
||||
_("Load player entry"),
|
||||
_("Load the player entry in the given leaderboard"),
|
||||
_(
|
||||
"Load player entry from leaderboard _PARAM0_. Set rank in _PARAM1_, score in _PARAM2_ (extra data if any in _PARAM3_ and error in _PARAM4_)"
|
||||
),
|
||||
t("Facebook Instant Games/Leaderboards"),
|
||||
_("Facebook Instant Games/Leaderboards"),
|
||||
"JsPlatform/Extensions/facebookicon24.png",
|
||||
"JsPlatform/Extensions/facebookicon16.png"
|
||||
)
|
||||
.addParameter(
|
||||
"string",
|
||||
t('Leaderboard name (e.g: "PlayersBestTimes")'),
|
||||
_('Leaderboard name (e.g: "PlayersBestTimes")'),
|
||||
"",
|
||||
false
|
||||
)
|
||||
.addParameter(
|
||||
"scenevar",
|
||||
t("Variable where to store the player rank (of -1 if not ranked)"),
|
||||
_("Variable where to store the player rank (of -1 if not ranked)"),
|
||||
"",
|
||||
true
|
||||
)
|
||||
.addParameter(
|
||||
"scenevar",
|
||||
t("Variable where to store the player score (of -1 if no score)"),
|
||||
_("Variable where to store the player score (of -1 if no score)"),
|
||||
"",
|
||||
true
|
||||
)
|
||||
.addParameter(
|
||||
"scenevar",
|
||||
t("Variable where to store extra data (if any)"),
|
||||
_("Variable where to store extra data (if any)"),
|
||||
"",
|
||||
true
|
||||
)
|
||||
.addParameter(
|
||||
"scenevar",
|
||||
t("Variable where to error message (optional, if an error occurs)"),
|
||||
_("Variable where to error message (optional, if an error occurs)"),
|
||||
"",
|
||||
true
|
||||
)
|
||||
@@ -186,10 +186,10 @@ module.exports = {
|
||||
extension
|
||||
.addCondition(
|
||||
"AreAdsSupported",
|
||||
t("Check if ads are supported"),
|
||||
t("Check if showind ads is supported on this device (only mobile phones can show ads)"),
|
||||
t("Ads can be shown on this device"),
|
||||
t("Facebook Instant Games/Ads"),
|
||||
_("Check if ads are supported"),
|
||||
_("Check if showind ads is supported on this device (only mobile phones can show ads)"),
|
||||
_("Ads can be shown on this device"),
|
||||
_("Facebook Instant Games/Ads"),
|
||||
"JsPlatform/Extensions/facebookicon24.png",
|
||||
"JsPlatform/Extensions/facebookicon16.png"
|
||||
)
|
||||
@@ -202,10 +202,10 @@ module.exports = {
|
||||
extension
|
||||
.addCondition(
|
||||
"IsInterstitialAdReady",
|
||||
t("Is the interstitial ad ready"),
|
||||
t("Check if the interstitial ad requested from Facebook is loaded and ready to be shown."),
|
||||
t("The interstitial ad is loaded and ready to be shown"),
|
||||
t("Facebook Instant Games/Ads"),
|
||||
_("Is the interstitial ad ready"),
|
||||
_("Check if the interstitial ad requested from Facebook is loaded and ready to be shown."),
|
||||
_("The interstitial ad is loaded and ready to be shown"),
|
||||
_("Facebook Instant Games/Ads"),
|
||||
"JsPlatform/Extensions/facebookicon24.png",
|
||||
"JsPlatform/Extensions/facebookicon16.png"
|
||||
)
|
||||
@@ -218,22 +218,22 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
"LoadInterstitialAd",
|
||||
t("Load and prepare an interstitial ad"),
|
||||
t("Request and load an interstitial ad from Facebook, so that it is ready to be shown."),
|
||||
t("Request and load an interstitial ad from Facebook (ad placement id: _PARAM0_, error in _PARAM1_)"),
|
||||
t("Facebook Instant Games/Ads"),
|
||||
_("Load and prepare an interstitial ad"),
|
||||
_("Request and load an interstitial ad from Facebook, so that it is ready to be shown."),
|
||||
_("Request and load an interstitial ad from Facebook (ad placement id: _PARAM0_, error in _PARAM1_)"),
|
||||
_("Facebook Instant Games/Ads"),
|
||||
"JsPlatform/Extensions/facebookicon24.png",
|
||||
"JsPlatform/Extensions/facebookicon16.png"
|
||||
)
|
||||
.addParameter(
|
||||
"string",
|
||||
t("The Ad Placement id (can be found while setting up the ad on Facebook)"),
|
||||
_("The Ad Placement id (can be found while setting up the ad on Facebook)"),
|
||||
"",
|
||||
false
|
||||
)
|
||||
.addParameter(
|
||||
"scenevar",
|
||||
t("Variable where to error message (optional, if an error occurs)"),
|
||||
_("Variable where to error message (optional, if an error occurs)"),
|
||||
"",
|
||||
true
|
||||
)
|
||||
@@ -246,16 +246,16 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
"ShowInterstitialAd",
|
||||
t("Show the loaded interstitial ad"),
|
||||
t("Show the interstitial ad previously loaded in memory. This won't work if you did not load the interstitial before."),
|
||||
t("Show the interstitial ad previously loaded in memory (if any error, store it in _PARAM0_)"),
|
||||
t("Facebook Instant Games/Ads"),
|
||||
_("Show the loaded interstitial ad"),
|
||||
_("Show the interstitial ad previously loaded in memory. This won't work if you did not load the interstitial before."),
|
||||
_("Show the interstitial ad previously loaded in memory (if any error, store it in _PARAM0_)"),
|
||||
_("Facebook Instant Games/Ads"),
|
||||
"JsPlatform/Extensions/facebookicon24.png",
|
||||
"JsPlatform/Extensions/facebookicon16.png"
|
||||
)
|
||||
.addParameter(
|
||||
"scenevar",
|
||||
t("Variable where to error message (optional, if an error occurs)"),
|
||||
_("Variable where to error message (optional, if an error occurs)"),
|
||||
"",
|
||||
true
|
||||
)
|
||||
@@ -268,10 +268,10 @@ module.exports = {
|
||||
extension
|
||||
.addCondition(
|
||||
"IsRewardedVideoReady",
|
||||
t("Is the rewarded video ready"),
|
||||
t("Check if the rewarded video requested from Facebook is loaded and ready to be shown."),
|
||||
t("The rewarded video is loaded and ready to be shown"),
|
||||
t("Facebook Instant Games/Ads"),
|
||||
_("Is the rewarded video ready"),
|
||||
_("Check if the rewarded video requested from Facebook is loaded and ready to be shown."),
|
||||
_("The rewarded video is loaded and ready to be shown"),
|
||||
_("Facebook Instant Games/Ads"),
|
||||
"JsPlatform/Extensions/facebookicon24.png",
|
||||
"JsPlatform/Extensions/facebookicon16.png"
|
||||
)
|
||||
@@ -284,22 +284,22 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
"LoadRewardedVideo",
|
||||
t("Load and prepare a rewarded video"),
|
||||
t("Request and load a rewarded video from Facebook, so that it is ready to be shown."),
|
||||
t("Request and load a rewarded video from Facebook (ad placement id: _PARAM0_, error in _PARAM1_)"),
|
||||
t("Facebook Instant Games/Ads"),
|
||||
_("Load and prepare a rewarded video"),
|
||||
_("Request and load a rewarded video from Facebook, so that it is ready to be shown."),
|
||||
_("Request and load a rewarded video from Facebook (ad placement id: _PARAM0_, error in _PARAM1_)"),
|
||||
_("Facebook Instant Games/Ads"),
|
||||
"JsPlatform/Extensions/facebookicon24.png",
|
||||
"JsPlatform/Extensions/facebookicon16.png"
|
||||
)
|
||||
.addParameter(
|
||||
"string",
|
||||
t("The Ad Placement id (can be found while setting up the ad on Facebook)"),
|
||||
_("The Ad Placement id (can be found while setting up the ad on Facebook)"),
|
||||
"",
|
||||
false
|
||||
)
|
||||
.addParameter(
|
||||
"scenevar",
|
||||
t("Variable where to error message (optional, if an error occurs)"),
|
||||
_("Variable where to error message (optional, if an error occurs)"),
|
||||
"",
|
||||
true
|
||||
)
|
||||
@@ -312,16 +312,16 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
"ShowRewardedVideo",
|
||||
t("Show the loaded rewarded video"),
|
||||
t("Show the rewarded video previously loaded in memory. This won't work if you did not load the video before."),
|
||||
t("Show the rewarded video previously loaded in memory (if any error, store it in _PARAM0_)"),
|
||||
t("Facebook Instant Games/Ads"),
|
||||
_("Show the loaded rewarded video"),
|
||||
_("Show the rewarded video previously loaded in memory. This won't work if you did not load the video before."),
|
||||
_("Show the rewarded video previously loaded in memory (if any error, store it in _PARAM0_)"),
|
||||
_("Facebook Instant Games/Ads"),
|
||||
"JsPlatform/Extensions/facebookicon24.png",
|
||||
"JsPlatform/Extensions/facebookicon16.png"
|
||||
)
|
||||
.addParameter(
|
||||
"scenevar",
|
||||
t("Variable where to error message (optional, if an error occurs)"),
|
||||
_("Variable where to error message (optional, if an error occurs)"),
|
||||
"",
|
||||
true
|
||||
)
|
||||
@@ -334,9 +334,9 @@ module.exports = {
|
||||
extension
|
||||
.addStrExpression(
|
||||
"PlayerId",
|
||||
t("Player identifier"),
|
||||
t("Get the player unique identifier"),
|
||||
t("Facebook Instant Games"),
|
||||
_("Player identifier"),
|
||||
_("Get the player unique identifier"),
|
||||
_("Facebook Instant Games"),
|
||||
"JsPlatform/Extensions/facebookicon16.png"
|
||||
)
|
||||
.getCodeExtraInformation()
|
||||
@@ -348,9 +348,9 @@ module.exports = {
|
||||
extension
|
||||
.addStrExpression(
|
||||
"PlayerName",
|
||||
t("Player name"),
|
||||
t("Get the player name"),
|
||||
t("Facebook Instant Games"),
|
||||
_("Player name"),
|
||||
_("Get the player name"),
|
||||
_("Facebook Instant Games"),
|
||||
"JsPlatform/Extensions/facebookicon16.png"
|
||||
)
|
||||
.getCodeExtraInformation()
|
||||
|
@@ -11,13 +11,13 @@
|
||||
* More information on https://github.com/4ian/GDevelop/blob/master/newIDE/README-extensions.md
|
||||
*/
|
||||
module.exports = {
|
||||
createExtension: function(t, gd) {
|
||||
createExtension: function(_, gd) {
|
||||
const extension = new gd.PlatformExtension();
|
||||
extension
|
||||
.setExtensionInformation(
|
||||
'FileSystem',
|
||||
t('Filesystem'),
|
||||
t('Access the filesystem of the operating system.'),
|
||||
_('Filesystem'),
|
||||
_('Access the filesystem of the operating system.'),
|
||||
'Matthias Meike',
|
||||
'Open source (MIT License)'
|
||||
)
|
||||
@@ -26,14 +26,14 @@ module.exports = {
|
||||
extension
|
||||
.addCondition(
|
||||
'PathExists',
|
||||
t('File or directory exists'),
|
||||
t('Check if the file or directory exists.'),
|
||||
t('The path _PARAM0_ exists'),
|
||||
t('Filesystem/Windows, Linux, MacOS'),
|
||||
_('File or directory exists'),
|
||||
_('Check if the file or directory exists.'),
|
||||
_('The path _PARAM0_ exists'),
|
||||
_('Filesystem/Windows, Linux, MacOS'),
|
||||
'JsPlatform/Extensions/filesystem_path_exists24.png',
|
||||
'JsPlatform/Extensions/filesystem_path_exists32.png'
|
||||
)
|
||||
.addParameter('string', t('Path to file or directory'), '', false)
|
||||
.addParameter('string', _('Path to file or directory'), '', false)
|
||||
.getCodeExtraInformation()
|
||||
.setIncludeFile('Extensions/FileSystem/filesystemtools.js')
|
||||
.setFunctionName('gdjs.fileSystem.pathExists');
|
||||
@@ -41,17 +41,17 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
'MakeDirectory',
|
||||
t('Create a directory'),
|
||||
t('Create a new directory at the specified path.'),
|
||||
t('Create directory _PARAM0_'),
|
||||
t('Filesystem/Windows, Linux, MacOS'),
|
||||
_('Create a directory'),
|
||||
_('Create a new directory at the specified path.'),
|
||||
_('Create directory _PARAM0_'),
|
||||
_('Filesystem/Windows, Linux, MacOS'),
|
||||
'JsPlatform/Extensions/filesystem_create_folder24.png',
|
||||
'JsPlatform/Extensions/filesystem_create_folder32.png'
|
||||
)
|
||||
.addParameter('string', t('Directory'), '', false)
|
||||
.addParameter('string', _('Directory'), '', false)
|
||||
.addParameter(
|
||||
'scenevar',
|
||||
t(
|
||||
_(
|
||||
"(Optional) Variable to store the result. 'ok': task was successful, 'error': an error occured."
|
||||
),
|
||||
'',
|
||||
@@ -64,20 +64,20 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
'SaveStringToFileSync',
|
||||
t('Save a text into a file'),
|
||||
t(
|
||||
_('Save a text into a file'),
|
||||
_(
|
||||
'Save a text into a file. Only use this on small files to avoid any lag or freeze during the the game execution.'
|
||||
),
|
||||
t('Save _PARAM0_ into file _PARAM1_'),
|
||||
t('Filesystem/Windows, Linux, MacOS'),
|
||||
_('Save _PARAM0_ into file _PARAM1_'),
|
||||
_('Filesystem/Windows, Linux, MacOS'),
|
||||
'JsPlatform/Extensions/filesystem_save_file24.png',
|
||||
'JsPlatform/Extensions/filesystem_save_file32.png'
|
||||
)
|
||||
.addParameter('string', t('String (text)'), '', false)
|
||||
.addParameter('string', t('Save path'), '', false)
|
||||
.addParameter('string', _('String (text)'), '', false)
|
||||
.addParameter('string', _('Save path'), '', false)
|
||||
.addParameter(
|
||||
'scenevar',
|
||||
t(
|
||||
_(
|
||||
"(Optional) Variable to store the result. 'ok': task was successful, 'error': an error occured."
|
||||
),
|
||||
'',
|
||||
@@ -90,20 +90,20 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
'SaveStringToFileAsync',
|
||||
t('Save a text into a file (Async)'),
|
||||
t(
|
||||
_('Save a text into a file (Async)'),
|
||||
_(
|
||||
"Save a text into a file asynchronously. Use this for large files to avoid any lag or freeze during game execution. The 'result' variable gets updated when the operation has finished."
|
||||
),
|
||||
t('Save _PARAM0_ into file _PARAM1_'),
|
||||
t('Filesystem/Windows, Linux, MacOS/Asynchronous'),
|
||||
_('Save _PARAM0_ into file _PARAM1_'),
|
||||
_('Filesystem/Windows, Linux, MacOS/Asynchronous'),
|
||||
'JsPlatform/Extensions/filesystem_save_file24.png',
|
||||
'JsPlatform/Extensions/filesystem_save_file32.png'
|
||||
)
|
||||
.addParameter('string', t('String (text)'), '', false)
|
||||
.addParameter('string', t('Save path'), '', false)
|
||||
.addParameter('string', _('String (text)'), '', false)
|
||||
.addParameter('string', _('Save path'), '', false)
|
||||
.addParameter(
|
||||
'scenevar',
|
||||
t(
|
||||
_(
|
||||
"(Optional) Variable to store the result. 'ok': task was successful, 'error': an error occured."
|
||||
),
|
||||
'',
|
||||
@@ -116,20 +116,20 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
'SaveVariableToJSONFileSync',
|
||||
t('Save a scene variable into a JSON file'),
|
||||
t(
|
||||
_('Save a scene variable into a JSON file'),
|
||||
_(
|
||||
'Save a scene variable (including, for structure, all the children) into a file in JSON format. Only use this on small files to avoid any lag or freeze during the the game execution.'
|
||||
),
|
||||
t('Save scene variable _PARAM0_ into file PARAM1 as JSON'),
|
||||
t('Filesystem/Windows, Linux, MacOS'),
|
||||
_('Save scene variable _PARAM0_ into file PARAM1 as JSON'),
|
||||
_('Filesystem/Windows, Linux, MacOS'),
|
||||
'JsPlatform/Extensions/filesystem_save_file24.png',
|
||||
'JsPlatform/Extensions/filesystem_save_file32.png'
|
||||
)
|
||||
.addParameter('scenevar', t('Scene variable'), '', false)
|
||||
.addParameter('string', t('Save path'), '', false)
|
||||
.addParameter('scenevar', _('Scene variable'), '', false)
|
||||
.addParameter('string', _('Save path'), '', false)
|
||||
.addParameter(
|
||||
'scenevar',
|
||||
t(
|
||||
_(
|
||||
"(Optional) Variable to store the result. 'ok': task was successful, 'error': an error occured."
|
||||
),
|
||||
'',
|
||||
@@ -142,20 +142,20 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
'SaveVariableToJSONFileAsync',
|
||||
t('Save a scene variable into a JSON file (Async)'),
|
||||
t(
|
||||
_('Save a scene variable into a JSON file (Async)'),
|
||||
_(
|
||||
"Save the scene variable (including, for structures, all the children) into a file in JSON format, asynchronously. Use this for large files to avoid any lag or freeze during game execution. The 'result' variable gets updated when the operation has finished."
|
||||
),
|
||||
t('Save scene variable _PARAM0_ into file PARAM1 as JSON'),
|
||||
t('Filesystem/Windows, Linux, MacOS/Asynchronous'),
|
||||
_('Save scene variable _PARAM0_ into file PARAM1 as JSON'),
|
||||
_('Filesystem/Windows, Linux, MacOS/Asynchronous'),
|
||||
'JsPlatform/Extensions/filesystem_save_file24.png',
|
||||
'JsPlatform/Extensions/filesystem_save_file32.png'
|
||||
)
|
||||
.addParameter('scenevar', t('Scene variable'), '', false)
|
||||
.addParameter('string', t('Save path'), '', false)
|
||||
.addParameter('scenevar', _('Scene variable'), '', false)
|
||||
.addParameter('string', _('Save path'), '', false)
|
||||
.addParameter(
|
||||
'scenevar',
|
||||
t(
|
||||
_(
|
||||
"(Optional) Variable to store the result. 'ok': task was successful, 'error': an error occured."
|
||||
),
|
||||
'',
|
||||
@@ -168,20 +168,20 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
'LoadStringFromFileAsync',
|
||||
t('Load a text from a file (Async)'),
|
||||
t(
|
||||
_('Load a text from a file (Async)'),
|
||||
_(
|
||||
"Load a text from a file, asynchronously. Use this for large files to avoid any lag or freeze during game execution. The content of the file will be available in the scene variable after a small delay (usually a few milliseconds). The 'result' variable gets updated when the operation has finished."
|
||||
),
|
||||
t('Load text from _PARAM1_ into scene variable _PARAM0_ (Async)'),
|
||||
t('Filesystem/Windows, Linux, MacOS/Asynchronous'),
|
||||
_('Load text from _PARAM1_ into scene variable _PARAM0_ (Async)'),
|
||||
_('Filesystem/Windows, Linux, MacOS/Asynchronous'),
|
||||
'JsPlatform/Extensions/filesystem_load_file24.png',
|
||||
'JsPlatform/Extensions/filesystem_load_file32.png'
|
||||
)
|
||||
.addParameter('scenevar', t('Scene variable'), '', false)
|
||||
.addParameter('string', t('Load path'), '', false)
|
||||
.addParameter('scenevar', _('Scene variable'), '', false)
|
||||
.addParameter('string', _('Load path'), '', false)
|
||||
.addParameter(
|
||||
'scenevar',
|
||||
t(
|
||||
_(
|
||||
"(Optional) Variable to store the result. 'ok': task was successful, 'error': an error occured."
|
||||
),
|
||||
'',
|
||||
@@ -194,20 +194,20 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
'LoadStringFromFileSync',
|
||||
t('Load a text from a file'),
|
||||
t(
|
||||
_('Load a text from a file'),
|
||||
_(
|
||||
'Load a text from a file. Only use this on small files to avoid any lag or freeze during the the game execution.'
|
||||
),
|
||||
t('Load text from _PARAM1_ into scene variable _PARAM0_'),
|
||||
t('Filesystem/Windows, Linux, MacOS'),
|
||||
_('Load text from _PARAM1_ into scene variable _PARAM0_'),
|
||||
_('Filesystem/Windows, Linux, MacOS'),
|
||||
'JsPlatform/Extensions/filesystem_load_file24.png',
|
||||
'JsPlatform/Extensions/filesystem_load_file32.png'
|
||||
)
|
||||
.addParameter('scenevar', t('Scene variable'), '', false)
|
||||
.addParameter('string', t('Load path'), '', false)
|
||||
.addParameter('scenevar', _('Scene variable'), '', false)
|
||||
.addParameter('string', _('Load path'), '', false)
|
||||
.addParameter(
|
||||
'scenevar',
|
||||
t(
|
||||
_(
|
||||
"(Optional) Variable to store the result. 'ok': task was successful, 'error': an error occured."
|
||||
),
|
||||
'',
|
||||
@@ -220,20 +220,20 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
'LoadVariableFromJSONFileSync',
|
||||
t('Load a scene variable from a JSON file'),
|
||||
t(
|
||||
_('Load a scene variable from a JSON file'),
|
||||
_(
|
||||
'Load a JSON formatted text from a file and convert it to a scene variable (potentially a structure variable with children). Only use this on small files to avoid any lag or freeze during the the game execution.'
|
||||
),
|
||||
t('Load JSON from _PARAM1_ into scene variable _PARAM0_'),
|
||||
t('Filesystem/Windows, Linux, MacOS'),
|
||||
_('Load JSON from _PARAM1_ into scene variable _PARAM0_'),
|
||||
_('Filesystem/Windows, Linux, MacOS'),
|
||||
'JsPlatform/Extensions/filesystem_save_file24.png',
|
||||
'JsPlatform/Extensions/filesystem_save_file32.png'
|
||||
)
|
||||
.addParameter('scenevar', t('Scene variable'), '', false)
|
||||
.addParameter('string', t('Load path'), '', false)
|
||||
.addParameter('scenevar', _('Scene variable'), '', false)
|
||||
.addParameter('string', _('Load path'), '', false)
|
||||
.addParameter(
|
||||
'scenevar',
|
||||
t(
|
||||
_(
|
||||
"(Optional) Variable to store the result. 'ok': task was successful, 'error': an error occured."
|
||||
),
|
||||
'',
|
||||
@@ -246,20 +246,20 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
'LoadVariableFromJSONFileAsync',
|
||||
t('Load a scene variable from a JSON file (Async)'),
|
||||
t(
|
||||
_('Load a scene variable from a JSON file (Async)'),
|
||||
_(
|
||||
"Load a JSON formatted text from a file and convert it to a scene variable (potentially a structure variable with children), asynchronously. Use this for large files to avoid any lag or freeze during game execution. The content of the file will be available as a scene variable after a small delay (usually a few milliseconds). The 'result' variable gets updated when the operation has finished."
|
||||
),
|
||||
t('Load JSON from _PARAM1_ into scene variable _PARAM0_'),
|
||||
t('Filesystem/Windows, Linux, MacOS/Asynchronous'),
|
||||
_('Load JSON from _PARAM1_ into scene variable _PARAM0_'),
|
||||
_('Filesystem/Windows, Linux, MacOS/Asynchronous'),
|
||||
'JsPlatform/Extensions/filesystem_save_file24.png',
|
||||
'JsPlatform/Extensions/filesystem_save_file32.png'
|
||||
)
|
||||
.addParameter('scenevar', t('Scene variable'), '', false)
|
||||
.addParameter('string', t('Load path'), '', false)
|
||||
.addParameter('scenevar', _('Scene variable'), '', false)
|
||||
.addParameter('string', _('Load path'), '', false)
|
||||
.addParameter(
|
||||
'scenevar',
|
||||
t(
|
||||
_(
|
||||
"(Optional) Variable to store the result. 'ok': task was successful, 'error': an error occured."
|
||||
),
|
||||
'',
|
||||
@@ -272,17 +272,17 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
'DeleteFile',
|
||||
t('Delete a file'),
|
||||
t('Delete a file from the filesystem.'),
|
||||
t('Delete the file _PARAM0_'),
|
||||
t('Filesystem/Windows, Linux, MacOS'),
|
||||
_('Delete a file'),
|
||||
_('Delete a file from the filesystem.'),
|
||||
_('Delete the file _PARAM0_'),
|
||||
_('Filesystem/Windows, Linux, MacOS'),
|
||||
'JsPlatform/Extensions/filesystem_delete_file24.png',
|
||||
'JsPlatform/Extensions/filesystem_delete_file32.png'
|
||||
)
|
||||
.addParameter('string', t('File path'), '', false)
|
||||
.addParameter('string', _('File path'), '', false)
|
||||
.addParameter(
|
||||
'scenevar',
|
||||
t(
|
||||
_(
|
||||
"(Optional) Variable to store the result. 'ok': task was successful, 'error': an error occured."
|
||||
),
|
||||
'',
|
||||
@@ -295,17 +295,17 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
'DeleteFileAsync',
|
||||
t('Delete a file (Async)'),
|
||||
t('Delete a file from the filesystem asyncrounouse.'),
|
||||
t('Delete the file _PARAM0_'),
|
||||
t('Filesystem/Windows, Linux, MacOS/Asynchronous'),
|
||||
_('Delete a file (Async)'),
|
||||
_('Delete a file from the filesystem asyncrounouse.'),
|
||||
_('Delete the file _PARAM0_'),
|
||||
_('Filesystem/Windows, Linux, MacOS/Asynchronous'),
|
||||
'JsPlatform/Extensions/filesystem_delete_file24.png',
|
||||
'JsPlatform/Extensions/filesystem_delete_file32.png'
|
||||
)
|
||||
.addParameter('string', t('File path'), '', false)
|
||||
.addParameter('string', _('File path'), '', false)
|
||||
.addParameter(
|
||||
'scenevar',
|
||||
t(
|
||||
_(
|
||||
"(Optional) Variable to store the result. 'ok': task was successful, 'error': an error occured."
|
||||
),
|
||||
'',
|
||||
@@ -318,9 +318,9 @@ module.exports = {
|
||||
extension
|
||||
.addStrExpression(
|
||||
'DesktopPath',
|
||||
t('Desktop folder'),
|
||||
t('Get the path to the desktop folder.'),
|
||||
t('Filesystem/Windows, Linux, MacOS'),
|
||||
_('Desktop folder'),
|
||||
_('Get the path to the desktop folder.'),
|
||||
_('Filesystem/Windows, Linux, MacOS'),
|
||||
'JsPlatform/Extensions/filesystem_folder24.png',
|
||||
'JsPlatform/Extensions/filesystem_folder32.png'
|
||||
)
|
||||
@@ -332,9 +332,9 @@ module.exports = {
|
||||
extension
|
||||
.addStrExpression(
|
||||
'DocumentsPath',
|
||||
t('Documents folder'),
|
||||
t('Get the path to the documents folder.'),
|
||||
t('Filesystem/Windows, Linux, MacOS'),
|
||||
_('Documents folder'),
|
||||
_('Get the path to the documents folder.'),
|
||||
_('Filesystem/Windows, Linux, MacOS'),
|
||||
'JsPlatform/Extensions/filesystem_folder24.png',
|
||||
'JsPlatform/Extensions/filesystem_folder32.png'
|
||||
)
|
||||
@@ -346,9 +346,9 @@ module.exports = {
|
||||
extension
|
||||
.addStrExpression(
|
||||
'PicturesPath',
|
||||
t('Pictures folder'),
|
||||
t('Get the path to the pictures folder.'),
|
||||
t('Filesystem/Windows, Linux, MacOS'),
|
||||
_('Pictures folder'),
|
||||
_('Get the path to the pictures folder.'),
|
||||
_('Filesystem/Windows, Linux, MacOS'),
|
||||
'JsPlatform/Extensions/filesystem_folder24.png',
|
||||
'JsPlatform/Extensions/filesystem_folder32.png'
|
||||
)
|
||||
@@ -360,9 +360,9 @@ module.exports = {
|
||||
extension
|
||||
.addStrExpression(
|
||||
'ExecutablePath',
|
||||
t('This games executable folder'),
|
||||
t('Get the path to this games executable folder.'),
|
||||
t('Filesystem/Windows, Linux, MacOS'),
|
||||
_('This games executable folder'),
|
||||
_('Get the path to this games executable folder.'),
|
||||
_('Filesystem/Windows, Linux, MacOS'),
|
||||
'JsPlatform/Extensions/filesystem_folder24.png',
|
||||
'JsPlatform/Extensions/filesystem_folder32.png'
|
||||
)
|
||||
@@ -374,9 +374,9 @@ module.exports = {
|
||||
extension
|
||||
.addStrExpression(
|
||||
'UserdataPath',
|
||||
t('Userdata folder (For application settings)'),
|
||||
t('Get the path to userdata folder. (For application settings)'),
|
||||
t('Filesystem/Windows, Linux, MacOS'),
|
||||
_('Userdata folder (For application settings)'),
|
||||
_('Get the path to userdata folder. (For application settings)'),
|
||||
_('Filesystem/Windows, Linux, MacOS'),
|
||||
'JsPlatform/Extensions/filesystem_folder24.png',
|
||||
'JsPlatform/Extensions/filesystem_folder32.png'
|
||||
)
|
||||
@@ -388,9 +388,9 @@ module.exports = {
|
||||
extension
|
||||
.addStrExpression(
|
||||
'TempPath',
|
||||
t('Temp folder'),
|
||||
t('Get the path to temp folder.'),
|
||||
t('Filesystem/Windows, Linux, MacOS'),
|
||||
_('Temp folder'),
|
||||
_('Get the path to temp folder.'),
|
||||
_('Filesystem/Windows, Linux, MacOS'),
|
||||
'JsPlatform/Extensions/filesystem_folder24.png',
|
||||
'JsPlatform/Extensions/filesystem_folder32.png'
|
||||
)
|
||||
@@ -402,9 +402,9 @@ module.exports = {
|
||||
extension
|
||||
.addStrExpression(
|
||||
'PathDelimiter',
|
||||
t('Path delimiter'),
|
||||
t('Get the operating system agnostic path delimiter.'),
|
||||
t('Filesystem/Windows, Linux, MacOS'),
|
||||
_('Path delimiter'),
|
||||
_('Get the operating system agnostic path delimiter.'),
|
||||
_('Filesystem/Windows, Linux, MacOS'),
|
||||
'JsPlatform/Extensions/filesystem_folder24.png',
|
||||
'JsPlatform/Extensions/filesystem_folder32.png'
|
||||
)
|
||||
|
@@ -207,7 +207,7 @@ void DeclareInventoryExtension(gd::PlatformExtension& extension) {
|
||||
_("Get the number of an item in the inventory"),
|
||||
_("Inventory"),
|
||||
"CppPlatform/Extensions/Inventoryicon16.png")
|
||||
.AddCodeOnlyParameter("currentScene", _(""))
|
||||
.AddCodeOnlyParameter("currentScene", "")
|
||||
.AddParameter("string", _("Inventory name"))
|
||||
.AddParameter("string", _("Item name"))
|
||||
.SetFunctionName("InventoryTools::Count")
|
||||
|
@@ -40,7 +40,7 @@ void DeclarePathfindingBehaviorExtension(gd::PlatformExtension& extension) {
|
||||
_("Move to a position"),
|
||||
_("Move the object to a position"),
|
||||
_("Move _PARAM0_ to _PARAM3_;_PARAM4_"),
|
||||
_(""),
|
||||
"",
|
||||
"CppPlatform/Extensions/AStaricon24.png",
|
||||
"CppPlatform/Extensions/AStaricon16.png")
|
||||
.AddParameter("object", _("Object"))
|
||||
@@ -56,7 +56,7 @@ void DeclarePathfindingBehaviorExtension(gd::PlatformExtension& extension) {
|
||||
_("Path found"),
|
||||
_("Return true if a path has been found."),
|
||||
_("A path has been found for _PARAM0_"),
|
||||
_(""),
|
||||
"",
|
||||
"CppPlatform/Extensions/AStaricon24.png",
|
||||
"CppPlatform/Extensions/AStaricon16.png")
|
||||
|
||||
@@ -69,7 +69,7 @@ void DeclarePathfindingBehaviorExtension(gd::PlatformExtension& extension) {
|
||||
_("Destination reached"),
|
||||
_("Return true if the destination was reached."),
|
||||
_("_PARAM0_ reached its destination"),
|
||||
_(""),
|
||||
"",
|
||||
"CppPlatform/Extensions/AStaricon24.png",
|
||||
"CppPlatform/Extensions/AStaricon16.png")
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -451,7 +451,7 @@ void DeclarePhysicsBehaviorExtension(gd::PlatformExtension& extension) {
|
||||
"into account by the next actions and conditions, if "
|
||||
"they are colliding with the other objects."),
|
||||
_("_PARAM0_ is in collision with a _PARAM2_"),
|
||||
_(""),
|
||||
"",
|
||||
"res/physics24.png",
|
||||
"res/physics16.png")
|
||||
.AddParameter("object", _("Object"))
|
||||
|
@@ -41,7 +41,7 @@ void DeclarePlatformBehaviorExtension(gd::PlatformExtension& extension) {
|
||||
_("Check if the object is moving (whether it is on the "
|
||||
"floor or in the air)."),
|
||||
_("_PARAM0_ is moving"),
|
||||
_(""),
|
||||
"",
|
||||
"CppPlatform/Extensions/platformerobjecticon24.png",
|
||||
"CppPlatform/Extensions/platformerobjecticon16.png")
|
||||
.AddParameter("object", _("Object"))
|
||||
@@ -54,7 +54,7 @@ void DeclarePlatformBehaviorExtension(gd::PlatformExtension& extension) {
|
||||
_("Is on floor"),
|
||||
_("Check if the object is on a platform."),
|
||||
_("_PARAM0_ is on floor"),
|
||||
_(""),
|
||||
"",
|
||||
"CppPlatform/Extensions/platformerobjecticon24.png",
|
||||
"CppPlatform/Extensions/platformerobjecticon16.png")
|
||||
.AddParameter("object", _("Object"))
|
||||
@@ -67,7 +67,7 @@ void DeclarePlatformBehaviorExtension(gd::PlatformExtension& extension) {
|
||||
_("Is on ladder"),
|
||||
_("Check if the object is on a ladder."),
|
||||
_("_PARAM0_ is on ladder"),
|
||||
_(""),
|
||||
"",
|
||||
"CppPlatform/Extensions/platformerobjecticon24.png",
|
||||
"CppPlatform/Extensions/platformerobjecticon16.png")
|
||||
.AddParameter("object", _("Object"))
|
||||
@@ -80,7 +80,7 @@ void DeclarePlatformBehaviorExtension(gd::PlatformExtension& extension) {
|
||||
_("Is jumping"),
|
||||
_("Check if the object is jumping."),
|
||||
_("_PARAM0_ is jumping"),
|
||||
_(""),
|
||||
"",
|
||||
"CppPlatform/Extensions/platformerobjecticon24.png",
|
||||
"CppPlatform/Extensions/platformerobjecticon16.png")
|
||||
.AddParameter("object", _("Object"))
|
||||
@@ -96,7 +96,7 @@ void DeclarePlatformBehaviorExtension(gd::PlatformExtension& extension) {
|
||||
"flagged as jumping and falling at the same time: at the end of a "
|
||||
"jump, the fall speed becomes higher than the jump speed."),
|
||||
_("_PARAM0_ is falling"),
|
||||
_(""),
|
||||
"",
|
||||
"CppPlatform/Extensions/platformerobjecticon24.png",
|
||||
"CppPlatform/Extensions/platformerobjecticon16.png")
|
||||
.AddParameter("object", _("Object"))
|
||||
@@ -108,7 +108,7 @@ void DeclarePlatformBehaviorExtension(gd::PlatformExtension& extension) {
|
||||
_("Is grabbing platform ledge"),
|
||||
_("Check if the object is grabbing a platform ledge."),
|
||||
_("_PARAM0_ is grabbing a platform ledge"),
|
||||
_(""),
|
||||
"",
|
||||
"CppPlatform/Extensions/platformerobjecticon24.png",
|
||||
"CppPlatform/Extensions/platformerobjecticon16.png")
|
||||
.AddParameter("object", _("Object"))
|
||||
|
@@ -11,12 +11,12 @@
|
||||
* More information on https://github.com/4ian/GDevelop/blob/master/newIDE/README-extensions.md
|
||||
*/
|
||||
module.exports = {
|
||||
createExtension: function (t, gd) {
|
||||
createExtension: function (_, gd) {
|
||||
const extension = new gd.PlatformExtension();
|
||||
extension.setExtensionInformation(
|
||||
"Screenshot",
|
||||
t("Screenshot"),
|
||||
t(
|
||||
_("Screenshot"),
|
||||
_(
|
||||
"Save screenshots of a running game."
|
||||
),
|
||||
"Matthias Meike",
|
||||
@@ -26,15 +26,15 @@ module.exports = {
|
||||
extension
|
||||
.addAction(
|
||||
"TakeScreenshot",
|
||||
t("Take screenshot"),
|
||||
t("Take a screenshot of the game, and save it to a png file (supported only when running on Windows/Linux/macOS)."),
|
||||
t("Take a screenshot and save at _PARAM1_"),
|
||||
t("Screenshot"),
|
||||
_("Take screenshot"),
|
||||
_("Take a screenshot of the game, and save it to a png file (supported only when running on Windows/Linux/macOS)."),
|
||||
_("Take a screenshot and save at _PARAM1_"),
|
||||
_("Screenshot"),
|
||||
"JsPlatform/Extensions/take_screenshot24.png",
|
||||
"JsPlatform/Extensions/take_screenshot32.png"
|
||||
)
|
||||
.addCodeOnlyParameter('currentScene', '')
|
||||
.addParameter("string", t("Save path"), "", false)
|
||||
.addParameter("string", _("Save path"), "", false)
|
||||
.getCodeExtraInformation()
|
||||
.setIncludeFile(
|
||||
"Extensions/Screenshot/screenshottools.js"
|
||||
|
@@ -142,7 +142,7 @@ class SoundObjectCppExtension : public ExtensionBase {
|
||||
_("Play"),
|
||||
_("Play a sound."),
|
||||
_("Play sound _PARAM0_"),
|
||||
_(""),
|
||||
"",
|
||||
"res/actions/son24.png",
|
||||
"res/actions/son.png")
|
||||
|
||||
@@ -154,7 +154,7 @@ class SoundObjectCppExtension : public ExtensionBase {
|
||||
_("Stop"),
|
||||
_("Stop a sound."),
|
||||
_("Stop _PARAM0_"),
|
||||
_(""),
|
||||
"",
|
||||
"res/actions/son24.png",
|
||||
"res/actions/son.png")
|
||||
|
||||
@@ -166,7 +166,7 @@ class SoundObjectCppExtension : public ExtensionBase {
|
||||
_("Pause"),
|
||||
_("Pause a sound."),
|
||||
_("Pause _PARAM0_"),
|
||||
_(""),
|
||||
"",
|
||||
"res/actions/son24.png",
|
||||
"res/actions/son.png")
|
||||
|
||||
@@ -266,7 +266,7 @@ class SoundObjectCppExtension : public ExtensionBase {
|
||||
_("Being played"),
|
||||
_("Test if a sound is being played."),
|
||||
_("_PARAM0_ is being played"),
|
||||
_(""),
|
||||
"",
|
||||
"res/actions/son24.png",
|
||||
"res/actions/son.png")
|
||||
|
||||
@@ -278,7 +278,7 @@ class SoundObjectCppExtension : public ExtensionBase {
|
||||
_("Paused"),
|
||||
_("A sound is paused"),
|
||||
_("_PARAM0_ is paused"),
|
||||
_(""),
|
||||
"",
|
||||
"res/actions/son24.png",
|
||||
"res/actions/son.png")
|
||||
|
||||
@@ -290,7 +290,7 @@ class SoundObjectCppExtension : public ExtensionBase {
|
||||
_("Stopped"),
|
||||
_("Test if a sound is stopped."),
|
||||
_("_PARAM0_ is stopped"),
|
||||
_(""),
|
||||
"",
|
||||
"res/actions/son24.png",
|
||||
"res/actions/son.png")
|
||||
|
||||
|
@@ -35,7 +35,7 @@ void DeclareTextEntryObjectExtension(gd::PlatformExtension& extension) {
|
||||
_("Text in memory"),
|
||||
_("Modify text in memory of the object"),
|
||||
_("Do _PARAM1__PARAM2_ to the text in memory of _PARAM0_"),
|
||||
_(""),
|
||||
"",
|
||||
"CppPlatform/Extensions/textentry24.png",
|
||||
"CppPlatform/Extensions/textentryicon.png")
|
||||
|
||||
@@ -51,7 +51,7 @@ void DeclareTextEntryObjectExtension(gd::PlatformExtension& extension) {
|
||||
_("Text in memory"),
|
||||
_("Test the text of a Text Entry object."),
|
||||
_("The text of _PARAM0_ is _PARAM1__PARAM2_"),
|
||||
_(""),
|
||||
"",
|
||||
"CppPlatform/Extensions/textentry24.png",
|
||||
"CppPlatform/Extensions/textentryicon.png")
|
||||
|
||||
|
@@ -37,7 +37,7 @@ void DeclareTextObjectExtension(gd::PlatformExtension& extension) {
|
||||
_("Modify the text"),
|
||||
_("Modify the text of a Text object."),
|
||||
_("Do _PARAM1__PARAM2_ to the text of _PARAM0_"),
|
||||
_(""),
|
||||
"",
|
||||
"res/actions/text24.png",
|
||||
"res/actions/text.png")
|
||||
|
||||
@@ -53,7 +53,7 @@ void DeclareTextObjectExtension(gd::PlatformExtension& extension) {
|
||||
_("Compare the text"),
|
||||
_("Compare the text of a Text object."),
|
||||
_("Text of _PARAM0_ is _PARAM1__PARAM2_"),
|
||||
_(""),
|
||||
"",
|
||||
"res/conditions/text24.png",
|
||||
"res/conditions/text.png")
|
||||
|
||||
@@ -81,7 +81,7 @@ void DeclareTextObjectExtension(gd::PlatformExtension& extension) {
|
||||
_("Size"),
|
||||
_("Change the size of the text."),
|
||||
_("Do _PARAM1__PARAM2_ to the size of the text of _PARAM0_"),
|
||||
_(""),
|
||||
"",
|
||||
"res/actions/characterSize24.png",
|
||||
"res/actions/characterSize.png")
|
||||
|
||||
@@ -97,7 +97,7 @@ void DeclareTextObjectExtension(gd::PlatformExtension& extension) {
|
||||
_("Size"),
|
||||
_("Compare the size of the text"),
|
||||
_("The size of the text of _PARAM0_ is _PARAM1__PARAM2_"),
|
||||
_(""),
|
||||
"",
|
||||
"res/conditions/characterSize24.png",
|
||||
"res/conditions/characterSize.png")
|
||||
|
||||
@@ -127,7 +127,7 @@ void DeclareTextObjectExtension(gd::PlatformExtension& extension) {
|
||||
_("Change the opacity of a Text. 0 is fully transparent, 255 "
|
||||
"is opaque (default)."),
|
||||
_("Do _PARAM1__PARAM2_ to the opacity of _PARAM0_"),
|
||||
_(""),
|
||||
"",
|
||||
"res/actions/opacity24.png",
|
||||
"res/actions/opacity.png")
|
||||
|
||||
@@ -144,7 +144,7 @@ void DeclareTextObjectExtension(gd::PlatformExtension& extension) {
|
||||
_("Compare the opacity of a Text object, between 0 (fully "
|
||||
"transparent) to 255 (opaque)."),
|
||||
_("The opacity of _PARAM0_ is _PARAM1__PARAM2_"),
|
||||
_(""),
|
||||
"",
|
||||
"res/conditions/opacity24.png",
|
||||
"res/conditions/opacity.png")
|
||||
|
||||
|
@@ -121,7 +121,7 @@ void DeclareTopDownMovementBehaviorExtension(gd::PlatformExtension& extension) {
|
||||
_("Is moving"),
|
||||
_("Check if the object is moving."),
|
||||
_("_PARAM0_ is moving"),
|
||||
_(""),
|
||||
"",
|
||||
"CppPlatform/Extensions/topdownmovementicon24.png",
|
||||
"CppPlatform/Extensions/topdownmovementicon16.png")
|
||||
.AddParameter("object", _("Object"))
|
||||
|
@@ -9,3 +9,4 @@
|
||||
[libs]
|
||||
|
||||
[options]
|
||||
module.ignore_non_literal_requires=true
|
2
newIDE/app/.gitignore
vendored
2
newIDE/app/.gitignore
vendored
@@ -31,3 +31,5 @@ public/CppPlatform
|
||||
public/JsPlatform
|
||||
resources/GDJS
|
||||
|
||||
# locales build files
|
||||
locales/_build
|
6
newIDE/app/.linguirc
Normal file
6
newIDE/app/.linguirc
Normal file
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"sourceLocale": "en",
|
||||
"localeDir": "src/locales/",
|
||||
"srcPathDirs": ["src/"],
|
||||
"format": "po"
|
||||
}
|
269
newIDE/app/flow-typed/npm/i18next_vx.x.x.js
vendored
269
newIDE/app/flow-typed/npm/i18next_vx.x.x.js
vendored
@@ -1,269 +0,0 @@
|
||||
// flow-typed signature: 099f08ea079d55c973e866b7b0bdd98c
|
||||
// flow-typed version: <<STUB>>/i18next_v^10.0.3/flow_v0.78.0
|
||||
|
||||
/**
|
||||
* This is an autogenerated libdef stub for:
|
||||
*
|
||||
* 'i18next'
|
||||
*
|
||||
* Fill this stub out by replacing all the `any` types.
|
||||
*
|
||||
* Once filled out, we encourage you to share your work with the
|
||||
* community by sending a pull request to:
|
||||
* https://github.com/flowtype/flow-typed
|
||||
*/
|
||||
|
||||
declare module 'i18next' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
/**
|
||||
* We include stubs for each file inside this npm package in case you need to
|
||||
* require those files directly. Feel free to delete any files that aren't
|
||||
* needed.
|
||||
*/
|
||||
declare module 'i18next/dist/commonjs/BackendConnector' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/dist/commonjs/CacheConnector' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/dist/commonjs/defaults' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/dist/commonjs/EventEmitter' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/dist/commonjs/i18next' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/dist/commonjs/index' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/dist/commonjs/Interpolator' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/dist/commonjs/LanguageUtils' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/dist/commonjs/logger' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/dist/commonjs/PluralResolver' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/dist/commonjs/postProcessor' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/dist/commonjs/ResourceStore' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/dist/commonjs/Translator' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/dist/commonjs/utils' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/dist/es/BackendConnector' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/dist/es/CacheConnector' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/dist/es/defaults' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/dist/es/EventEmitter' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/dist/es/i18next' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/dist/es/index' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/dist/es/Interpolator' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/dist/es/LanguageUtils' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/dist/es/logger' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/dist/es/PluralResolver' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/dist/es/postProcessor' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/dist/es/ResourceStore' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/dist/es/Translator' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/dist/es/utils' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/dist/umd/i18next' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/dist/umd/i18next.min' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/i18next' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/i18next.min' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/karma.backward.conf' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
declare module 'i18next/rollup.config' {
|
||||
declare module.exports: any;
|
||||
}
|
||||
|
||||
// Filename aliases
|
||||
declare module 'i18next/dist/commonjs/BackendConnector.js' {
|
||||
declare module.exports: $Exports<'i18next/dist/commonjs/BackendConnector'>;
|
||||
}
|
||||
declare module 'i18next/dist/commonjs/CacheConnector.js' {
|
||||
declare module.exports: $Exports<'i18next/dist/commonjs/CacheConnector'>;
|
||||
}
|
||||
declare module 'i18next/dist/commonjs/defaults.js' {
|
||||
declare module.exports: $Exports<'i18next/dist/commonjs/defaults'>;
|
||||
}
|
||||
declare module 'i18next/dist/commonjs/EventEmitter.js' {
|
||||
declare module.exports: $Exports<'i18next/dist/commonjs/EventEmitter'>;
|
||||
}
|
||||
declare module 'i18next/dist/commonjs/i18next.js' {
|
||||
declare module.exports: $Exports<'i18next/dist/commonjs/i18next'>;
|
||||
}
|
||||
declare module 'i18next/dist/commonjs/index.js' {
|
||||
declare module.exports: $Exports<'i18next/dist/commonjs/index'>;
|
||||
}
|
||||
declare module 'i18next/dist/commonjs/Interpolator.js' {
|
||||
declare module.exports: $Exports<'i18next/dist/commonjs/Interpolator'>;
|
||||
}
|
||||
declare module 'i18next/dist/commonjs/LanguageUtils.js' {
|
||||
declare module.exports: $Exports<'i18next/dist/commonjs/LanguageUtils'>;
|
||||
}
|
||||
declare module 'i18next/dist/commonjs/logger.js' {
|
||||
declare module.exports: $Exports<'i18next/dist/commonjs/logger'>;
|
||||
}
|
||||
declare module 'i18next/dist/commonjs/PluralResolver.js' {
|
||||
declare module.exports: $Exports<'i18next/dist/commonjs/PluralResolver'>;
|
||||
}
|
||||
declare module 'i18next/dist/commonjs/postProcessor.js' {
|
||||
declare module.exports: $Exports<'i18next/dist/commonjs/postProcessor'>;
|
||||
}
|
||||
declare module 'i18next/dist/commonjs/ResourceStore.js' {
|
||||
declare module.exports: $Exports<'i18next/dist/commonjs/ResourceStore'>;
|
||||
}
|
||||
declare module 'i18next/dist/commonjs/Translator.js' {
|
||||
declare module.exports: $Exports<'i18next/dist/commonjs/Translator'>;
|
||||
}
|
||||
declare module 'i18next/dist/commonjs/utils.js' {
|
||||
declare module.exports: $Exports<'i18next/dist/commonjs/utils'>;
|
||||
}
|
||||
declare module 'i18next/dist/es/BackendConnector.js' {
|
||||
declare module.exports: $Exports<'i18next/dist/es/BackendConnector'>;
|
||||
}
|
||||
declare module 'i18next/dist/es/CacheConnector.js' {
|
||||
declare module.exports: $Exports<'i18next/dist/es/CacheConnector'>;
|
||||
}
|
||||
declare module 'i18next/dist/es/defaults.js' {
|
||||
declare module.exports: $Exports<'i18next/dist/es/defaults'>;
|
||||
}
|
||||
declare module 'i18next/dist/es/EventEmitter.js' {
|
||||
declare module.exports: $Exports<'i18next/dist/es/EventEmitter'>;
|
||||
}
|
||||
declare module 'i18next/dist/es/i18next.js' {
|
||||
declare module.exports: $Exports<'i18next/dist/es/i18next'>;
|
||||
}
|
||||
declare module 'i18next/dist/es/index.js' {
|
||||
declare module.exports: $Exports<'i18next/dist/es/index'>;
|
||||
}
|
||||
declare module 'i18next/dist/es/Interpolator.js' {
|
||||
declare module.exports: $Exports<'i18next/dist/es/Interpolator'>;
|
||||
}
|
||||
declare module 'i18next/dist/es/LanguageUtils.js' {
|
||||
declare module.exports: $Exports<'i18next/dist/es/LanguageUtils'>;
|
||||
}
|
||||
declare module 'i18next/dist/es/logger.js' {
|
||||
declare module.exports: $Exports<'i18next/dist/es/logger'>;
|
||||
}
|
||||
declare module 'i18next/dist/es/PluralResolver.js' {
|
||||
declare module.exports: $Exports<'i18next/dist/es/PluralResolver'>;
|
||||
}
|
||||
declare module 'i18next/dist/es/postProcessor.js' {
|
||||
declare module.exports: $Exports<'i18next/dist/es/postProcessor'>;
|
||||
}
|
||||
declare module 'i18next/dist/es/ResourceStore.js' {
|
||||
declare module.exports: $Exports<'i18next/dist/es/ResourceStore'>;
|
||||
}
|
||||
declare module 'i18next/dist/es/Translator.js' {
|
||||
declare module.exports: $Exports<'i18next/dist/es/Translator'>;
|
||||
}
|
||||
declare module 'i18next/dist/es/utils.js' {
|
||||
declare module.exports: $Exports<'i18next/dist/es/utils'>;
|
||||
}
|
||||
declare module 'i18next/dist/umd/i18next.js' {
|
||||
declare module.exports: $Exports<'i18next/dist/umd/i18next'>;
|
||||
}
|
||||
declare module 'i18next/dist/umd/i18next.min.js' {
|
||||
declare module.exports: $Exports<'i18next/dist/umd/i18next.min'>;
|
||||
}
|
||||
declare module 'i18next/i18next.js' {
|
||||
declare module.exports: $Exports<'i18next/i18next'>;
|
||||
}
|
||||
declare module 'i18next/i18next.min.js' {
|
||||
declare module.exports: $Exports<'i18next/i18next.min'>;
|
||||
}
|
||||
declare module 'i18next/index' {
|
||||
declare module.exports: $Exports<'i18next'>;
|
||||
}
|
||||
declare module 'i18next/index.js' {
|
||||
declare module.exports: $Exports<'i18next'>;
|
||||
}
|
||||
declare module 'i18next/karma.backward.conf.js' {
|
||||
declare module.exports: $Exports<'i18next/karma.backward.conf'>;
|
||||
}
|
||||
declare module 'i18next/rollup.config.js' {
|
||||
declare module.exports: $Exports<'i18next/rollup.config'>;
|
||||
}
|
26
newIDE/app/flow-typed/npm/react-dnd_v2.x.x.js
vendored
26
newIDE/app/flow-typed/npm/react-dnd_v2.x.x.js
vendored
@@ -1,5 +1,5 @@
|
||||
// flow-typed signature: 6457154c7e96ef3ce4b654781625f315
|
||||
// flow-typed version: 7bc41826e1/react-dnd_v2.x.x/flow_>=v0.53.x
|
||||
// flow-typed signature: cf6cf392ef13583af7c89327c319a5a5
|
||||
// flow-typed version: 45acb9a3f7/react-dnd_v2.x.x/flow_>=v0.53.x
|
||||
|
||||
declare module "react-dnd" {
|
||||
declare type Identifier = string;
|
||||
@@ -23,11 +23,11 @@ declare module "react-dnd" {
|
||||
declare type InstanceOf<C> = _InstanceOf<*, C>;
|
||||
|
||||
declare class ConnectedComponent<C, I, P> extends React$Component<P> {
|
||||
static DecoratedComponent: C,
|
||||
getDecoratedComponentInstance(): I,
|
||||
getHandlerId(): Identifier,
|
||||
props: P,
|
||||
state: void
|
||||
static DecoratedComponent: C;
|
||||
getDecoratedComponentInstance(): I;
|
||||
getHandlerId(): Identifier;
|
||||
props: P;
|
||||
state: void;
|
||||
}
|
||||
|
||||
declare type Connector<SP: {}, CP: {}> = (<
|
||||
@@ -201,6 +201,18 @@ declare module "react-dnd" {
|
||||
// Drag Drop Context
|
||||
// ----------------------------------------------------------------------
|
||||
|
||||
declare type ProviderProps = {
|
||||
backend: mixed,
|
||||
children: React$Element<any>,
|
||||
window?: Object
|
||||
};
|
||||
|
||||
declare class DragDropContextProvider<ProviderProps> extends React$Component<
|
||||
ProviderProps
|
||||
> {
|
||||
props: ProviderProps;
|
||||
}
|
||||
|
||||
declare function DragDropContext<OP: {}, CP: {}>(
|
||||
backend: mixed
|
||||
): Connector<$Supertype<OP & CP>, CP>;
|
||||
|
@@ -1,94 +0,0 @@
|
||||
// flow-typed signature: 6c6a5771bbdffe188d60637063b5f9a4
|
||||
// flow-typed version: 6533cd10ce/react-i18next_v6.x.x/flow_>=v0.53.x
|
||||
|
||||
declare module "react-i18next" {
|
||||
declare type TFunction = (key?: ?string, data?: ?Object) => string;
|
||||
declare type Locales = string | Array<string>;
|
||||
|
||||
declare type TranslatorProps = {
|
||||
t: TFunction,
|
||||
i18nLoadedAt: Date,
|
||||
i18n: Object
|
||||
};
|
||||
|
||||
declare type Translator<OP, P> = (
|
||||
component: React$ComponentType<P>
|
||||
) => Class<React$Component<OP, *>>;
|
||||
|
||||
declare type TranslateOptions = $Shape<{
|
||||
wait: boolean,
|
||||
nsMode: "default" | "fallback",
|
||||
bindi18n: false | string,
|
||||
bindStore: false | string,
|
||||
withRef: boolean,
|
||||
translateFuncName: string,
|
||||
i18n: Object
|
||||
}>;
|
||||
|
||||
declare function translate<OP, P>(
|
||||
locales?: Locales,
|
||||
options?: TranslateOptions
|
||||
): Translator<OP, P>;
|
||||
|
||||
declare type I18nProps = {
|
||||
i18n?: Object,
|
||||
ns?: string | Array<string>,
|
||||
children: (t: TFunction, { i18n: Object, t: TFunction }) => React$Node,
|
||||
initialI18nStore?: Object,
|
||||
initialLanguage?: string
|
||||
};
|
||||
declare var I18n: React$ComponentType<I18nProps>;
|
||||
|
||||
declare type InterpolateProps = {
|
||||
className?: string,
|
||||
dangerouslySetInnerHTMLPartElement?: string,
|
||||
i18n?: Object,
|
||||
i18nKey?: string,
|
||||
options?: Object,
|
||||
parent?: string,
|
||||
style?: Object,
|
||||
t?: TFunction,
|
||||
useDangerouslySetInnerHTML?: boolean
|
||||
};
|
||||
declare var Interpolate: React$ComponentType<InterpolateProps>;
|
||||
|
||||
declare type TransProps = {
|
||||
count?: number,
|
||||
parent?: string,
|
||||
i18n?: Object,
|
||||
i18nKey?: string,
|
||||
t?: TFunction
|
||||
};
|
||||
declare var Trans: React$ComponentType<TransProps>;
|
||||
|
||||
declare type ProviderProps = { i18n: Object, children: React$Element<*> };
|
||||
declare var I18nextProvider: React$ComponentType<ProviderProps>;
|
||||
|
||||
declare type NamespacesProps = {
|
||||
components: Array<React$ComponentType<*>>,
|
||||
i18n: { loadNamespaces: Function }
|
||||
};
|
||||
declare function loadNamespaces(props: NamespacesProps): Promise<void>;
|
||||
|
||||
declare var reactI18nextModule: {
|
||||
type: "3rdParty",
|
||||
init: (instance: Object) => void
|
||||
};
|
||||
|
||||
declare var defaultOptions: {
|
||||
wait: false,
|
||||
withRef: false,
|
||||
bindI18n: "languageChanged loaded",
|
||||
bindStore: "added removed",
|
||||
translateFuncName: "t",
|
||||
nsMode: "default"
|
||||
};
|
||||
|
||||
declare function setDefaults(options: TranslateOptions): void;
|
||||
|
||||
declare function getDefaults(): TranslateOptions;
|
||||
|
||||
declare function getI18n(): Object;
|
||||
|
||||
declare function setI18n(instance: Object): void;
|
||||
}
|
@@ -5,7 +5,11 @@
|
||||
"license": "MIT",
|
||||
"homepage": ".",
|
||||
"devDependencies": {
|
||||
"flow-bin": "0.78.0",
|
||||
"@babel/core": "^7.2.2",
|
||||
"@lingui/cli": "^2.7.3",
|
||||
"@lingui/macro": "^2.7.3",
|
||||
"babel-core": "^7.0.0-bridge.0",
|
||||
"flow-bin": "^0.92.0",
|
||||
"flow-coverage-report": "^0.4.0",
|
||||
"follow-redirects": "^1.2.3",
|
||||
"prettier": "1.15.3",
|
||||
@@ -14,6 +18,7 @@
|
||||
"unzip2": "^0.2.5"
|
||||
},
|
||||
"dependencies": {
|
||||
"@lingui/react": "^2.7.3",
|
||||
"@storybook/react": "3.2.19",
|
||||
"algoliasearch": "^3.30.0",
|
||||
"aws-sdk": "^2.100.0",
|
||||
@@ -26,7 +31,6 @@
|
||||
"firebase": "^4.8.2",
|
||||
"flat": "2.0.1",
|
||||
"fontfaceobserver": "2.0.13",
|
||||
"i18next": "^10.0.3",
|
||||
"keen-tracking": "1.1.3",
|
||||
"lodash": "4.17.4",
|
||||
"material-ui": "0.20",
|
||||
@@ -43,7 +47,6 @@
|
||||
"react-dnd-html5-backend": "2.5.4",
|
||||
"react-dom": "16.5.1",
|
||||
"react-error-boundary": "^1.2.0",
|
||||
"react-i18next": "6.2.0",
|
||||
"react-json-view": "^1.16.1",
|
||||
"react-markdown": "^4.0.6",
|
||||
"react-measure": "1.4.7",
|
||||
@@ -71,7 +74,9 @@
|
||||
"storybook": "start-storybook -p 9009 -s public",
|
||||
"analyze-test-coverage": "react-scripts test --coverage",
|
||||
"analyze-flow-coverage": "flow-coverage-report",
|
||||
"analyze-source-map": "source-map-explorer build/static/js/main.*"
|
||||
"analyze-source-map": "source-map-explorer build/static/js/main.*",
|
||||
"extract-all-translations": "node scripts/extract-all-translations.js",
|
||||
"compile-translations": "node scripts/compile-translations.js"
|
||||
},
|
||||
"eslintConfig": {
|
||||
"extends": "react-app"
|
||||
|
97
newIDE/app/scripts/compile-translations.js
Normal file
97
newIDE/app/scripts/compile-translations.js
Normal file
@@ -0,0 +1,97 @@
|
||||
const shell = require('shelljs');
|
||||
const path = require('path');
|
||||
const { getLocales, getLocalePath } = require('./lib/Locales');
|
||||
const isWin = /^win/.test(process.platform);
|
||||
|
||||
const newIdeAppPath = path.join(__dirname, '..');
|
||||
|
||||
let msgcat = '';
|
||||
if (isWin) {
|
||||
shell.echo(`ℹ️ Skipping translations compilation on Windows.`);
|
||||
shell.echo(
|
||||
`ℹ️ Pull Requests are welcome to add support for "msgcat" on Windows!`
|
||||
);
|
||||
shell.exit(0);
|
||||
return;
|
||||
} else {
|
||||
msgcat = shell.exec('type msgcat 2>/dev/null', { silent: true }).stdout;
|
||||
if (!msgcat) {
|
||||
msgcat = shell.exec('find /usr -name "msgcat" -print -quit 2>/dev/null', {
|
||||
silent: true,
|
||||
}).stdout;
|
||||
}
|
||||
}
|
||||
|
||||
msgcat = msgcat.trim();
|
||||
if (!msgcat) {
|
||||
shell.echo(
|
||||
`ℹ️ msgcat not found not found on your computer - skipping translations compilation.`
|
||||
);
|
||||
shell.echo(
|
||||
`ℹ️ Install "gettext" with "brew install gettext" (macOS) or your Linux package manager.`
|
||||
);
|
||||
shell.exit(0);
|
||||
return;
|
||||
}
|
||||
|
||||
getLocales().then(
|
||||
locales => {
|
||||
return Promise.all(
|
||||
locales.map(locale => {
|
||||
return new Promise(resolve => {
|
||||
shell.exec(
|
||||
msgcat +
|
||||
' ide-messages.po gdcore-gdcpp-gdjs-extensions-messages.po -o messages.po',
|
||||
{
|
||||
cwd: getLocalePath(locale),
|
||||
silent: true,
|
||||
},
|
||||
(code, stdout, stderr) =>
|
||||
resolve({
|
||||
locale,
|
||||
shellOutput: {
|
||||
code,
|
||||
stdout,
|
||||
stderr,
|
||||
},
|
||||
})
|
||||
);
|
||||
});
|
||||
})
|
||||
).then(results => {
|
||||
const successes = results.filter(
|
||||
({ shellOutput }) => shellOutput.code === 0
|
||||
);
|
||||
const failures = results.filter(
|
||||
({ shellOutput }) => shellOutput.code !== 0
|
||||
);
|
||||
|
||||
const successesLocales = successes.map(({ locale }) => locale).join(',');
|
||||
if (successesLocales) {
|
||||
shell.echo(`ℹ️ Concatened translations for ${successesLocales}.`);
|
||||
}
|
||||
if (failures.length) {
|
||||
failures.forEach(({ locale, shellOutput }) => {
|
||||
shell.echo(
|
||||
`❌ Error(s) occurred while concatening translations for ${locale}: ` +
|
||||
shellOutput.stderr
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
// Launch "lingui compile" for transforming .PO files into
|
||||
// js files ready to be used with @lingui/react newIDE translations
|
||||
shell.exec('node node_modules/.bin/lingui compile', {
|
||||
cwd: newIdeAppPath,
|
||||
});
|
||||
|
||||
shell.exit(0);
|
||||
return;
|
||||
});
|
||||
},
|
||||
error => {
|
||||
shell.echo(`❌ Error(s) occurred while listing locales folders: ` + error);
|
||||
shell.exit(1);
|
||||
return;
|
||||
}
|
||||
);
|
50
newIDE/app/scripts/extract-all-translations.js
Normal file
50
newIDE/app/scripts/extract-all-translations.js
Normal file
@@ -0,0 +1,50 @@
|
||||
const shell = require('shelljs');
|
||||
const path = require('path');
|
||||
const { getLocales, getLocalePath } = require('./lib/Locales');
|
||||
const isWin = /^win/.test(process.platform);
|
||||
|
||||
const gdScriptsPath = path.join(__dirname, '../../../scripts');
|
||||
const newIdeAppPath = path.join(__dirname, '..');
|
||||
|
||||
let hasErrors = false;
|
||||
|
||||
// Launch "lingui extract" for extracting newIDE translations
|
||||
shell.echo('ℹ️ Extracting translations for newIDE...');
|
||||
hasErrors |= shell.exec(
|
||||
'node node_modules/.bin/lingui extract --clean --overwrite',
|
||||
{
|
||||
cwd: newIdeAppPath,
|
||||
}
|
||||
).stderr;
|
||||
|
||||
shell.echo('ℹ️ Renaming extracted translations to ide-messages.po...');
|
||||
getLocales().then(locales =>
|
||||
locales.forEach(locale => {
|
||||
const localePath = getLocalePath(locale);
|
||||
shell.mv(
|
||||
path.join(localePath, 'messages.po'),
|
||||
path.join(localePath, 'ide-messages.po')
|
||||
);
|
||||
})
|
||||
);
|
||||
|
||||
// Launch extractions of translations in GDCore/GDCpp/GDJS
|
||||
// and extensions with gettext.
|
||||
shell.echo(
|
||||
'ℹ️ Extracting translations for GDCore/GDCpp/GDJS/Extensions to scripts/gdcore-gdcpp-gdjs-extensions-messages.pot...'
|
||||
);
|
||||
if (isWin) {
|
||||
hasErrors |= shell.exec('ExtractTranslations.bat', {
|
||||
cwd: gdScriptsPath,
|
||||
}).stderr;
|
||||
} else {
|
||||
hasErrors |= shell.exec('./ExtractTranslations.sh ', {
|
||||
cwd: gdScriptsPath,
|
||||
}).stderr;
|
||||
}
|
||||
|
||||
if (!hasErrors) {
|
||||
shell.echo('✅ Translations extracted');
|
||||
} else {
|
||||
shell.echo(`❌ Error(s) occurred while extracting translations`);
|
||||
}
|
30
newIDE/app/scripts/lib/Locales.js
Normal file
30
newIDE/app/scripts/lib/Locales.js
Normal file
@@ -0,0 +1,30 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const newIdeAppPath = path.join(__dirname, '../..');
|
||||
const localesBasePath = path.join(newIdeAppPath, 'src/locales')
|
||||
|
||||
const getLocales = () => {
|
||||
return new Promise((resolve, reject) => {
|
||||
fs.readdir(localesBasePath, (error, locales) => {
|
||||
if (error) {
|
||||
return reject(error);
|
||||
}
|
||||
|
||||
return resolve(
|
||||
locales
|
||||
.filter(name => name !== '.DS_Store')
|
||||
.filter(name => name !== '_build')
|
||||
);
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
const getLocalePath = (localeName) => {
|
||||
return path.join(localesBasePath, localeName);
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
getLocales,
|
||||
getLocalePath,
|
||||
};
|
@@ -15,7 +15,7 @@ const _ = require('lodash');
|
||||
var shell = require('shelljs');
|
||||
|
||||
shell.exec('node import-GDJS-Runtime.js');
|
||||
gd.initializePlatforms();
|
||||
gd.initializePlatforms(); //TODO: Useless or not?
|
||||
|
||||
const outputFile = '../src/ProjectCreation/ExamplesInformation.js';
|
||||
|
||||
@@ -162,10 +162,11 @@ const readFileContent = filename => {
|
||||
});
|
||||
};
|
||||
|
||||
const noopTranslationFunction = str => str;
|
||||
const examplesInformation = {};
|
||||
const extensionsLoader = makeExtensionsLoader({ gd, filterExamples: false });
|
||||
extensionsLoader
|
||||
.loadAllExtensions()
|
||||
.loadAllExtensions(noopTranslationFunction)
|
||||
.then(loadingResults => {
|
||||
console.info('Loaded extensions', loadingResults);
|
||||
|
||||
|
@@ -36,9 +36,10 @@ const updateResources = (project, baseUrl) => {
|
||||
project.exposeResources(worker);
|
||||
};
|
||||
|
||||
const noopTranslationFunction = str => str;
|
||||
const extensionsLoader = makeExtensionsLoader({ gd, filterExamples: false });
|
||||
extensionsLoader
|
||||
.loadAllExtensions()
|
||||
.loadAllExtensions(noopTranslationFunction)
|
||||
.then(loadingResults => {
|
||||
console.info('Loaded extensions', loadingResults);
|
||||
|
||||
|
@@ -21,6 +21,7 @@ import makeExtensionsLoader from './JsExtensionsLoader/BrowserJsExtensionsLoader
|
||||
import ObjectsEditorService from './ObjectEditor/ObjectsEditorService';
|
||||
import ObjectsRenderingService from './ObjectsRendering/ObjectsRenderingService';
|
||||
import { makeBrowserS3EventsFunctionWriter } from './EventsFunctionsExtensionsLoader/BrowserS3EventsFunctionWriter';
|
||||
import Providers from './MainFrame/Providers';
|
||||
|
||||
export const create = (authentification: Authentification) => {
|
||||
Window.setUpContextMenu();
|
||||
@@ -29,30 +30,34 @@ export const create = (authentification: Authentification) => {
|
||||
const appArguments = Window.getArguments();
|
||||
|
||||
app = (
|
||||
<MainFrame
|
||||
previewLauncher={<BrowserS3PreviewLauncher />}
|
||||
exportDialog={<ExportDialog exporters={getBrowserExporters()} />}
|
||||
createDialog={
|
||||
<CreateProjectDialog
|
||||
examplesComponent={BrowserExamples}
|
||||
startersComponent={BrowserStarters}
|
||||
/>
|
||||
}
|
||||
introDialog={<BrowserIntroDialog />}
|
||||
saveDialog={<BrowserSaveDialog />}
|
||||
onReadFromPathOrURL={BrowserProjectOpener.readInternalFile}
|
||||
resourceSources={browserResourceSources}
|
||||
resourceExternalEditors={browserResourceExternalEditors}
|
||||
<Providers
|
||||
authentification={authentification}
|
||||
extensionsLoader={makeExtensionsLoader({
|
||||
objectsEditorService: ObjectsEditorService,
|
||||
objectsRenderingService: ObjectsRenderingService,
|
||||
filterExamples: !Window.isDev(),
|
||||
})}
|
||||
initialPathsOrURLsToOpen={appArguments['_']}
|
||||
disableCheckForUpdates={!!appArguments['disable-update-check']}
|
||||
eventsFunctionWriter={makeBrowserS3EventsFunctionWriter()}
|
||||
/>
|
||||
>
|
||||
<MainFrame
|
||||
previewLauncher={<BrowserS3PreviewLauncher />}
|
||||
exportDialog={<ExportDialog exporters={getBrowserExporters()} />}
|
||||
createDialog={
|
||||
<CreateProjectDialog
|
||||
examplesComponent={BrowserExamples}
|
||||
startersComponent={BrowserStarters}
|
||||
/>
|
||||
}
|
||||
introDialog={<BrowserIntroDialog />}
|
||||
saveDialog={<BrowserSaveDialog />}
|
||||
onReadFromPathOrURL={BrowserProjectOpener.readInternalFile}
|
||||
resourceSources={browserResourceSources}
|
||||
resourceExternalEditors={browserResourceExternalEditors}
|
||||
authentification={authentification}
|
||||
extensionsLoader={makeExtensionsLoader({
|
||||
objectsEditorService: ObjectsEditorService,
|
||||
objectsRenderingService: ObjectsRenderingService,
|
||||
filterExamples: !Window.isDev(),
|
||||
})}
|
||||
initialPathsOrURLsToOpen={appArguments['_']}
|
||||
eventsFunctionWriter={makeBrowserS3EventsFunctionWriter()}
|
||||
/>
|
||||
</Providers>
|
||||
);
|
||||
|
||||
return app;
|
||||
|
@@ -1,11 +1,10 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import { translate, type TFunction, type Translator } from 'react-i18next';
|
||||
import { ToolbarGroup } from 'material-ui/Toolbar';
|
||||
import ToolbarIcon from '../UI/ToolbarIcon';
|
||||
import ToolbarSeparator from '../UI/ToolbarSeparator';
|
||||
|
||||
type OwnProps = {|
|
||||
type Props = {|
|
||||
onPlay: () => void,
|
||||
canPlay: boolean,
|
||||
onPause: () => void,
|
||||
@@ -13,21 +12,10 @@ type OwnProps = {|
|
||||
onOpenProfiler: () => void,
|
||||
|};
|
||||
|
||||
type Props = {|
|
||||
t: TFunction,
|
||||
...OwnProps,
|
||||
|};
|
||||
|
||||
export class Toolbar extends React.PureComponent<Props> {
|
||||
render() {
|
||||
const {
|
||||
t,
|
||||
onPlay,
|
||||
onPause,
|
||||
canPlay,
|
||||
canPause,
|
||||
onOpenProfiler,
|
||||
} = this.props;
|
||||
const t = str => str; //TODO
|
||||
const { onPlay, onPause, canPlay, canPause, onOpenProfiler } = this.props;
|
||||
|
||||
return (
|
||||
<ToolbarGroup lastChild>
|
||||
@@ -54,5 +42,4 @@ export class Toolbar extends React.PureComponent<Props> {
|
||||
}
|
||||
}
|
||||
|
||||
const translator: Translator<OwnProps, Props> = translate();
|
||||
export default translator(Toolbar);
|
||||
export default Toolbar;
|
||||
|
@@ -291,6 +291,7 @@ function targetCollect(
|
||||
};
|
||||
}
|
||||
|
||||
// $FlowFixMe - Typing of DragSource/DropTarget is a pain to get correctly
|
||||
export default DragSource(
|
||||
reactDndInstructionType,
|
||||
instructionSource,
|
||||
|
@@ -198,6 +198,7 @@ function targetCollect(
|
||||
};
|
||||
}
|
||||
|
||||
// $FlowFixMe - Typing of DragSource/DropTarget is a pain to get correctly
|
||||
export default DropTarget(
|
||||
reactDndInstructionType,
|
||||
instructionsListTarget,
|
||||
|
@@ -259,7 +259,7 @@ export default class ThemableEventsTree extends Component<EventsTreeProps, *> {
|
||||
depth: number = 0,
|
||||
parentDisabled: boolean = false
|
||||
) => {
|
||||
const treeData = mapFor(0, eventsList.getEventsCount(), i => {
|
||||
const treeData = mapFor<any>(0, eventsList.getEventsCount(), i => {
|
||||
const event = eventsList.getEventAt(i);
|
||||
flatData.push(event);
|
||||
|
||||
|
@@ -1,5 +1,4 @@
|
||||
import React, { PureComponent } from 'react';
|
||||
import { translate } from 'react-i18next';
|
||||
import { ToolbarGroup } from 'material-ui/Toolbar';
|
||||
import ToolbarSeparator from '../UI/ToolbarSeparator';
|
||||
import ToolbarIcon from '../UI/ToolbarIcon';
|
||||
@@ -8,7 +7,7 @@ import { adaptAcceleratorString } from '../UI/AcceleratorString';
|
||||
|
||||
export class Toolbar extends PureComponent {
|
||||
render() {
|
||||
const { t } = this.props;
|
||||
const t = str => str; //TODO
|
||||
|
||||
return (
|
||||
<ToolbarGroup lastChild>
|
||||
@@ -115,4 +114,4 @@ export class Toolbar extends PureComponent {
|
||||
}
|
||||
}
|
||||
|
||||
export default translate()(Toolbar);
|
||||
export default Toolbar;
|
||||
|
@@ -476,8 +476,8 @@ export default class EventsSheet extends React.Component<Props, State> {
|
||||
};
|
||||
|
||||
openParameterEditor = (parameterContext: ParameterContext) => {
|
||||
// $FlowFixMe
|
||||
this.setState({
|
||||
// $FlowFixMe
|
||||
editedParameter: parameterContext,
|
||||
inlineEditing: true,
|
||||
inlineEditingAnchorEl: parameterContext.domEvent
|
||||
|
@@ -14,7 +14,6 @@ import {
|
||||
displayProjectErrorsBox,
|
||||
getErrors,
|
||||
} from '../../ProjectManager/ProjectErrorsChecker';
|
||||
import { translate, type TranslatorProps } from 'react-i18next';
|
||||
import assignIn from 'lodash/assignIn';
|
||||
import optionalRequire from '../../Utils/OptionalRequire';
|
||||
import Window from '../../Utils/Window';
|
||||
@@ -23,7 +22,7 @@ const shell = electron ? electron.shell : null;
|
||||
|
||||
const gd = global.gd;
|
||||
|
||||
type Props = TranslatorProps & {|
|
||||
type Props = {|
|
||||
project: gdProject,
|
||||
|};
|
||||
|
||||
@@ -68,7 +67,8 @@ class LocalCordovaExport extends Component<Props, State> {
|
||||
};
|
||||
|
||||
launchExport = () => {
|
||||
const { t, project } = this.props;
|
||||
const t = str => str; //TODO;
|
||||
const { project } = this.props;
|
||||
if (!project) return;
|
||||
|
||||
sendExportLaunched('local-cordova');
|
||||
@@ -104,7 +104,8 @@ class LocalCordovaExport extends Component<Props, State> {
|
||||
};
|
||||
|
||||
render() {
|
||||
const { t, project } = this.props;
|
||||
const t = str => str; //TODO;
|
||||
const { project } = this.props;
|
||||
if (!project) return null;
|
||||
|
||||
return (
|
||||
@@ -186,4 +187,4 @@ class LocalCordovaExport extends Component<Props, State> {
|
||||
}
|
||||
}
|
||||
|
||||
export default translate()(LocalCordovaExport);
|
||||
export default LocalCordovaExport;
|
||||
|
@@ -14,7 +14,6 @@ import {
|
||||
displayProjectErrorsBox,
|
||||
getErrors,
|
||||
} from '../../ProjectManager/ProjectErrorsChecker';
|
||||
import { translate, type TranslatorProps } from 'react-i18next';
|
||||
import assignIn from 'lodash/assignIn';
|
||||
import optionalRequire from '../../Utils/OptionalRequire';
|
||||
const electron = optionalRequire('electron');
|
||||
@@ -22,7 +21,7 @@ const shell = electron ? electron.shell : null;
|
||||
|
||||
const gd = global.gd;
|
||||
|
||||
type Props = TranslatorProps & {|
|
||||
type Props = {|
|
||||
project: gdProject,
|
||||
|};
|
||||
|
||||
@@ -67,7 +66,8 @@ class LocalElectronExport extends Component<Props, State> {
|
||||
};
|
||||
|
||||
launchExport = () => {
|
||||
const { t, project } = this.props;
|
||||
const t = str => str; //TODO;
|
||||
const { project } = this.props;
|
||||
if (!project) return;
|
||||
|
||||
sendExportLaunched('local-electron');
|
||||
@@ -99,7 +99,8 @@ class LocalElectronExport extends Component<Props, State> {
|
||||
};
|
||||
|
||||
render() {
|
||||
const { t, project } = this.props;
|
||||
const t = str => str; //TODO;
|
||||
const { project } = this.props;
|
||||
if (!project) return null;
|
||||
|
||||
return (
|
||||
@@ -167,4 +168,4 @@ class LocalElectronExport extends Component<Props, State> {
|
||||
}
|
||||
}
|
||||
|
||||
export default translate()(LocalElectronExport);
|
||||
export default LocalElectronExport;
|
||||
|
@@ -12,7 +12,6 @@ import localFileSystem from '../LocalFileSystem';
|
||||
import Progress from './Progress';
|
||||
import { archiveFolder } from '../../../Utils/Archiver';
|
||||
import optionalRequire from '../../../Utils/OptionalRequire.js';
|
||||
import { translate, type TranslatorProps } from 'react-i18next';
|
||||
import Window from '../../../Utils/Window';
|
||||
import { getHelpLink } from '../../../Utils/HelpLink';
|
||||
const path = optionalRequire('path');
|
||||
@@ -34,7 +33,7 @@ type State = {|
|
||||
errored: boolean,
|
||||
|};
|
||||
|
||||
type Props = TranslatorProps & {
|
||||
type Props = {
|
||||
project: gdProject,
|
||||
onChangeSubscription: Function,
|
||||
};
|
||||
@@ -78,7 +77,8 @@ class LocalFacebookInstantGamesExport extends Component<Props, State> {
|
||||
};
|
||||
|
||||
launchExport = (): Promise<string> => {
|
||||
const { project, t } = this.props;
|
||||
const t = str => str; //TODO;
|
||||
const { project } = this.props;
|
||||
if (!project) return Promise.reject();
|
||||
|
||||
return LocalFacebookInstantGamesExport.prepareExporter()
|
||||
@@ -105,7 +105,7 @@ class LocalFacebookInstantGamesExport extends Component<Props, State> {
|
||||
};
|
||||
|
||||
launchWholeExport = () => {
|
||||
const { t } = this.props;
|
||||
const t = str => str; //TODO
|
||||
sendExportLaunched('local-facebook-instant-games');
|
||||
|
||||
const handleError = (message: string) => err => {
|
||||
@@ -152,7 +152,8 @@ class LocalFacebookInstantGamesExport extends Component<Props, State> {
|
||||
|
||||
render() {
|
||||
const { exportStep, errored } = this.state;
|
||||
const { project, t } = this.props;
|
||||
const t = str => str; //TODO;
|
||||
const { project } = this.props;
|
||||
if (!project) return null;
|
||||
|
||||
return (
|
||||
@@ -202,4 +203,4 @@ class LocalFacebookInstantGamesExport extends Component<Props, State> {
|
||||
}
|
||||
}
|
||||
|
||||
export default translate()(LocalFacebookInstantGamesExport);
|
||||
export default LocalFacebookInstantGamesExport;
|
||||
|
@@ -25,7 +25,6 @@ import {
|
||||
displayProjectErrorsBox,
|
||||
getErrors,
|
||||
} from '../../../ProjectManager/ProjectErrorsChecker';
|
||||
import { translate, type TranslatorProps } from 'react-i18next';
|
||||
import { type Limit } from '../../../Utils/GDevelopServices/Usage';
|
||||
import BuildsWatcher from '../../Builds/BuildsWatcher';
|
||||
import BuildStepsProgress, {
|
||||
@@ -45,7 +44,7 @@ type State = {
|
||||
errored: boolean,
|
||||
};
|
||||
|
||||
type Props = TranslatorProps & {
|
||||
type Props = {
|
||||
project: gdProject,
|
||||
onChangeSubscription: Function,
|
||||
};
|
||||
@@ -94,7 +93,8 @@ class LocalOnlineCordovaExport extends Component<Props, State> {
|
||||
}
|
||||
|
||||
launchExport = (): Promise<string> => {
|
||||
const { project, t } = this.props;
|
||||
const t = str => str; //TODO;
|
||||
const { project } = this.props;
|
||||
if (!project) return Promise.reject();
|
||||
|
||||
return LocalOnlineCordovaExport.prepareExporter()
|
||||
@@ -170,7 +170,8 @@ class LocalOnlineCordovaExport extends Component<Props, State> {
|
||||
};
|
||||
|
||||
launchWholeExport = (userProfile: UserProfile) => {
|
||||
const { t, project } = this.props;
|
||||
const t = str => str; //TODO;
|
||||
const { project } = this.props;
|
||||
sendExportLaunched('local-online-cordova');
|
||||
|
||||
if (!displayProjectErrorsBox(t, getErrors(t, project))) return;
|
||||
@@ -242,7 +243,8 @@ class LocalOnlineCordovaExport extends Component<Props, State> {
|
||||
uploadProgress,
|
||||
errored,
|
||||
} = this.state;
|
||||
const { project, t } = this.props;
|
||||
const t = str => str; //TODO;
|
||||
const { project } = this.props;
|
||||
if (!project) return null;
|
||||
|
||||
const getBuildLimit = (userProfile: UserProfile): ?Limit =>
|
||||
@@ -307,4 +309,4 @@ class LocalOnlineCordovaExport extends Component<Props, State> {
|
||||
}
|
||||
}
|
||||
|
||||
export default translate()(LocalOnlineCordovaExport);
|
||||
export default LocalOnlineCordovaExport;
|
||||
|
@@ -26,7 +26,6 @@ import {
|
||||
displayProjectErrorsBox,
|
||||
getErrors,
|
||||
} from '../../../ProjectManager/ProjectErrorsChecker';
|
||||
import { translate, type TranslatorProps } from 'react-i18next';
|
||||
import { type Limit } from '../../../Utils/GDevelopServices/Usage';
|
||||
import { type TargetName } from '../../../Utils/GDevelopServices/Build';
|
||||
import BuildsWatcher from '../../Builds/BuildsWatcher';
|
||||
@@ -48,7 +47,7 @@ type State = {
|
||||
targets: Array<TargetName>,
|
||||
};
|
||||
|
||||
type Props = TranslatorProps & {
|
||||
type Props = {
|
||||
project: gdProject,
|
||||
onChangeSubscription: Function,
|
||||
};
|
||||
@@ -98,7 +97,8 @@ class LocalOnlineElectronExport extends Component<Props, State> {
|
||||
}
|
||||
|
||||
launchExport = (): Promise<string> => {
|
||||
const { project, t } = this.props;
|
||||
const t = str => str; //TODO
|
||||
const { project } = this.props;
|
||||
if (!project) return Promise.reject();
|
||||
|
||||
return LocalOnlineElectronExport.prepareExporter()
|
||||
@@ -175,7 +175,8 @@ class LocalOnlineElectronExport extends Component<Props, State> {
|
||||
};
|
||||
|
||||
launchWholeExport = (userProfile: UserProfile) => {
|
||||
const { t, project } = this.props;
|
||||
const t = str => str; //TODO;
|
||||
const { project } = this.props;
|
||||
sendExportLaunched('local-online-electron');
|
||||
|
||||
if (!displayProjectErrorsBox(t, getErrors(t, project))) return;
|
||||
@@ -259,7 +260,8 @@ class LocalOnlineElectronExport extends Component<Props, State> {
|
||||
uploadProgress,
|
||||
errored,
|
||||
} = this.state;
|
||||
const { project, t } = this.props;
|
||||
const t = str => str; //TODO;
|
||||
const { project } = this.props;
|
||||
if (!project) return null;
|
||||
|
||||
const getBuildLimit = (userProfile: UserProfile): ?Limit =>
|
||||
@@ -349,4 +351,4 @@ class LocalOnlineElectronExport extends Component<Props, State> {
|
||||
}
|
||||
}
|
||||
|
||||
export default translate()(LocalOnlineElectronExport);
|
||||
export default LocalOnlineElectronExport;
|
||||
|
@@ -2,6 +2,7 @@
|
||||
import {
|
||||
type JsExtensionsLoader,
|
||||
type ExtensionLoadingResult,
|
||||
type TranslationFunction,
|
||||
loadExtension,
|
||||
} from '.';
|
||||
import ObjectsEditorService from '../ObjectEditor/ObjectsEditorService';
|
||||
@@ -52,7 +53,7 @@ export default function makeExtensionsLoader({
|
||||
filterExamples,
|
||||
}: MakeExtensionsLoaderArguments): JsExtensionsLoader {
|
||||
return {
|
||||
loadAllExtensions(): Promise<
|
||||
loadAllExtensions(_: TranslationFunction): Promise<
|
||||
Array<{ extensionModulePath: string, result: ExtensionLoadingResult }>
|
||||
> {
|
||||
return Promise.resolve(
|
||||
@@ -83,7 +84,7 @@ export default function makeExtensionsLoader({
|
||||
|
||||
return {
|
||||
extensionModulePath: 'internal-extension://' + name,
|
||||
result: loadExtension(gd, gd.JsPlatform.get(), extensionModule),
|
||||
result: loadExtension(_, gd, gd.JsPlatform.get(), extensionModule),
|
||||
};
|
||||
})
|
||||
);
|
||||
|
@@ -6,7 +6,7 @@ const optionalRequire = require('../Utils/OptionalRequire');
|
||||
const { findJsExtensionModules } = require('./LocalJsExtensionsFinder');
|
||||
|
||||
/*flow-include
|
||||
import type {JsExtensionsLoader} from '.';
|
||||
import type {JsExtensionsLoader, TranslationFunction} from '.';
|
||||
import ObjectsEditorService from '../ObjectEditor/ObjectsEditorService';
|
||||
import ObjectsRenderingService from '../ObjectsRendering/ObjectsRenderingService';
|
||||
|
||||
@@ -32,7 +32,7 @@ module.exports = function makeExtensionsLoader(
|
||||
} /*: MakeExtensionsLoaderArguments*/
|
||||
) /*: JsExtensionsLoader*/ {
|
||||
return {
|
||||
loadAllExtensions: () => {
|
||||
loadAllExtensions: (_ /*: TranslationFunction */) => {
|
||||
return findJsExtensionModules({ filterExamples }).then(
|
||||
extensionModulePaths => {
|
||||
return Promise.all(
|
||||
@@ -80,6 +80,7 @@ module.exports = function makeExtensionsLoader(
|
||||
return {
|
||||
extensionModulePath,
|
||||
result: loadExtension(
|
||||
_,
|
||||
gd,
|
||||
gd.JsPlatform.get(),
|
||||
extensionModule
|
||||
|
@@ -2,11 +2,11 @@
|
||||
// Note: this file does not use export/imports and use Flow comments to allow its usage from Node.js
|
||||
|
||||
const some = require('lodash/some');
|
||||
const t = _ => _; //TODO: Implement support for i18n for extensions.
|
||||
|
||||
/*flow-include
|
||||
export type TranslationFunction = (string) => string;
|
||||
|
||||
export type JsExtensionModule = {
|
||||
createExtension(t: (string) => string, gd: any): gdPlatformExtension,
|
||||
createExtension(_: TranslationFunction, gd: any): gdPlatformExtension,
|
||||
runExtensionSanityTests(gd: any, extension: gdPlatformExtension): Array<string>,
|
||||
};
|
||||
|
||||
@@ -18,7 +18,7 @@ export type ExtensionLoadingResult = {
|
||||
};
|
||||
|
||||
export interface JsExtensionsLoader {
|
||||
loadAllExtensions(): Promise<
|
||||
loadAllExtensions(_: TranslationFunction): Promise<
|
||||
Array<{ extensionModulePath: string, result: ExtensionLoadingResult }>
|
||||
>,
|
||||
}
|
||||
@@ -60,6 +60,7 @@ const runExtensionSanityTests = (
|
||||
* to contain a "createExtension" function returning a gd.PlatformExtension.
|
||||
*/
|
||||
const loadExtension = (
|
||||
_ /*: TranslationFunction */,
|
||||
gd /*: any */,
|
||||
platform /*: gdPlatform*/,
|
||||
jsExtensionModule /*: JsExtensionModule*/
|
||||
@@ -74,7 +75,7 @@ const loadExtension = (
|
||||
|
||||
let extension = null;
|
||||
try {
|
||||
extension = jsExtensionModule.createExtension(t, gd);
|
||||
extension = jsExtensionModule.createExtension(_, gd);
|
||||
if (!extension) {
|
||||
return {
|
||||
message: `createExtension did not return any extension. Did you forget to return the extension created?`,
|
||||
|
@@ -22,6 +22,7 @@ import makeExtensionsLoader from './JsExtensionsLoader/LocalJsExtensionsLoader';
|
||||
import { makeLocalEventsFunctionWriter } from './EventsFunctionsExtensionsLoader/LocalEventsFunctionWriter';
|
||||
import ObjectsEditorService from './ObjectEditor/ObjectsEditorService';
|
||||
import ObjectsRenderingService from './ObjectsRendering/ObjectsRenderingService';
|
||||
import Providers from './MainFrame/Providers';
|
||||
const gd = global.gd;
|
||||
|
||||
export const create = (authentification: Authentification) => {
|
||||
@@ -32,51 +33,59 @@ export const create = (authentification: Authentification) => {
|
||||
|
||||
if (appArguments['server-port']) {
|
||||
app = (
|
||||
<ExternalEditor
|
||||
serverPort={appArguments['server-port']}
|
||||
isIntegrated={appArguments['mode'] === 'integrated'}
|
||||
editor={appArguments['editor']}
|
||||
editedElementName={appArguments['edited-element-name']}
|
||||
<Providers
|
||||
authentification={authentification}
|
||||
disableCheckForUpdates={!!appArguments['disable-update-check']}
|
||||
>
|
||||
<MainFrame
|
||||
resourceSources={localResourceSources}
|
||||
authentification={authentification}
|
||||
onReadFromPathOrURL={() => Promise.reject('Should never be called')}
|
||||
resourceExternalEditors={localResourceExternalEditors}
|
||||
initialPathsOrURLsToOpen={[]}
|
||||
disableCheckForUpdates={!!appArguments['disable-update-check']}
|
||||
/>
|
||||
</ExternalEditor>
|
||||
<ExternalEditor
|
||||
serverPort={appArguments['server-port']}
|
||||
isIntegrated={appArguments['mode'] === 'integrated'}
|
||||
editor={appArguments['editor']}
|
||||
editedElementName={appArguments['edited-element-name']}
|
||||
>
|
||||
<MainFrame
|
||||
resourceSources={localResourceSources}
|
||||
authentification={authentification}
|
||||
onReadFromPathOrURL={() => Promise.reject('Should never be called')}
|
||||
resourceExternalEditors={localResourceExternalEditors}
|
||||
initialPathsOrURLsToOpen={[]}
|
||||
/>
|
||||
</ExternalEditor>
|
||||
</Providers>
|
||||
);
|
||||
} else {
|
||||
app = (
|
||||
<ElectronEventsBridge>
|
||||
<MainFrame
|
||||
previewLauncher={<LocalPreviewLauncher />}
|
||||
exportDialog={<ExportDialog exporters={getLocalExporters()} />}
|
||||
createDialog={
|
||||
<CreateProjectDialog
|
||||
examplesComponent={LocalExamples}
|
||||
startersComponent={LocalStarters}
|
||||
/>
|
||||
}
|
||||
onSaveProject={LocalProjectWriter.saveProject}
|
||||
onChooseProject={LocalProjectOpener.chooseProjectFile}
|
||||
onReadFromPathOrURL={LocalProjectOpener.readProjectJSONFile}
|
||||
resourceSources={localResourceSources}
|
||||
resourceExternalEditors={localResourceExternalEditors}
|
||||
authentification={authentification}
|
||||
extensionsLoader={makeExtensionsLoader({
|
||||
gd,
|
||||
objectsEditorService: ObjectsEditorService,
|
||||
objectsRenderingService: ObjectsRenderingService,
|
||||
filterExamples: !Window.isDev(),
|
||||
})}
|
||||
initialPathsOrURLsToOpen={appArguments['_']}
|
||||
disableCheckForUpdates={!!appArguments['disable-update-check']}
|
||||
eventsFunctionWriter={makeLocalEventsFunctionWriter()}
|
||||
/>
|
||||
</ElectronEventsBridge>
|
||||
<Providers
|
||||
authentification={authentification}
|
||||
disableCheckForUpdates={!!appArguments['disable-update-check']}
|
||||
>
|
||||
<ElectronEventsBridge>
|
||||
<MainFrame
|
||||
previewLauncher={<LocalPreviewLauncher />}
|
||||
exportDialog={<ExportDialog exporters={getLocalExporters()} />}
|
||||
createDialog={
|
||||
<CreateProjectDialog
|
||||
examplesComponent={LocalExamples}
|
||||
startersComponent={LocalStarters}
|
||||
/>
|
||||
}
|
||||
onSaveProject={LocalProjectWriter.saveProject}
|
||||
onChooseProject={LocalProjectOpener.chooseProjectFile}
|
||||
onReadFromPathOrURL={LocalProjectOpener.readProjectJSONFile}
|
||||
resourceSources={localResourceSources}
|
||||
resourceExternalEditors={localResourceExternalEditors}
|
||||
authentification={authentification}
|
||||
extensionsLoader={makeExtensionsLoader({
|
||||
gd,
|
||||
objectsEditorService: ObjectsEditorService,
|
||||
objectsRenderingService: ObjectsRenderingService,
|
||||
filterExamples: !Window.isDev(),
|
||||
})}
|
||||
initialPathsOrURLsToOpen={appArguments['_']}
|
||||
eventsFunctionWriter={makeLocalEventsFunctionWriter()}
|
||||
/>
|
||||
</ElectronEventsBridge>
|
||||
</Providers>
|
||||
);
|
||||
}
|
||||
|
||||
|
@@ -9,6 +9,7 @@ import { Line } from '../../../UI/Grid';
|
||||
import GDevelopLogo from './GDevelopLogo';
|
||||
import ScrollBackground from './ScrollBackground';
|
||||
import RaisedButton from 'material-ui/RaisedButton';
|
||||
import { Trans } from '@lingui/macro';
|
||||
|
||||
const styles = {
|
||||
innerContainer: {
|
||||
@@ -77,8 +78,10 @@ class StartPage extends BaseEditor {
|
||||
>
|
||||
<GDevelopLogo />
|
||||
<p>
|
||||
GDevelop is an easy-to-use game creator with no programming
|
||||
language to learn.
|
||||
<Trans>
|
||||
GDevelop is an easy-to-use game creator with no programming
|
||||
language to learn.
|
||||
</Trans>
|
||||
</p>
|
||||
</Paper>
|
||||
{!project && canOpen && (
|
||||
|
@@ -1,15 +1,13 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import DragDropContextProvider from '../Utils/DragDropHelpers/DragDropContextProvider';
|
||||
import { I18nextProvider } from 'react-i18next';
|
||||
import i18n from '../UI/i18n';
|
||||
|
||||
import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider';
|
||||
import { getTheme } from '../UI/Theme';
|
||||
import UserProfileProvider from '../Profile/UserProfileProvider';
|
||||
import Authentification from '../Utils/GDevelopServices/Authentification';
|
||||
import PreferencesProvider from './Preferences/PreferencesProvider';
|
||||
import PreferencesContext from './Preferences/PreferencesContext';
|
||||
import GDI18nProvider from '../Utils/i18n/GDI18nProvider';
|
||||
|
||||
type Props = {|
|
||||
authentification: Authentification,
|
||||
@@ -21,7 +19,7 @@ type Props = {|
|
||||
* Wrap the children with Drag and Drop, Material UI theme and i18n React providers,
|
||||
* so that these modules can be used in the children.
|
||||
*/
|
||||
export default class Providers extends React.Component<Props, *> {
|
||||
export default class Providers extends React.Component<Props, {||}> {
|
||||
render() {
|
||||
const { disableCheckForUpdates, authentification, children } = this.props;
|
||||
return (
|
||||
@@ -29,13 +27,13 @@ export default class Providers extends React.Component<Props, *> {
|
||||
<PreferencesProvider disableCheckForUpdates={disableCheckForUpdates}>
|
||||
<PreferencesContext.Consumer>
|
||||
{({ values }) => (
|
||||
<MuiThemeProvider muiTheme={getTheme(values.themeName)}>
|
||||
<I18nextProvider i18n={i18n}>
|
||||
<GDI18nProvider language="fr">
|
||||
<MuiThemeProvider muiTheme={getTheme(values.themeName)}>
|
||||
<UserProfileProvider authentification={authentification}>
|
||||
{children}
|
||||
</UserProfileProvider>
|
||||
</I18nextProvider>
|
||||
</MuiThemeProvider>
|
||||
</MuiThemeProvider>
|
||||
</GDI18nProvider>
|
||||
)}
|
||||
</PreferencesContext.Consumer>
|
||||
</PreferencesProvider>
|
||||
|
@@ -1,6 +1,5 @@
|
||||
// @flow
|
||||
import React, { PureComponent } from 'react';
|
||||
import { translate, type TranslatorProps } from 'react-i18next';
|
||||
import { Toolbar, ToolbarGroup } from 'material-ui/Toolbar';
|
||||
import ToolbarIcon from '../UI/ToolbarIcon';
|
||||
import ToolbarSeparator from '../UI/ToolbarSeparator';
|
||||
@@ -18,12 +17,12 @@ const styles = {
|
||||
type Props = {
|
||||
showProjectIcons: boolean,
|
||||
hasProject: boolean,
|
||||
toggleProjectManager: boolean,
|
||||
toggleProjectManager: () => void,
|
||||
requestUpdate: ?() => void,
|
||||
simulateUpdateDownloaded: ?() => void,
|
||||
simulateUpdateAvailable: ?() => void,
|
||||
exportProject: Function,
|
||||
} & TranslatorProps;
|
||||
};
|
||||
|
||||
type State = {
|
||||
editorToolbar: any,
|
||||
@@ -43,7 +42,7 @@ export class MainFrameToolbar extends PureComponent<Props, State> {
|
||||
}
|
||||
|
||||
render() {
|
||||
const { t } = this.props;
|
||||
const t = str => str; //TODO
|
||||
|
||||
return (
|
||||
<Toolbar style={styles.toolbar}>
|
||||
@@ -101,4 +100,4 @@ export class MainFrameToolbar extends PureComponent<Props, State> {
|
||||
}
|
||||
}
|
||||
|
||||
export default translate('', { withRef: true })(MainFrameToolbar);
|
||||
export default MainFrameToolbar;
|
||||
|
@@ -2,14 +2,10 @@
|
||||
|
||||
import * as React from 'react';
|
||||
import './MainFrame.css';
|
||||
|
||||
import Providers from './Providers';
|
||||
|
||||
import IconButton from 'material-ui/IconButton';
|
||||
import Drawer from 'material-ui/Drawer';
|
||||
import Snackbar from 'material-ui/Snackbar';
|
||||
import NavigationClose from 'material-ui/svg-icons/navigation/close';
|
||||
|
||||
import Toolbar from './Toolbar';
|
||||
import ProjectTitlebar from './ProjectTitlebar';
|
||||
import PreferencesDialog from './Preferences/PreferencesDialog';
|
||||
@@ -78,6 +74,10 @@ import {
|
||||
import { showWarningBox } from '../UI/Messages/MessageBox';
|
||||
import EmptyMessage from '../UI/EmptyMessage';
|
||||
import ChangelogDialogContainer from './Changelog/ChangelogDialogContainer';
|
||||
import { getNotNullTranslationFunction } from '../Utils/i18n/getTranslationFunction';
|
||||
import { withI18n } from '@lingui/react';
|
||||
import { type I18n } from '@lingui/core';
|
||||
import { t } from '@lingui/macro';
|
||||
|
||||
const gd = global.gd;
|
||||
|
||||
@@ -132,10 +132,12 @@ type Props = {
|
||||
extensionsLoader?: JsExtensionsLoader,
|
||||
initialPathsOrURLsToOpen: ?Array<string>,
|
||||
eventsFunctionWriter?: EventsFunctionWriter,
|
||||
disableCheckForUpdates: boolean,
|
||||
|
||||
// Added by withI18n HOC (https://lingui.js.org/ref/react.html#i18n):
|
||||
i18n: I18n,
|
||||
};
|
||||
|
||||
export default class MainFrame extends React.Component<Props, State> {
|
||||
class MainFrame extends React.Component<Props, State> {
|
||||
state = {
|
||||
createDialogOpen: false,
|
||||
exportDialogOpen: false,
|
||||
@@ -180,10 +182,26 @@ export default class MainFrame extends React.Component<Props, State> {
|
||||
this._openIntroDialog(true);
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps: Props) {
|
||||
// Any change in the language or the i18n configuration
|
||||
// must reload extensions.
|
||||
if (prevProps.i18n !== this.props.i18n) {
|
||||
this.loadExtensions();
|
||||
}
|
||||
}
|
||||
|
||||
loadExtensions = () => {
|
||||
const { extensionsLoader } = this.props;
|
||||
if (extensionsLoader) {
|
||||
extensionsLoader.loadAllExtensions().then(loadingResults => {
|
||||
const { extensionsLoader, i18n } = this.props;
|
||||
if (!extensionsLoader) {
|
||||
console.info(
|
||||
'No extensions loader specified, skipping extensions loading.'
|
||||
);
|
||||
return;
|
||||
}
|
||||
|
||||
extensionsLoader
|
||||
.loadAllExtensions(getNotNullTranslationFunction(i18n))
|
||||
.then(loadingResults => {
|
||||
const successLoadingResults = loadingResults.filter(
|
||||
loadingResult => !loadingResult.result.error
|
||||
);
|
||||
@@ -213,7 +231,6 @@ export default class MainFrame extends React.Component<Props, State> {
|
||||
);
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
loadFromSerializedProject = (
|
||||
@@ -254,6 +271,7 @@ export default class MainFrame extends React.Component<Props, State> {
|
||||
};
|
||||
|
||||
_loadProjectEventsFunctionsExtensions = () => {
|
||||
const {i18n} = this.props;
|
||||
if (this.props.eventsFunctionWriter && this.state.currentProject) {
|
||||
loadProjectEventsFunctionsExtensions(
|
||||
this.state.currentProject,
|
||||
@@ -269,7 +287,7 @@ export default class MainFrame extends React.Component<Props, State> {
|
||||
eventsFunctionsExtensionsError,
|
||||
});
|
||||
showErrorBox(
|
||||
`An error has occured during functions generation.\nIf GDevelop is installed, verify that nothing is preventing GDevelop from writing on disk. If you're running GDevelop online, verify your internet connection and refresh functions from the Project Manager.`,
|
||||
i18n._(t`An error has occured during functions generation. If GDevelop is installed, verify that nothing is preventing GDevelop from writing on disk. If you're running GDevelop online, verify your internet connection and refresh functions from the Project Manager.`),
|
||||
eventsFunctionsExtensionsError
|
||||
);
|
||||
});
|
||||
@@ -277,6 +295,7 @@ export default class MainFrame extends React.Component<Props, State> {
|
||||
};
|
||||
|
||||
openFromPathOrURL = (url: string, cb: Function) => {
|
||||
const {i18n} = this.props;
|
||||
this.props.onReadFromPathOrURL(url).then(
|
||||
projectObject => {
|
||||
this.setState({ loadingProject: true }, () =>
|
||||
@@ -301,7 +320,7 @@ export default class MainFrame extends React.Component<Props, State> {
|
||||
},
|
||||
err => {
|
||||
showErrorBox(
|
||||
'Unable to open this project. Check that the path/URL is correct, that you selected a file that is a game file created with GDevelop and that is was not removed.',
|
||||
i18n._(t`Unable to open this project. Check that the path/URL is correct, that you selected a file that is a game file created with GDevelop and that is was not removed.`),
|
||||
err
|
||||
);
|
||||
return;
|
||||
@@ -360,8 +379,7 @@ export default class MainFrame extends React.Component<Props, State> {
|
||||
setEditorToolbar = (editorToolbar: any) => {
|
||||
if (!this.toolbar) return;
|
||||
|
||||
// $FlowFixMe
|
||||
this.toolbar.getWrappedInstance().setEditorToolbar(editorToolbar);
|
||||
this.toolbar.setEditorToolbar(editorToolbar);
|
||||
};
|
||||
|
||||
addLayout = () => {
|
||||
@@ -423,11 +441,12 @@ export default class MainFrame extends React.Component<Props, State> {
|
||||
|
||||
deleteLayout = (layout: gdLayout) => {
|
||||
const { currentProject } = this.state;
|
||||
const {i18n} = this.props;
|
||||
if (!currentProject) return;
|
||||
|
||||
//eslint-disable-next-line
|
||||
const answer = confirm(
|
||||
"Are you sure you want to remove this scene? This can't be undone."
|
||||
i18n._(t`Are you sure you want to remove this scene? This can't be undone.`)
|
||||
);
|
||||
if (!answer) return;
|
||||
|
||||
@@ -444,11 +463,12 @@ export default class MainFrame extends React.Component<Props, State> {
|
||||
|
||||
deleteExternalLayout = (externalLayout: gdExternalLayout) => {
|
||||
const { currentProject } = this.state;
|
||||
const {i18n} = this.props;
|
||||
if (!currentProject) return;
|
||||
|
||||
//eslint-disable-next-line
|
||||
const answer = confirm(
|
||||
"Are you sure you want to remove this external layout? This can't be undone."
|
||||
i18n._(t`Are you sure you want to remove this external layout? This can't be undone.`)
|
||||
);
|
||||
if (!answer) return;
|
||||
|
||||
@@ -468,11 +488,12 @@ export default class MainFrame extends React.Component<Props, State> {
|
||||
|
||||
deleteExternalEvents = (externalEvents: gdExternalEvents) => {
|
||||
const { currentProject } = this.state;
|
||||
const {i18n} = this.props;
|
||||
if (!currentProject) return;
|
||||
|
||||
//eslint-disable-next-line
|
||||
const answer = confirm(
|
||||
"Are you sure you want to remove these external events? This can't be undone."
|
||||
i18n._(t`Are you sure you want to remove these external events? This can't be undone.`)
|
||||
);
|
||||
if (!answer) return;
|
||||
|
||||
@@ -494,11 +515,12 @@ export default class MainFrame extends React.Component<Props, State> {
|
||||
externalLayout: gdEventsFunctionsExtension
|
||||
) => {
|
||||
const { currentProject } = this.state;
|
||||
const {i18n} = this.props;
|
||||
if (!currentProject) return;
|
||||
|
||||
//eslint-disable-next-line
|
||||
const answer = confirm(
|
||||
"Are you sure you want to remove this extension? This can't be undone."
|
||||
i18n._(t`Are you sure you want to remove this extension? This can't be undone.`)
|
||||
);
|
||||
if (!answer) return;
|
||||
|
||||
@@ -518,12 +540,13 @@ export default class MainFrame extends React.Component<Props, State> {
|
||||
|
||||
renameLayout = (oldName: string, newName: string) => {
|
||||
const { currentProject } = this.state;
|
||||
const {i18n} = this.props;
|
||||
if (!currentProject) return;
|
||||
|
||||
if (!currentProject.hasLayoutNamed(oldName)) return;
|
||||
|
||||
if (currentProject.hasLayoutNamed(newName)) {
|
||||
showWarningBox('Another scene with this name already exists.');
|
||||
showWarningBox(i18n._(t`Another scene with this name already exists.`));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -541,12 +564,13 @@ export default class MainFrame extends React.Component<Props, State> {
|
||||
|
||||
renameExternalLayout = (oldName: string, newName: string) => {
|
||||
const { currentProject } = this.state;
|
||||
const { i18n } = this.props;
|
||||
if (!currentProject) return;
|
||||
|
||||
if (!currentProject.hasExternalLayoutNamed(oldName)) return;
|
||||
|
||||
if (currentProject.hasExternalLayoutNamed(newName)) {
|
||||
showWarningBox('Another external layout with this name already exists.');
|
||||
showWarningBox(i18n._(t`Another external layout with this name already exists.`));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -567,12 +591,13 @@ export default class MainFrame extends React.Component<Props, State> {
|
||||
|
||||
renameExternalEvents = (oldName: string, newName: string) => {
|
||||
const { currentProject } = this.state;
|
||||
const { i18n } = this.props;
|
||||
if (!currentProject) return;
|
||||
|
||||
if (!currentProject.hasExternalEventsNamed(oldName)) return;
|
||||
|
||||
if (currentProject.hasExternalEventsNamed(newName)) {
|
||||
showWarningBox('Other external events with this name already exist.');
|
||||
showWarningBox(i18n._(t`Other external events with this name already exist.`));
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -593,19 +618,20 @@ export default class MainFrame extends React.Component<Props, State> {
|
||||
|
||||
renameEventsFunctionsExtension = (oldName: string, newName: string) => {
|
||||
const { currentProject } = this.state;
|
||||
const {i18n} = this.props;
|
||||
const { eventsFunctionWriter } = this.props;
|
||||
if (!currentProject) return;
|
||||
|
||||
if (!currentProject.hasEventsFunctionsExtensionNamed(oldName)) return;
|
||||
|
||||
if (currentProject.hasEventsFunctionsExtensionNamed(newName)) {
|
||||
showWarningBox('Another extension with this name already exists.');
|
||||
showWarningBox(i18n._(t`Another extension with this name already exists.`));
|
||||
return;
|
||||
}
|
||||
|
||||
if (!gd.Project.validateObjectName(newName)) {
|
||||
showWarningBox(
|
||||
'This name contains forbidden characters: please only use alphanumeric characters (0-9, a-z) and underscores in your extension name.'
|
||||
i18n._(t`This name contains forbidden characters: please only use alphanumeric characters (0-9, a-z) and underscores in your extension name.`)
|
||||
);
|
||||
return;
|
||||
}
|
||||
@@ -672,11 +698,12 @@ export default class MainFrame extends React.Component<Props, State> {
|
||||
|
||||
_handlePreviewResult = (previewPromise: ?Promise<any>): Promise<void> => {
|
||||
if (!previewPromise) return Promise.reject();
|
||||
const { i18n } = this.props;
|
||||
|
||||
return previewPromise.then(
|
||||
(result: any) => {},
|
||||
(err: any) => {
|
||||
showErrorBox('Unable to launch the preview!', err);
|
||||
showErrorBox(i18n._(t`Unable to launch the preview!`), err);
|
||||
}
|
||||
);
|
||||
};
|
||||
@@ -688,6 +715,7 @@ export default class MainFrame extends React.Component<Props, State> {
|
||||
openSceneEditor = true,
|
||||
}: { openEventsEditor: boolean, openSceneEditor: boolean } = {}
|
||||
) => {
|
||||
const { i18n } = this.props;
|
||||
const sceneEditorOptions = {
|
||||
name,
|
||||
renderEditor: ({ isActive, editorRef }) => (
|
||||
@@ -713,7 +741,7 @@ export default class MainFrame extends React.Component<Props, State> {
|
||||
key: 'layout ' + name,
|
||||
};
|
||||
const eventsEditorOptions = {
|
||||
name: name + ' (Events)',
|
||||
name: name + ' ' + i18n._(t`(Events)`),
|
||||
renderEditor: ({ isActive, editorRef }) => (
|
||||
<EventsEditor
|
||||
project={this.state.currentProject}
|
||||
@@ -853,10 +881,11 @@ export default class MainFrame extends React.Component<Props, State> {
|
||||
};
|
||||
|
||||
openResources = () => {
|
||||
const { i18n } = this.props;
|
||||
this.setState(
|
||||
{
|
||||
editorTabs: openEditorTab(this.state.editorTabs, {
|
||||
name: 'Resources',
|
||||
name: i18n._(t`Resources`),
|
||||
renderEditor: ({ isActive, editorRef }) => (
|
||||
<ResourcesEditor
|
||||
project={this.state.currentProject}
|
||||
@@ -887,10 +916,11 @@ export default class MainFrame extends React.Component<Props, State> {
|
||||
};
|
||||
|
||||
openStartPage = () => {
|
||||
const { i18n } = this.props;
|
||||
this.setState(
|
||||
{
|
||||
editorTabs: openEditorTab(this.state.editorTabs, {
|
||||
name: 'Start Page',
|
||||
name: i18n._(t`Start Page`),
|
||||
renderEditor: ({ isActive, editorRef }) => (
|
||||
<StartPage
|
||||
project={this.state.currentProject}
|
||||
@@ -915,10 +945,11 @@ export default class MainFrame extends React.Component<Props, State> {
|
||||
};
|
||||
|
||||
openDebugger = () => {
|
||||
const { i18n } = this.props;
|
||||
this.setState(
|
||||
{
|
||||
editorTabs: openEditorTab(this.state.editorTabs, {
|
||||
name: 'Debugger',
|
||||
name: i18n._(t`Debugger`),
|
||||
renderEditor: ({ isActive, editorRef }) => (
|
||||
<DebuggerEditor
|
||||
project={this.state.currentProject}
|
||||
@@ -959,17 +990,20 @@ export default class MainFrame extends React.Component<Props, State> {
|
||||
save = () => {
|
||||
saveUiSettings(this.state.editorTabs);
|
||||
if (!this.state.currentProject) return;
|
||||
const { i18n } = this.props;
|
||||
|
||||
if (this.props.saveDialog) {
|
||||
this._openSaveDialog();
|
||||
} else if (this.props.onSaveProject) {
|
||||
this.props.onSaveProject(this.state.currentProject).then(
|
||||
() => {
|
||||
this._showSnackMessage('Project properly saved');
|
||||
this._showSnackMessage(i18n._(t`Project properly saved`));
|
||||
},
|
||||
err => {
|
||||
showErrorBox(
|
||||
'Unable to save the project! Please try again by choosing another location.',
|
||||
i18n._(
|
||||
t`Unable to save the project! Please try again by choosing another location.`
|
||||
),
|
||||
err
|
||||
);
|
||||
}
|
||||
@@ -979,10 +1013,13 @@ export default class MainFrame extends React.Component<Props, State> {
|
||||
|
||||
askToCloseProject = (cb: ?Function) => {
|
||||
if (!this.state.currentProject) return;
|
||||
const { i18n } = this.props;
|
||||
|
||||
//eslint-disable-next-line
|
||||
const answer = confirm(
|
||||
'Close the project? Any changes that have not been saved will be lost.'
|
||||
i18n._(
|
||||
t`Close the project? Any changes that have not been saved will be lost.`
|
||||
)
|
||||
);
|
||||
if (!answer) return;
|
||||
|
||||
@@ -1171,7 +1208,6 @@ export default class MainFrame extends React.Component<Props, State> {
|
||||
authentification,
|
||||
previewLauncher,
|
||||
resourceExternalEditors,
|
||||
disableCheckForUpdates,
|
||||
} = this.props;
|
||||
const showLoader =
|
||||
this.state.loadingProject ||
|
||||
@@ -1179,222 +1215,215 @@ export default class MainFrame extends React.Component<Props, State> {
|
||||
this.props.loading;
|
||||
|
||||
return (
|
||||
<Providers
|
||||
authentification={authentification}
|
||||
disableCheckForUpdates={disableCheckForUpdates}
|
||||
>
|
||||
<div className="main-frame">
|
||||
<ProjectTitlebar project={currentProject} />
|
||||
<Drawer
|
||||
open={projectManagerOpen}
|
||||
containerStyle={styles.drawerContent}
|
||||
width={320}
|
||||
>
|
||||
<EditorBar
|
||||
title={currentProject ? currentProject.getName() : 'No project'}
|
||||
showMenuIconButton={false}
|
||||
iconElementRight={
|
||||
<IconButton onClick={this.toggleProjectManager}>
|
||||
<NavigationClose />
|
||||
</IconButton>
|
||||
<div className="main-frame">
|
||||
<ProjectTitlebar project={currentProject} />
|
||||
<Drawer
|
||||
open={projectManagerOpen}
|
||||
containerStyle={styles.drawerContent}
|
||||
width={320}
|
||||
>
|
||||
<EditorBar
|
||||
title={currentProject ? currentProject.getName() : 'No project'}
|
||||
showMenuIconButton={false}
|
||||
iconElementRight={
|
||||
<IconButton onClick={this.toggleProjectManager}>
|
||||
<NavigationClose />
|
||||
</IconButton>
|
||||
}
|
||||
/>
|
||||
{currentProject && (
|
||||
<ProjectManager
|
||||
project={currentProject}
|
||||
onOpenExternalEvents={this.openExternalEvents}
|
||||
onOpenLayout={this.openLayout}
|
||||
onOpenExternalLayout={this.openExternalLayout}
|
||||
onOpenEventsFunctionsExtension={this.openEventsFunctionsExtension}
|
||||
onAddLayout={this.addLayout}
|
||||
onAddExternalLayout={this.addExternalLayout}
|
||||
onAddEventsFunctionsExtension={this.addEventsFunctionsExtension}
|
||||
onAddExternalEvents={this.addExternalEvents}
|
||||
onDeleteLayout={this.deleteLayout}
|
||||
onDeleteExternalLayout={this.deleteExternalLayout}
|
||||
onDeleteEventsFunctionsExtension={
|
||||
this.deleteEventsFunctionsExtension
|
||||
}
|
||||
/>
|
||||
{currentProject && (
|
||||
<ProjectManager
|
||||
project={currentProject}
|
||||
onOpenExternalEvents={this.openExternalEvents}
|
||||
onOpenLayout={this.openLayout}
|
||||
onOpenExternalLayout={this.openExternalLayout}
|
||||
onOpenEventsFunctionsExtension={
|
||||
this.openEventsFunctionsExtension
|
||||
}
|
||||
onAddLayout={this.addLayout}
|
||||
onAddExternalLayout={this.addExternalLayout}
|
||||
onAddEventsFunctionsExtension={this.addEventsFunctionsExtension}
|
||||
onAddExternalEvents={this.addExternalEvents}
|
||||
onDeleteLayout={this.deleteLayout}
|
||||
onDeleteExternalLayout={this.deleteExternalLayout}
|
||||
onDeleteEventsFunctionsExtension={
|
||||
this.deleteEventsFunctionsExtension
|
||||
}
|
||||
onDeleteExternalEvents={this.deleteExternalEvents}
|
||||
onRenameLayout={this.renameLayout}
|
||||
onRenameExternalLayout={this.renameExternalLayout}
|
||||
onRenameEventsFunctionsExtension={
|
||||
this.renameEventsFunctionsExtension
|
||||
}
|
||||
onRenameExternalEvents={this.renameExternalEvents}
|
||||
onSaveProject={this.save}
|
||||
onCloseProject={this.askToCloseProject}
|
||||
onExportProject={this.openExportDialog}
|
||||
onOpenPreferences={() => this.openPreferences(true)}
|
||||
onOpenResources={() => {
|
||||
this.openResources();
|
||||
this.openProjectManager(false);
|
||||
}}
|
||||
onOpenPlatformSpecificAssets={() =>
|
||||
this.openPlatformSpecificAssets()
|
||||
}
|
||||
onChangeSubscription={() => this.openSubscription(true)}
|
||||
eventsFunctionsExtensionsError={eventsFunctionsExtensionsError}
|
||||
onReloadEventsFunctionsExtensions={
|
||||
this._loadProjectEventsFunctionsExtensions
|
||||
}
|
||||
freezeUpdate={!projectManagerOpen}
|
||||
/>
|
||||
)}
|
||||
{!currentProject && (
|
||||
<EmptyMessage>
|
||||
To begin, open or create a new project.
|
||||
</EmptyMessage>
|
||||
)}
|
||||
</Drawer>
|
||||
<Toolbar
|
||||
ref={toolbar => (this.toolbar = toolbar)}
|
||||
showProjectIcons={!this.props.integratedEditor}
|
||||
hasProject={!!this.state.currentProject}
|
||||
toggleProjectManager={this.toggleProjectManager}
|
||||
exportProject={() => this.openExportDialog(true)}
|
||||
requestUpdate={this.props.requestUpdate}
|
||||
simulateUpdateDownloaded={this.simulateUpdateDownloaded}
|
||||
simulateUpdateAvailable={this.simulateUpdateAvailable}
|
||||
/>
|
||||
<Tabs
|
||||
value={getCurrentTabIndex(this.state.editorTabs)}
|
||||
onChange={this._onChangeEditorTab}
|
||||
hideLabels={!!this.props.integratedEditor}
|
||||
>
|
||||
{getEditors(this.state.editorTabs).map((editorTab, id) => {
|
||||
const isCurrentTab =
|
||||
getCurrentTabIndex(this.state.editorTabs) === id;
|
||||
return (
|
||||
<Tab
|
||||
label={editorTab.name}
|
||||
value={id}
|
||||
key={editorTab.key}
|
||||
onActive={() => this._onEditorTabActive(editorTab)}
|
||||
onClose={() => this._onCloseEditorTab(editorTab)}
|
||||
closable={editorTab.closable}
|
||||
>
|
||||
<div style={{ display: 'flex', flex: 1, height: '100%' }}>
|
||||
<ErrorBoundary>
|
||||
{editorTab.render(isCurrentTab)}
|
||||
</ErrorBoundary>
|
||||
</div>
|
||||
</Tab>
|
||||
);
|
||||
})}
|
||||
</Tabs>
|
||||
<LoaderModal show={showLoader} />
|
||||
<HelpFinder
|
||||
open={helpFinderDialogOpen}
|
||||
onClose={() => this.openHelpFinderDialog(false)}
|
||||
/>
|
||||
<Snackbar
|
||||
open={this.state.snackMessageOpen}
|
||||
message={this.state.snackMessage}
|
||||
autoHideDuration={3000}
|
||||
onRequestClose={this._closeSnackMessage}
|
||||
/>
|
||||
{!!exportDialog &&
|
||||
React.cloneElement(exportDialog, {
|
||||
open: this.state.exportDialogOpen,
|
||||
onClose: () => this.openExportDialog(false),
|
||||
onChangeSubscription: () => {
|
||||
this.openExportDialog(false);
|
||||
this.openSubscription(true);
|
||||
},
|
||||
project: this.state.currentProject,
|
||||
authentification,
|
||||
})}
|
||||
{!!createDialog &&
|
||||
React.cloneElement(createDialog, {
|
||||
open: this.state.createDialogOpen,
|
||||
onClose: () => this.openCreateDialog(false),
|
||||
onOpen: filepath => {
|
||||
this.openCreateDialog(false);
|
||||
this.openFromPathOrURL(filepath, () =>
|
||||
this.openSceneOrProjectManager()
|
||||
);
|
||||
},
|
||||
onCreate: project => {
|
||||
this.openCreateDialog(false);
|
||||
this.loadFromProject(project, () =>
|
||||
this.openSceneOrProjectManager()
|
||||
);
|
||||
},
|
||||
})}
|
||||
{!!introDialog &&
|
||||
React.cloneElement(introDialog, {
|
||||
open: this.state.introDialogOpen,
|
||||
onClose: () => this._openIntroDialog(false),
|
||||
})}
|
||||
{!!saveDialog &&
|
||||
React.cloneElement(saveDialog, {
|
||||
project: this.state.currentProject,
|
||||
open: this.state.saveDialogOpen,
|
||||
onClose: () => this._openSaveDialog(false),
|
||||
})}
|
||||
{!!this.state.currentProject && (
|
||||
<PlatformSpecificAssetsDialog
|
||||
project={this.state.currentProject}
|
||||
open={this.state.platformSpecificAssetsDialogOpen}
|
||||
onApply={() => this.openPlatformSpecificAssets(false)}
|
||||
onClose={() => this.openPlatformSpecificAssets(false)}
|
||||
resourceSources={resourceSources}
|
||||
onChooseResource={this._onChooseResource}
|
||||
resourceExternalEditors={resourceExternalEditors}
|
||||
onDeleteExternalEvents={this.deleteExternalEvents}
|
||||
onRenameLayout={this.renameLayout}
|
||||
onRenameExternalLayout={this.renameExternalLayout}
|
||||
onRenameEventsFunctionsExtension={
|
||||
this.renameEventsFunctionsExtension
|
||||
}
|
||||
onRenameExternalEvents={this.renameExternalEvents}
|
||||
onSaveProject={this.save}
|
||||
onCloseProject={this.askToCloseProject}
|
||||
onExportProject={this.openExportDialog}
|
||||
onOpenPreferences={() => this.openPreferences(true)}
|
||||
onOpenResources={() => {
|
||||
this.openResources();
|
||||
this.openProjectManager(false);
|
||||
}}
|
||||
onOpenPlatformSpecificAssets={() =>
|
||||
this.openPlatformSpecificAssets()
|
||||
}
|
||||
onChangeSubscription={() => this.openSubscription(true)}
|
||||
eventsFunctionsExtensionsError={eventsFunctionsExtensionsError}
|
||||
onReloadEventsFunctionsExtensions={
|
||||
this._loadProjectEventsFunctionsExtensions
|
||||
}
|
||||
freezeUpdate={!projectManagerOpen}
|
||||
/>
|
||||
)}
|
||||
{!!genericDialog &&
|
||||
React.cloneElement(genericDialog, {
|
||||
open: this.state.genericDialogOpen,
|
||||
onClose: () => this._openGenericDialog(false),
|
||||
})}
|
||||
{!!previewLauncher &&
|
||||
React.cloneElement(previewLauncher, {
|
||||
ref: (previewLauncher: ?PreviewLauncher) =>
|
||||
(this._previewLauncher = previewLauncher),
|
||||
onExport: () => this.openExportDialog(true),
|
||||
onChangeSubscription: () => this.openSubscription(true),
|
||||
})}
|
||||
{resourceSources.map((resourceSource, index) => {
|
||||
// $FlowFixMe
|
||||
const Component = resourceSource.component;
|
||||
{!currentProject && (
|
||||
<EmptyMessage>To begin, open or create a new project.</EmptyMessage>
|
||||
)}
|
||||
</Drawer>
|
||||
<Toolbar
|
||||
ref={toolbar => (this.toolbar = toolbar)}
|
||||
showProjectIcons={!this.props.integratedEditor}
|
||||
hasProject={!!this.state.currentProject}
|
||||
toggleProjectManager={this.toggleProjectManager}
|
||||
exportProject={() => this.openExportDialog(true)}
|
||||
requestUpdate={this.props.requestUpdate}
|
||||
simulateUpdateDownloaded={this.simulateUpdateDownloaded}
|
||||
simulateUpdateAvailable={this.simulateUpdateAvailable}
|
||||
/>
|
||||
<Tabs
|
||||
value={getCurrentTabIndex(this.state.editorTabs)}
|
||||
onChange={this._onChangeEditorTab}
|
||||
hideLabels={!!this.props.integratedEditor}
|
||||
>
|
||||
{getEditors(this.state.editorTabs).map((editorTab, id) => {
|
||||
const isCurrentTab =
|
||||
getCurrentTabIndex(this.state.editorTabs) === id;
|
||||
return (
|
||||
// $FlowFixMe
|
||||
<Component
|
||||
key={resourceSource.name}
|
||||
ref={dialog =>
|
||||
(this._resourceSourceDialogs[resourceSource.name] = dialog)
|
||||
}
|
||||
/>
|
||||
<Tab
|
||||
label={editorTab.name}
|
||||
value={id}
|
||||
key={editorTab.key}
|
||||
onActive={() => this._onEditorTabActive(editorTab)}
|
||||
onClose={() => this._onCloseEditorTab(editorTab)}
|
||||
closable={editorTab.closable}
|
||||
>
|
||||
<div style={{ display: 'flex', flex: 1, height: '100%' }}>
|
||||
<ErrorBoundary>
|
||||
{editorTab.render(isCurrentTab)}
|
||||
</ErrorBoundary>
|
||||
</div>
|
||||
</Tab>
|
||||
);
|
||||
})}
|
||||
<ProfileDialog
|
||||
open={profileDialogOpen}
|
||||
onClose={() => this.openProfile(false)}
|
||||
onChangeSubscription={() => this.openSubscription(true)}
|
||||
</Tabs>
|
||||
<LoaderModal show={showLoader} />
|
||||
<HelpFinder
|
||||
open={helpFinderDialogOpen}
|
||||
onClose={() => this.openHelpFinderDialog(false)}
|
||||
/>
|
||||
<Snackbar
|
||||
open={this.state.snackMessageOpen}
|
||||
message={this.state.snackMessage}
|
||||
autoHideDuration={3000}
|
||||
onRequestClose={this._closeSnackMessage}
|
||||
/>
|
||||
{!!exportDialog &&
|
||||
React.cloneElement(exportDialog, {
|
||||
open: this.state.exportDialogOpen,
|
||||
onClose: () => this.openExportDialog(false),
|
||||
onChangeSubscription: () => {
|
||||
this.openExportDialog(false);
|
||||
this.openSubscription(true);
|
||||
},
|
||||
project: this.state.currentProject,
|
||||
authentification,
|
||||
})}
|
||||
{!!createDialog &&
|
||||
React.cloneElement(createDialog, {
|
||||
open: this.state.createDialogOpen,
|
||||
onClose: () => this.openCreateDialog(false),
|
||||
onOpen: filepath => {
|
||||
this.openCreateDialog(false);
|
||||
this.openFromPathOrURL(filepath, () =>
|
||||
this.openSceneOrProjectManager()
|
||||
);
|
||||
},
|
||||
onCreate: project => {
|
||||
this.openCreateDialog(false);
|
||||
this.loadFromProject(project, () =>
|
||||
this.openSceneOrProjectManager()
|
||||
);
|
||||
},
|
||||
})}
|
||||
{!!introDialog &&
|
||||
React.cloneElement(introDialog, {
|
||||
open: this.state.introDialogOpen,
|
||||
onClose: () => this._openIntroDialog(false),
|
||||
})}
|
||||
{!!saveDialog &&
|
||||
React.cloneElement(saveDialog, {
|
||||
project: this.state.currentProject,
|
||||
open: this.state.saveDialogOpen,
|
||||
onClose: () => this._openSaveDialog(false),
|
||||
})}
|
||||
{!!this.state.currentProject && (
|
||||
<PlatformSpecificAssetsDialog
|
||||
project={this.state.currentProject}
|
||||
open={this.state.platformSpecificAssetsDialogOpen}
|
||||
onApply={() => this.openPlatformSpecificAssets(false)}
|
||||
onClose={() => this.openPlatformSpecificAssets(false)}
|
||||
resourceSources={resourceSources}
|
||||
onChooseResource={this._onChooseResource}
|
||||
resourceExternalEditors={resourceExternalEditors}
|
||||
/>
|
||||
<SubscriptionDialog
|
||||
onClose={() => {
|
||||
this.openSubscription(false);
|
||||
}}
|
||||
open={subscriptionDialogOpen}
|
||||
/>
|
||||
<PreferencesDialog
|
||||
open={this.state.preferencesDialogOpen}
|
||||
onClose={() => this.openPreferences(false)}
|
||||
/>
|
||||
<AboutDialog
|
||||
open={aboutDialogOpen}
|
||||
onClose={() => this.openAboutDialog(false)}
|
||||
updateStatus={updateStatus}
|
||||
/>
|
||||
<CloseConfirmDialog shouldPrompt={!!this.state.currentProject} />
|
||||
<ChangelogDialogContainer />
|
||||
</div>
|
||||
</Providers>
|
||||
)}
|
||||
{!!genericDialog &&
|
||||
React.cloneElement(genericDialog, {
|
||||
open: this.state.genericDialogOpen,
|
||||
onClose: () => this._openGenericDialog(false),
|
||||
})}
|
||||
{!!previewLauncher &&
|
||||
React.cloneElement(previewLauncher, {
|
||||
ref: (previewLauncher: ?PreviewLauncher) =>
|
||||
(this._previewLauncher = previewLauncher),
|
||||
onExport: () => this.openExportDialog(true),
|
||||
onChangeSubscription: () => this.openSubscription(true),
|
||||
})}
|
||||
{resourceSources.map((resourceSource, index) => {
|
||||
// $FlowFixMe
|
||||
const Component = resourceSource.component;
|
||||
return (
|
||||
// $FlowFixMe
|
||||
<Component
|
||||
key={resourceSource.name}
|
||||
ref={dialog =>
|
||||
(this._resourceSourceDialogs[resourceSource.name] = dialog)
|
||||
}
|
||||
/>
|
||||
);
|
||||
})}
|
||||
<ProfileDialog
|
||||
open={profileDialogOpen}
|
||||
onClose={() => this.openProfile(false)}
|
||||
onChangeSubscription={() => this.openSubscription(true)}
|
||||
/>
|
||||
<SubscriptionDialog
|
||||
onClose={() => {
|
||||
this.openSubscription(false);
|
||||
}}
|
||||
open={subscriptionDialogOpen}
|
||||
/>
|
||||
<PreferencesDialog
|
||||
open={this.state.preferencesDialogOpen}
|
||||
onClose={() => this.openPreferences(false)}
|
||||
/>
|
||||
<AboutDialog
|
||||
open={aboutDialogOpen}
|
||||
onClose={() => this.openAboutDialog(false)}
|
||||
updateStatus={updateStatus}
|
||||
/>
|
||||
<CloseConfirmDialog shouldPrompt={!!this.state.currentProject} />
|
||||
<ChangelogDialogContainer />
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
export default withI18n()(MainFrame);
|
||||
|
@@ -1,5 +1,4 @@
|
||||
// @flow
|
||||
import { type TFunction } from 'react-i18next';
|
||||
import { showErrorBox } from '../UI/Messages/MessageBox';
|
||||
import values from 'lodash/values';
|
||||
|
||||
@@ -13,6 +12,8 @@ export type ProjectErrors = {
|
||||
[string]: Array<ProjectError>,
|
||||
};
|
||||
|
||||
type TFunction = string => string; //TODO
|
||||
|
||||
export const getErrors = (t: TFunction, project: gdProject): ProjectErrors => {
|
||||
const errors: ProjectErrors = {};
|
||||
|
||||
|
@@ -7,11 +7,10 @@ import MenuItem from 'material-ui/MenuItem';
|
||||
import Dialog from '../UI/Dialog';
|
||||
import SemiControlledTextField from '../UI/SemiControlledTextField';
|
||||
import SubscriptionChecker from '../Profile/SubscriptionChecker';
|
||||
import { translate, type TranslatorProps } from 'react-i18next';
|
||||
import { getErrors, displayProjectErrorsBox } from './ProjectErrorsChecker';
|
||||
import DismissableAlertMessage from '../UI/DismissableAlertMessage';
|
||||
|
||||
type Props = TranslatorProps & {|
|
||||
type Props = {|
|
||||
project: gdProject,
|
||||
open: boolean,
|
||||
onClose: Function,
|
||||
@@ -67,7 +66,8 @@ class ProjectPropertiesDialog extends React.Component<Props, State> {
|
||||
}
|
||||
|
||||
_onApply = () => {
|
||||
const { project, t } = this.props;
|
||||
const t = str => str; //TODO
|
||||
const { project } = this.props;
|
||||
const {
|
||||
windowDefaultWidth,
|
||||
windowDefaultHeight,
|
||||
@@ -284,4 +284,4 @@ class ProjectPropertiesDialog extends React.Component<Props, State> {
|
||||
}
|
||||
}
|
||||
|
||||
export default translate()(ProjectPropertiesDialog);
|
||||
export default ProjectPropertiesDialog;
|
||||
|
@@ -1,6 +1,5 @@
|
||||
// @flow
|
||||
import React, { PureComponent } from 'react';
|
||||
import { translate, type TranslatorProps } from 'react-i18next';
|
||||
import { ToolbarGroup } from 'material-ui/Toolbar';
|
||||
import ToolbarIcon from '../UI/ToolbarIcon';
|
||||
import ToolbarSeparator from '../UI/ToolbarSeparator';
|
||||
@@ -9,13 +8,14 @@ type Props = {|
|
||||
onDeleteSelection: () => void,
|
||||
canDelete: boolean,
|
||||
onOpenProperties: () => void,
|
||||
|} & TranslatorProps;
|
||||
|};
|
||||
|
||||
type State = {||};
|
||||
|
||||
export class Toolbar extends PureComponent<Props, State> {
|
||||
render() {
|
||||
const { t, canDelete } = this.props;
|
||||
const t = str => str; //TODO
|
||||
const { canDelete } = this.props;
|
||||
|
||||
return (
|
||||
<ToolbarGroup lastChild>
|
||||
@@ -36,4 +36,4 @@ export class Toolbar extends PureComponent<Props, State> {
|
||||
}
|
||||
}
|
||||
|
||||
export default translate()(Toolbar);
|
||||
export default Toolbar;
|
||||
|
@@ -47,15 +47,6 @@ type Props = {|
|
||||
|};
|
||||
|
||||
export default class ResourcesList extends React.Component<Props, State> {
|
||||
static defaultProps = {
|
||||
onDeleteResource: (resource: gdResource, cb: boolean => void) => cb(true),
|
||||
onRenameResource: (
|
||||
resource: gdResource,
|
||||
newName: string,
|
||||
cb: boolean => void
|
||||
) => cb(true),
|
||||
};
|
||||
|
||||
sortableList: any;
|
||||
state: State = {
|
||||
renamedResource: null,
|
||||
|
@@ -1,14 +1,13 @@
|
||||
import React, { PureComponent } from 'react';
|
||||
import { translate } from 'react-i18next';
|
||||
import { ToolbarGroup } from 'material-ui/Toolbar';
|
||||
import ToolbarSeparator from '../UI/ToolbarSeparator';
|
||||
import ToolbarIcon from '../UI/ToolbarIcon';
|
||||
import IconMenu from '../UI/Menu/IconMenu';
|
||||
|
||||
const t = str => str; //TODO
|
||||
|
||||
export class Toolbar extends PureComponent {
|
||||
render() {
|
||||
const { t } = this.props;
|
||||
|
||||
return (
|
||||
<ToolbarGroup lastChild>
|
||||
{this.props.showPreviewButton && (
|
||||
@@ -155,4 +154,4 @@ export class Toolbar extends PureComponent {
|
||||
}
|
||||
}
|
||||
|
||||
export default translate()(Toolbar);
|
||||
export default Toolbar;
|
||||
|
@@ -1,15 +0,0 @@
|
||||
import i18n from 'i18next';
|
||||
|
||||
i18n.init({
|
||||
fallbackLng: 'en',
|
||||
|
||||
// allow keys to be phrases having `:`, `.`
|
||||
nsSeparator: false,
|
||||
keySeparator: false,
|
||||
|
||||
interpolation: {
|
||||
escapeValue: false, // Not needed for react
|
||||
},
|
||||
});
|
||||
|
||||
export default i18n;
|
88
newIDE/app/src/Utils/i18n/GDI18nProvider.js
Normal file
88
newIDE/app/src/Utils/i18n/GDI18nProvider.js
Normal file
@@ -0,0 +1,88 @@
|
||||
// @flow
|
||||
import * as React from 'react';
|
||||
import { I18nProvider } from '@lingui/react';
|
||||
import { setupI18n } from '@lingui/core';
|
||||
import catalogEn from '../../locales/en/messages';
|
||||
import catalogFr from '../../locales/fr/messages';
|
||||
import { getTranslationFunction } from './getTranslationFunction';
|
||||
const gd = global.gd;
|
||||
|
||||
type Catalog = any;
|
||||
type Catalogs = {
|
||||
[string]: Catalog,
|
||||
};
|
||||
|
||||
type Props = {|
|
||||
language: string,
|
||||
children: React.Node,
|
||||
|};
|
||||
|
||||
type State = {
|
||||
i18n: ?any, //TODO
|
||||
catalogs: Catalogs,
|
||||
};
|
||||
|
||||
export default class GDI18nProvider extends React.Component<Props, State> {
|
||||
state = {
|
||||
catalogs: { en: catalogEn, fr: catalogFr },
|
||||
i18n: null,
|
||||
};
|
||||
|
||||
componentDidMount() {
|
||||
this._loadLanguage(this.props.language);
|
||||
}
|
||||
|
||||
componentDidUpdate(prevProps: Props) {
|
||||
if (prevProps.language !== this.props.language) {
|
||||
this._loadLanguage(this.props.language);
|
||||
}
|
||||
}
|
||||
|
||||
_loadCatalog = (language: string): Promise<Catalogs> => {
|
||||
if (this.state.catalogs[language]) {
|
||||
return Promise.resolve(this.state.catalogs);
|
||||
}
|
||||
|
||||
return import(/* webpackMode: "lazy", webpackChunkName: "locales-[index]-messages" */
|
||||
`../../locales/${language}/messages`).then(
|
||||
catalog => {
|
||||
return { ...this.state.catalogs, [language]: catalog };
|
||||
},
|
||||
(error: Error) => {
|
||||
console.error('Error while loading language=' + language, error);
|
||||
return this.state.catalogs;
|
||||
}
|
||||
);
|
||||
};
|
||||
|
||||
_loadLanguage(language: string) {
|
||||
this._loadCatalog(language).then(catalogs => {
|
||||
this.setState(
|
||||
{
|
||||
catalogs,
|
||||
i18n: setupI18n({
|
||||
language: language,
|
||||
catalogs,
|
||||
}),
|
||||
},
|
||||
() => {
|
||||
const { i18n } = this.state;
|
||||
gd.getTranslation = getTranslationFunction(i18n);
|
||||
}
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
render() {
|
||||
const { i18n } = this.state;
|
||||
const { language, children } = this.props;
|
||||
|
||||
if (!i18n) return null; // Skip rendering when catalog isn't loaded.
|
||||
|
||||
return (
|
||||
<I18nProvider i18n={i18n} language={language}>
|
||||
{children}
|
||||
</I18nProvider>
|
||||
);
|
||||
}
|
||||
}
|
37
newIDE/app/src/Utils/i18n/getTranslationFunction.js
Normal file
37
newIDE/app/src/Utils/i18n/getTranslationFunction.js
Normal file
@@ -0,0 +1,37 @@
|
||||
// @flow
|
||||
import { type I18n } from '@lingui/core';
|
||||
|
||||
type TranslationFunction = (string => string) | null;
|
||||
type NotNullTranslationFunction = string => string;
|
||||
|
||||
/**
|
||||
* Given the i18n object, return the function that can be used
|
||||
* to translate strings. Useful for wiring i18n to extensions
|
||||
* and libGD.js, where translations is done with a simple string
|
||||
* to string function.
|
||||
*/
|
||||
export const getTranslationFunction = (i18n: ?I18n): TranslationFunction => {
|
||||
const i18nModule = i18n; // Make flow happy, ensure i18nModule is const.
|
||||
if (i18nModule) {
|
||||
return (str: string) => i18nModule._(str);
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
||||
|
||||
/**
|
||||
* Given the i18n object, return the function that can be used
|
||||
* to translate strings. Useful for wiring i18n to extensions
|
||||
* and libGD.js, where translations is done with a simple string
|
||||
* to string function.
|
||||
*/
|
||||
export const getNotNullTranslationFunction = (
|
||||
i18n: ?I18n
|
||||
): NotNullTranslationFunction => {
|
||||
const i18nModule = i18n; // Make flow happy, ensure i18nModule is const.
|
||||
if (i18nModule) {
|
||||
return (str: string) => i18nModule._(str);
|
||||
}
|
||||
|
||||
return (str: string) => str;
|
||||
};
|
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"GDevelop is an easy-to-use game creator with no programming language to learn.": {
|
||||
"origin": [
|
||||
[
|
||||
"src/MainFrame/Editors/StartPage/index.js",
|
||||
81
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
154
newIDE/app/src/locales/_build/src/MainFrame/index.js.json
Normal file
154
newIDE/app/src/locales/_build/src/MainFrame/index.js.json
Normal file
@@ -0,0 +1,154 @@
|
||||
{
|
||||
"An error has occured during functions generation. If GDevelop is installed, verify that nothing is preventing GDevelop from writing on disk. If you're running GDevelop online, verify your internet connection and refresh functions from the Project Manager.": {
|
||||
"origin": [
|
||||
[
|
||||
"src/MainFrame/index.js",
|
||||
290
|
||||
]
|
||||
]
|
||||
},
|
||||
"Unable to open this project. Check that the path/URL is correct, that you selected a file that is a game file created with GDevelop and that is was not removed.": {
|
||||
"origin": [
|
||||
[
|
||||
"src/MainFrame/index.js",
|
||||
323
|
||||
]
|
||||
]
|
||||
},
|
||||
"Are you sure you want to remove this scene? This can't be undone.": {
|
||||
"origin": [
|
||||
[
|
||||
"src/MainFrame/index.js",
|
||||
449
|
||||
]
|
||||
]
|
||||
},
|
||||
"Are you sure you want to remove this external layout? This can't be undone.": {
|
||||
"origin": [
|
||||
[
|
||||
"src/MainFrame/index.js",
|
||||
471
|
||||
]
|
||||
]
|
||||
},
|
||||
"Are you sure you want to remove these external events? This can't be undone.": {
|
||||
"origin": [
|
||||
[
|
||||
"src/MainFrame/index.js",
|
||||
496
|
||||
]
|
||||
]
|
||||
},
|
||||
"Are you sure you want to remove this extension? This can't be undone.": {
|
||||
"origin": [
|
||||
[
|
||||
"src/MainFrame/index.js",
|
||||
523
|
||||
]
|
||||
]
|
||||
},
|
||||
"Another scene with this name already exists.": {
|
||||
"origin": [
|
||||
[
|
||||
"src/MainFrame/index.js",
|
||||
549
|
||||
]
|
||||
]
|
||||
},
|
||||
"Another external layout with this name already exists.": {
|
||||
"origin": [
|
||||
[
|
||||
"src/MainFrame/index.js",
|
||||
573
|
||||
]
|
||||
]
|
||||
},
|
||||
"Other external events with this name already exist.": {
|
||||
"origin": [
|
||||
[
|
||||
"src/MainFrame/index.js",
|
||||
600
|
||||
]
|
||||
]
|
||||
},
|
||||
"Another extension with this name already exists.": {
|
||||
"origin": [
|
||||
[
|
||||
"src/MainFrame/index.js",
|
||||
628
|
||||
]
|
||||
]
|
||||
},
|
||||
"This name contains forbidden characters: please only use alphanumeric characters (0-9, a-z) and underscores in your extension name.": {
|
||||
"origin": [
|
||||
[
|
||||
"src/MainFrame/index.js",
|
||||
634
|
||||
]
|
||||
]
|
||||
},
|
||||
"Unable to launch the preview!": {
|
||||
"origin": [
|
||||
[
|
||||
"src/MainFrame/index.js",
|
||||
706
|
||||
]
|
||||
]
|
||||
},
|
||||
"(Events)": {
|
||||
"origin": [
|
||||
[
|
||||
"src/MainFrame/index.js",
|
||||
744
|
||||
]
|
||||
]
|
||||
},
|
||||
"Resources": {
|
||||
"origin": [
|
||||
[
|
||||
"src/MainFrame/index.js",
|
||||
888
|
||||
]
|
||||
]
|
||||
},
|
||||
"Start Page": {
|
||||
"origin": [
|
||||
[
|
||||
"src/MainFrame/index.js",
|
||||
923
|
||||
]
|
||||
]
|
||||
},
|
||||
"Debugger": {
|
||||
"origin": [
|
||||
[
|
||||
"src/MainFrame/index.js",
|
||||
952
|
||||
]
|
||||
]
|
||||
},
|
||||
"Project properly saved": {
|
||||
"origin": [
|
||||
[
|
||||
"src/MainFrame/index.js",
|
||||
1000
|
||||
]
|
||||
]
|
||||
},
|
||||
"Unable to save the project! Please try again by choosing another location.": {
|
||||
"origin": [
|
||||
[
|
||||
"src/MainFrame/index.js",
|
||||
1005
|
||||
]
|
||||
]
|
||||
},
|
||||
"Close the project? Any changes that have not been saved will be lost.": {
|
||||
"origin": [
|
||||
[
|
||||
"src/MainFrame/index.js",
|
||||
1021
|
||||
]
|
||||
]
|
||||
}
|
||||
}
|
1
newIDE/app/src/locales/en/messages.js
Normal file
1
newIDE/app/src/locales/en/messages.js
Normal file
@@ -0,0 +1 @@
|
||||
/* eslint-disable */module.exports={languageData:{"plurals":function(n,ord){var s=String(n).split("."),v0=!s[1],t0=Number(s[0])==n,n10=t0&&s[0].slice(-1),n100=t0&&s[0].slice(-2);if(ord)return n10==1&&n100!=11?"one":n10==2&&n100!=12?"two":n10==3&&n100!=13?"few":"other";return n==1&&v0?"one":"other"}},messages:{"An error has occured during functions generation. If GDevelop is installed, verify that nothing is preventing GDevelop from writing on disk. If you're running GDevelop online, verify your internet connection and refresh functions from the Project Manager.":"An error has occured during functions generation. If GDevelop is installed, verify that nothing is preventing GDevelop from writing on disk. If you're running GDevelop online, verify your internet connection and refresh functions from the Project Manager.","Another extension with this name already exists.":"Another extension with this name already exists.","Another external layout with this name already exists.":"Another external layout with this name already exists.","Another scene with this name already exists.":"Another scene with this name already exists.","Are you sure you want to remove these external events? This can't be undone.":"Are you sure you want to remove these external events? This can't be undone.","Are you sure you want to remove this extension? This can't be undone.":"Are you sure you want to remove this extension? This can't be undone.","Are you sure you want to remove this external layout? This can't be undone.":"Are you sure you want to remove this external layout? This can't be undone.","Are you sure you want to remove this scene? This can't be undone.":"Are you sure you want to remove this scene? This can't be undone.","Close the project? Any changes that have not been saved will be lost.":"Close the project? Any changes that have not been saved will be lost.","Debugger":"Debugger","Events":"Events","GDevelop is an easy-to-use game creator with no programming language to learn.":"GDevelop is an easy-to-use game creator with no programming language to learn.","Other external events with this name already exist.":"Other external events with this name already exist.","Project properly saved":"Project properly saved","Resources":"Resources","Start Page":"Start Page","This name contains forbidden characters: please only use alphanumeric characters (0-9, a-z) and underscores in your extension name.":"This name contains forbidden characters: please only use alphanumeric characters (0-9, a-z) and underscores in your extension name.","Unable to launch the preview!":"Unable to launch the preview!","Unable to open this project. Check that the path/URL is correct, that you selected a file that is a game file created with GDevelop and that is was not removed.":"Unable to open this project. Check that the path/URL is correct, that you selected a file that is a game file created with GDevelop and that is was not removed.","Unable to save the project! Please try again by choosing another location.":"Unable to save the project! Please try again by choosing another location."}};
|
1
newIDE/app/src/locales/es/messages.js
Normal file
1
newIDE/app/src/locales/es/messages.js
Normal file
@@ -0,0 +1 @@
|
||||
/* eslint-disable */module.exports={languageData:{"plurals":function(n,ord){if(ord)return"other";return n==1?"one":"other"}},messages:{"An error has occured during functions generation. If GDevelop is installed, verify that nothing is preventing GDevelop from writing on disk. If you're running GDevelop online, verify your internet connection and refresh functions from the Project Manager.":"An error has occured during functions generation. If GDevelop is installed, verify that nothing is preventing GDevelop from writing on disk. If you're running GDevelop online, verify your internet connection and refresh functions from the Project Manager.","Another extension with this name already exists.":"Another extension with this name already exists.","Another external layout with this name already exists.":"Another external layout with this name already exists.","Another scene with this name already exists.":"Another scene with this name already exists.","Are you sure you want to remove these external events? This can't be undone.":"Are you sure you want to remove these external events? This can't be undone.","Are you sure you want to remove this extension? This can't be undone.":"Are you sure you want to remove this extension? This can't be undone.","Are you sure you want to remove this external layout? This can't be undone.":"Are you sure you want to remove this external layout? This can't be undone.","Are you sure you want to remove this scene? This can't be undone.":"Are you sure you want to remove this scene? This can't be undone.","Close the project? Any changes that have not been saved will be lost.":"Close the project? Any changes that have not been saved will be lost.","Debugger":"Debugger","Events":"Events","GDevelop is an easy-to-use game creator with no programming language to learn.":"GDevelop is an easy-to-use game creator with no programming language to learn.","Other external events with this name already exist.":"Other external events with this name already exist.","Project properly saved":"Project properly saved","Resources":"Resources","Start Page":"Start Page","This name contains forbidden characters: please only use alphanumeric characters (0-9, a-z) and underscores in your extension name.":"This name contains forbidden characters: please only use alphanumeric characters (0-9, a-z) and underscores in your extension name.","Unable to launch the preview!":"Unable to launch the preview!","Unable to open this project. Check that the path/URL is correct, that you selected a file that is a game file created with GDevelop and that is was not removed.":"Unable to open this project. Check that the path/URL is correct, that you selected a file that is a game file created with GDevelop and that is was not removed.","Unable to save the project! Please try again by choosing another location.":"Unable to save the project! Please try again by choosing another location."}};
|
1
newIDE/app/src/locales/fr/messages.js
Normal file
1
newIDE/app/src/locales/fr/messages.js
Normal file
@@ -0,0 +1 @@
|
||||
/* eslint-disable */module.exports={languageData:{"plurals":function(n,ord){if(ord)return n==1?"one":"other";return n>=0&&n<2?"one":"other"}},messages:{"An error has occured during functions generation. If GDevelop is installed, verify that nothing is preventing GDevelop from writing on disk. If you're running GDevelop online, verify your internet connection and refresh functions from the Project Manager.":"An error has occured during functions generation. If GDevelop is installed, verify that nothing is preventing GDevelop from writing on disk. If you're running GDevelop online, verify your internet connection and refresh functions from the Project Manager.","Another extension with this name already exists.":"Another extension with this name already exists.","Another external layout with this name already exists.":"Another external layout with this name already exists.","Another scene with this name already exists.":"Another scene with this name already exists.","Are you sure you want to remove these external events? This can't be undone.":"Are you sure you want to remove these external events? This can't be undone.","Are you sure you want to remove this extension? This can't be undone.":"Are you sure you want to remove this extension? This can't be undone.","Are you sure you want to remove this external layout? This can't be undone.":"Are you sure you want to remove this external layout? This can't be undone.","Are you sure you want to remove this scene? This can't be undone.":"Are you sure you want to remove this scene? This can't be undone.","Close the project? Any changes that have not been saved will be lost.":"Close the project? Any changes that have not been saved will be lost.","Debugger":"Debugger","Events":"Events","GDevelop is an easy-to-use game creator with no programming language to learn.":"GDevelop is an easy-to-use game creator with no programming language to learn.","Other external events with this name already exist.":"Other external events with this name already exist.","Project properly saved":"Project properly saved","Resources":"Resources","Start Page":"Start Page","This name contains forbidden characters: please only use alphanumeric characters (0-9, a-z) and underscores in your extension name.":"This name contains forbidden characters: please only use alphanumeric characters (0-9, a-z) and underscores in your extension name.","Unable to launch the preview!":"Unable to launch the preview!","Unable to open this project. Check that the path/URL is correct, that you selected a file that is a game file created with GDevelop and that is was not removed.":"Unable to open this project. Check that the path/URL is correct, that you selected a file that is a game file created with GDevelop and that is was not removed.","Unable to save the project! Please try again by choosing another location.":"Unable to save the project! Please try again by choosing another location."}};
|
@@ -3,7 +3,7 @@ import * as React from 'react';
|
||||
|
||||
type Props = {|
|
||||
initialValue: any,
|
||||
render: (value: any, onChange: (value: any) => void) => React.Element<*>,
|
||||
render: (value: any, onChange: (value: any) => void) => React.Node,
|
||||
|};
|
||||
|
||||
type State = {|
|
||||
|
@@ -99,7 +99,7 @@ import BuildStepsProgress from '../Export/Builds/BuildStepsProgress';
|
||||
import MeasuresTable from '../Debugger/Profiler/MeasuresTable';
|
||||
import Profiler from '../Debugger/Profiler';
|
||||
import SearchPanel from '../EventsSheet/SearchPanel';
|
||||
import { I18nextProvider } from 'react-i18next';
|
||||
import GDI18nProvider from '../Utils/i18n/GDI18nProvider';
|
||||
import PlaceholderMessage from '../UI/PlaceholderMessage';
|
||||
import PlaceholderLoader from '../UI/PlaceholderLoader';
|
||||
import InlineCheckbox from '../UI/InlineCheckbox';
|
||||
@@ -107,7 +107,6 @@ import LoaderModal from '../UI/LoaderModal';
|
||||
import ColorField from '../UI/ColorField';
|
||||
import EmptyMessage from '../UI/EmptyMessage';
|
||||
import BackgroundText from '../UI/BackgroundText';
|
||||
import i18n from '../UI/i18n';
|
||||
import ObjectField from '../EventsSheet/ParameterFields/ObjectField';
|
||||
import { getInitialSelection } from '../EventsSheet/SelectionHandler';
|
||||
import EventsFunctionConfigurationEditor from '../EventsFunctionsExtensionEditor/EventsFunctionConfigurationEditor';
|
||||
@@ -640,27 +639,27 @@ storiesOf('LocalExport', module)
|
||||
.addDecorator(paperDecorator)
|
||||
.addDecorator(muiDecorator)
|
||||
.add('default', () => (
|
||||
<I18nextProvider i18n={i18n}>
|
||||
<GDI18nProvider language="en">
|
||||
<LocalExport open project={project} onClose={action('close')} />
|
||||
</I18nextProvider>
|
||||
</GDI18nProvider>
|
||||
));
|
||||
|
||||
storiesOf('LocalS3Export', module)
|
||||
.addDecorator(paperDecorator)
|
||||
.addDecorator(muiDecorator)
|
||||
.add('default', () => (
|
||||
<I18nextProvider i18n={i18n}>
|
||||
<GDI18nProvider language="en">
|
||||
<LocalS3Export open project={project} onClose={action('close')} />
|
||||
</I18nextProvider>
|
||||
</GDI18nProvider>
|
||||
));
|
||||
|
||||
storiesOf('LocalCordovaExport', module)
|
||||
.addDecorator(paperDecorator)
|
||||
.addDecorator(muiDecorator)
|
||||
.add('default', () => (
|
||||
<I18nextProvider i18n={i18n}>
|
||||
<GDI18nProvider language="en">
|
||||
<LocalCordovaExport project={project} />
|
||||
</I18nextProvider>
|
||||
</GDI18nProvider>
|
||||
));
|
||||
|
||||
storiesOf('BuildStepsProgress', module)
|
||||
|
@@ -29,7 +29,7 @@
|
||||
semver "^5.4.1"
|
||||
source-map "^0.5.0"
|
||||
|
||||
"@babel/core@^7.0.1":
|
||||
"@babel/core@^7.0.1", "@babel/core@^7.2.2":
|
||||
version "7.2.2"
|
||||
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.2.2.tgz#07adba6dde27bb5ad8d8672f15fde3e08184a687"
|
||||
integrity sha512-59vB0RWt09cAct5EIe58+NzGP4TFSD3Bz//2/ELy3ZeTeKF6VTD1AXlH8BGGbCX0PuobZBsIzO7IAI9PH67eKw==
|
||||
@@ -956,6 +956,95 @@
|
||||
version "3.0.9"
|
||||
resolved "https://registry.yarnpkg.com/@hypnosphi/fuse.js/-/fuse.js-3.0.9.tgz#ea99f6121b4a8f065b4c71f85595db2714498807"
|
||||
|
||||
"@lingui/babel-plugin-extract-messages@2.7.3":
|
||||
version "2.7.3"
|
||||
resolved "https://registry.yarnpkg.com/@lingui/babel-plugin-extract-messages/-/babel-plugin-extract-messages-2.7.3.tgz#90785433dc344a4ea3a661ba1f3cf441505a92ce"
|
||||
integrity sha512-NZIN9VIXjxDQ/2cCyBKxA3nsXreb4csZR9Un24rJDpHn1GpOgD68kDaQN1ocQjAOOgh9TNC2WgGL4cI82ALLlQ==
|
||||
dependencies:
|
||||
"@lingui/conf" "2.7.3"
|
||||
babel-generator "^6.26.1"
|
||||
|
||||
"@lingui/babel-plugin-transform-js@2.7.3":
|
||||
version "2.7.3"
|
||||
resolved "https://registry.yarnpkg.com/@lingui/babel-plugin-transform-js/-/babel-plugin-transform-js-2.7.3.tgz#7e435cf93e69cf4ecd7acd6d3ad20fb5cc1e4f98"
|
||||
integrity sha512-ZymQCbatcXEroA6QVZ6YsolEhMt75imF1IhRC6299NAXwaL9WyH4XaM70RI0/k/9IMg/uvVSXqWO3voBDyNgbA==
|
||||
|
||||
"@lingui/babel-plugin-transform-react@2.7.3":
|
||||
version "2.7.3"
|
||||
resolved "https://registry.yarnpkg.com/@lingui/babel-plugin-transform-react/-/babel-plugin-transform-react-2.7.3.tgz#f80921ef2a7d7557214f17dab30128ae3f3471ef"
|
||||
integrity sha512-RJTYdScoXJGDqLtKo2xLQmKZ+F3MnMqRazDjSFPk7bamNmSLRrc0Hwy98dvuDrHhw7vCEebfWoVSxD9N3EuDNg==
|
||||
|
||||
"@lingui/cli@^2.7.3":
|
||||
version "2.7.3"
|
||||
resolved "https://registry.yarnpkg.com/@lingui/cli/-/cli-2.7.3.tgz#6a2b6c26c1a558e0a55653f87c018f51f4e8bcaa"
|
||||
integrity sha512-d5DbYhbAoq4KMbal8inInVee9HP4AcESrNFE1XE63xuzjeI5x7XsotRrdnDvvvn9HoTqAXoInAM1Q7gb5b5kug==
|
||||
dependencies:
|
||||
"@lingui/babel-plugin-extract-messages" "2.7.3"
|
||||
"@lingui/babel-plugin-transform-js" "2.7.3"
|
||||
"@lingui/babel-plugin-transform-react" "2.7.3"
|
||||
"@lingui/conf" "2.7.3"
|
||||
babel-generator "^6.26.1"
|
||||
babel-plugin-syntax-jsx "^6.18.0"
|
||||
babel-runtime "^6.26.0"
|
||||
babel-types "^6.26.0"
|
||||
babylon "^6.18.0"
|
||||
bcp-47 "^1.0.4"
|
||||
chalk "^2.3.0"
|
||||
cli-table "^0.3.1"
|
||||
commander "^2.17.1"
|
||||
date-fns "^1.29.0"
|
||||
fuzzaldrin "^2.1.0"
|
||||
glob "^7.1.2"
|
||||
inquirer "^6.2.0"
|
||||
make-plural "^4.1.1"
|
||||
messageformat-parser "^2.0.0"
|
||||
mkdirp "^0.5.1"
|
||||
opencollective "^1.0.3"
|
||||
ora "^3.0.0"
|
||||
pofile "^1.0.11"
|
||||
pseudolocale "^1.1.0"
|
||||
ramda "^0.25.0"
|
||||
typescript "^2.9.2"
|
||||
|
||||
"@lingui/conf@2.7.3":
|
||||
version "2.7.3"
|
||||
resolved "https://registry.yarnpkg.com/@lingui/conf/-/conf-2.7.3.tgz#d05ad22e51ae26e88c9def3e913faabe0711a5d6"
|
||||
integrity sha512-iynLj6GbGmeIJfT0B9QTcBLhNBFrhYWzDcf9IGykFwEpIBfQA+DBqZ3hzaYe7DCSkzzq0U0uQASGoMyr03dvEw==
|
||||
dependencies:
|
||||
chalk "^2.3.0"
|
||||
cosmiconfig "^5.0.6"
|
||||
jest-regex-util "^23.3.0"
|
||||
jest-validate "^23.5.0"
|
||||
pkg-conf "^2.1.0"
|
||||
|
||||
"@lingui/core@2.7.3":
|
||||
version "2.7.3"
|
||||
resolved "https://registry.yarnpkg.com/@lingui/core/-/core-2.7.3.tgz#9b2a12a56dd6129faf692fc6f47c49763b470a3f"
|
||||
integrity sha512-3rmL/78NpbuulR4SAnYCipRdpCIntE9R4vCzWM6l8wuPgkv425ui9eoF8p/lMSxj7/hSy0ARyE8/6+aS+L4xpA==
|
||||
dependencies:
|
||||
babel-runtime "^6.26.0"
|
||||
make-plural "^4.1.1"
|
||||
messageformat-parser "^2.0.0"
|
||||
|
||||
"@lingui/macro@^2.7.3":
|
||||
version "2.7.3"
|
||||
resolved "https://registry.yarnpkg.com/@lingui/macro/-/macro-2.7.3.tgz#861655667a95d41d10aa23063e5e9ed2d2678727"
|
||||
integrity sha512-d4vxKGIn+DOksTBPeHbGiiocpxVAilRJ/oGYIZktZjuKgl38B+79T+nUJ9vHGNB/aWfocBoi/93on1aL7w/k1Q==
|
||||
dependencies:
|
||||
"@lingui/babel-plugin-transform-react" "2.7.3"
|
||||
babel-plugin-macros "^2.2.0"
|
||||
|
||||
"@lingui/react@^2.7.3":
|
||||
version "2.7.3"
|
||||
resolved "https://registry.yarnpkg.com/@lingui/react/-/react-2.7.3.tgz#3b377189b04e406b225d3c1d8a196d004d7229fe"
|
||||
integrity sha512-apKhH+QSHX9hF94gpcuPqSypkKzheWHMdiwNCy47HMEdiyBH9b16R3dMOGcAdBpiFRc9R4Gr2lRUBpL59Ey0Fw==
|
||||
dependencies:
|
||||
"@lingui/core" "2.7.3"
|
||||
babel-runtime "^6.26.0"
|
||||
hash-sum "^1.0.2"
|
||||
hoist-non-react-statics "3.0.1"
|
||||
prop-types "^15.6.2"
|
||||
|
||||
"@mrmlnc/readdir-enhanced@^2.2.1":
|
||||
version "2.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@mrmlnc/readdir-enhanced/-/readdir-enhanced-2.2.1.tgz#524af240d1a360527b730475ecfa1344aa540dde"
|
||||
@@ -1523,10 +1612,20 @@ ansi-colors@^3.0.0:
|
||||
resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-3.2.3.tgz#57d35b8686e851e2cc04c403f1c00203976a1813"
|
||||
integrity sha512-LEHHyuhlPY3TmuUYMh2oz89lTShfvgbmzaBcxve9t/9Wuy7Dwf4yoAKcND7KFT1HAQfqZ12qtc+DUrBMeKF9nw==
|
||||
|
||||
ansi-escapes@^1.1.0:
|
||||
version "1.4.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e"
|
||||
integrity sha1-06ioOzGapneTZisT52HHkRQiMG4=
|
||||
|
||||
ansi-escapes@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.0.0.tgz#ec3e8b4e9f8064fc02c3ac9b65f1c275bda8ef92"
|
||||
|
||||
ansi-escapes@^3.2.0:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b"
|
||||
integrity sha512-cBhpre4ma+U0T1oM5fXg7Dy1Jw7zzwv7lt/GoCpr+hDQJoYnKVPLL4dCvSEFMmQurOQvSrwT7SL/DAlhBI97RQ==
|
||||
|
||||
ansi-html@0.0.7:
|
||||
version "0.0.7"
|
||||
resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.7.tgz#813584021962a9e9e6fd039f940d12f56ca7859e"
|
||||
@@ -1884,7 +1983,7 @@ babel-code-frame@^6.11.0, babel-code-frame@^6.22.0, babel-code-frame@^6.26.0:
|
||||
esutils "^2.0.2"
|
||||
js-tokens "^3.0.2"
|
||||
|
||||
babel-core@7.0.0-bridge.0:
|
||||
babel-core@7.0.0-bridge.0, babel-core@^7.0.0-bridge.0:
|
||||
version "7.0.0-bridge.0"
|
||||
resolved "https://registry.yarnpkg.com/babel-core/-/babel-core-7.0.0-bridge.0.tgz#95a492ddd90f9b4e9a4a1da14eb335b87b634ece"
|
||||
integrity sha512-poPX9mZH/5CSanm50Q+1toVci6pv5KSRv/5TWCwtzQS5XEwn40BcCrgIeMFWP9CKKIniKXNxoIOnOq4VVlGXhg==
|
||||
@@ -1945,6 +2044,20 @@ babel-generator@^6.18.0, babel-generator@^6.26.0:
|
||||
source-map "^0.5.6"
|
||||
trim-right "^1.0.1"
|
||||
|
||||
babel-generator@^6.26.1:
|
||||
version "6.26.1"
|
||||
resolved "https://registry.yarnpkg.com/babel-generator/-/babel-generator-6.26.1.tgz#1844408d3b8f0d35a404ea7ac180f087a601bd90"
|
||||
integrity sha512-HyfwY6ApZj7BYTcJURpM5tznulaBvyio7/0d4zFOeMPUmfxkCjHocCuoLa2SAGzBI8AREcH3eP3758F672DppA==
|
||||
dependencies:
|
||||
babel-messages "^6.23.0"
|
||||
babel-runtime "^6.26.0"
|
||||
babel-types "^6.26.0"
|
||||
detect-indent "^4.0.0"
|
||||
jsesc "^1.3.0"
|
||||
lodash "^4.17.4"
|
||||
source-map "^0.5.7"
|
||||
trim-right "^1.0.1"
|
||||
|
||||
babel-helper-bindify-decorators@^6.24.1:
|
||||
version "6.24.1"
|
||||
resolved "https://registry.yarnpkg.com/babel-helper-bindify-decorators/-/babel-helper-bindify-decorators-6.24.1.tgz#14c19e5f142d7b47f19a52431e52b1ccbc40a330"
|
||||
@@ -2175,6 +2288,14 @@ babel-plugin-macros@2.4.2:
|
||||
cosmiconfig "^5.0.5"
|
||||
resolve "^1.8.1"
|
||||
|
||||
babel-plugin-macros@^2.2.0:
|
||||
version "2.4.5"
|
||||
resolved "https://registry.yarnpkg.com/babel-plugin-macros/-/babel-plugin-macros-2.4.5.tgz#7000a9b1f72d19ceee19a5804f1d23d6daf38c13"
|
||||
integrity sha512-+/9yteNQw3yuZ3krQUfjAeoT/f4EAdn3ELwhFfDj0rTMIaoHfIdrcLePOfIaL0qmFLpIcgPIL2Lzm58h+CGWaw==
|
||||
dependencies:
|
||||
cosmiconfig "^5.0.5"
|
||||
resolve "^1.8.1"
|
||||
|
||||
babel-plugin-minify-builtins@^0.2.0:
|
||||
version "0.2.0"
|
||||
resolved "https://registry.yarnpkg.com/babel-plugin-minify-builtins/-/babel-plugin-minify-builtins-0.2.0.tgz#317f824b0907210b6348671bb040ca072e2e0c82"
|
||||
@@ -2297,7 +2418,7 @@ babel-plugin-syntax-function-bind@^6.8.0:
|
||||
version "6.13.0"
|
||||
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-function-bind/-/babel-plugin-syntax-function-bind-6.13.0.tgz#48c495f177bdf31a981e732f55adc0bdd2601f46"
|
||||
|
||||
babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.8.0:
|
||||
babel-plugin-syntax-jsx@^6.18.0, babel-plugin-syntax-jsx@^6.3.13, babel-plugin-syntax-jsx@^6.8.0:
|
||||
version "6.18.0"
|
||||
resolved "https://registry.yarnpkg.com/babel-plugin-syntax-jsx/-/babel-plugin-syntax-jsx-6.18.0.tgz#0af32a9a6e13ca7a3fd5069e62d7b0f58d0d8946"
|
||||
|
||||
@@ -2669,6 +2790,15 @@ babel-plugin-transform-undefined-to-void@^6.8.3:
|
||||
version "6.8.3"
|
||||
resolved "https://registry.yarnpkg.com/babel-plugin-transform-undefined-to-void/-/babel-plugin-transform-undefined-to-void-6.8.3.tgz#fc52707f6ee1ddc71bb91b0d314fbefdeef9beb4"
|
||||
|
||||
babel-polyfill@6.23.0:
|
||||
version "6.23.0"
|
||||
resolved "https://registry.yarnpkg.com/babel-polyfill/-/babel-polyfill-6.23.0.tgz#8364ca62df8eafb830499f699177466c3b03499d"
|
||||
integrity sha1-g2TKYt+Or7gwSZ9pkXdGbDsDSZ0=
|
||||
dependencies:
|
||||
babel-runtime "^6.22.0"
|
||||
core-js "^2.4.0"
|
||||
regenerator-runtime "^0.10.0"
|
||||
|
||||
babel-preset-env@1.6.1, babel-preset-env@^1.6.1:
|
||||
version "1.6.1"
|
||||
resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.6.1.tgz#a18b564cc9b9afdf4aae57ae3c1b0d99188e6f48"
|
||||
@@ -2939,6 +3069,15 @@ batch@0.6.1:
|
||||
version "0.6.1"
|
||||
resolved "https://registry.yarnpkg.com/batch/-/batch-0.6.1.tgz#dc34314f4e679318093fc760272525f94bf25c16"
|
||||
|
||||
bcp-47@^1.0.4:
|
||||
version "1.0.4"
|
||||
resolved "https://registry.yarnpkg.com/bcp-47/-/bcp-47-1.0.4.tgz#8bee5d1f384fa12b3378b1a4a90dc8418764759d"
|
||||
integrity sha512-KquGHKBVXDBnOOntjqkqINNyNX0eKhDXYbK+83pDJXWO7lV6D7Ey1IQNIDbVQOHxNv6rdynnfS/RfPLVz5X0WA==
|
||||
dependencies:
|
||||
is-alphabetical "^1.0.0"
|
||||
is-alphanumerical "^1.0.0"
|
||||
is-decimal "^1.0.0"
|
||||
|
||||
bcrypt-pbkdf@^1.0.0:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.1.tgz#63bc5dcb61331b92bc05fd528953c33462a06f8d"
|
||||
@@ -3438,16 +3577,7 @@ chainsaw@~0.1.0:
|
||||
dependencies:
|
||||
traverse ">=0.3.0 <0.4"
|
||||
|
||||
chalk@2.4.1:
|
||||
version "2.4.1"
|
||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e"
|
||||
integrity sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==
|
||||
dependencies:
|
||||
ansi-styles "^3.2.1"
|
||||
escape-string-regexp "^1.0.5"
|
||||
supports-color "^5.3.0"
|
||||
|
||||
chalk@^1.1.3:
|
||||
chalk@1.1.3, chalk@^1.0.0, chalk@^1.1.3:
|
||||
version "1.1.3"
|
||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-1.1.3.tgz#a8115c55e4a702fe4d150abd3872822a7e09fc98"
|
||||
dependencies:
|
||||
@@ -3457,6 +3587,15 @@ chalk@^1.1.3:
|
||||
strip-ansi "^3.0.0"
|
||||
supports-color "^2.0.0"
|
||||
|
||||
chalk@2.4.1:
|
||||
version "2.4.1"
|
||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.1.tgz#18c49ab16a037b6eb0152cc83e3471338215b66e"
|
||||
integrity sha512-ObN6h1v2fTJSmUXoS3nMQ92LbDK9be4TV+6G+omQlGJFdcUX5heKi1LZ1YnRMIgwTLEj3E24bT6tYni50rlCfQ==
|
||||
dependencies:
|
||||
ansi-styles "^3.2.1"
|
||||
escape-string-regexp "^1.0.5"
|
||||
supports-color "^5.3.0"
|
||||
|
||||
chalk@^2.0.0, chalk@^2.1.0, chalk@^2.3.0:
|
||||
version "2.3.0"
|
||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.3.0.tgz#b5ea48efc9c1793dccc9b4767c93914d3f2d52ba"
|
||||
@@ -3465,7 +3604,7 @@ chalk@^2.0.0, chalk@^2.1.0, chalk@^2.3.0:
|
||||
escape-string-regexp "^1.0.5"
|
||||
supports-color "^4.0.0"
|
||||
|
||||
chalk@^2.0.1, chalk@^2.4.1, chalk@^2.4.2:
|
||||
chalk@^2.0.1, chalk@^2.3.1, chalk@^2.4.1, chalk@^2.4.2:
|
||||
version "2.4.2"
|
||||
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
|
||||
integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
|
||||
@@ -3493,6 +3632,11 @@ character-reference-invalid@^1.0.0:
|
||||
resolved "https://registry.yarnpkg.com/character-reference-invalid/-/character-reference-invalid-1.1.2.tgz#21e421ad3d84055952dab4a43a04e73cd425d3ed"
|
||||
integrity sha512-7I/xceXfKyUJmSAn/jw8ve/9DyOP7XxufNYLI9Px7CmsKgEUaZLUTax6nZxGQtaoiZCjpu6cHPj20xC/vqRReQ==
|
||||
|
||||
chardet@^0.4.0:
|
||||
version "0.4.2"
|
||||
resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.4.2.tgz#b5473b33dc97c424e5d98dc87d55d4d8a29c8bf2"
|
||||
integrity sha1-tUc7M9yXxCTl2Y3IfVXU2KKci/I=
|
||||
|
||||
chardet@^0.7.0:
|
||||
version "0.7.0"
|
||||
resolved "https://registry.yarnpkg.com/chardet/-/chardet-0.7.0.tgz#90094849f0937f2eedc2425d0d28a9e5f0cbad9e"
|
||||
@@ -3597,6 +3741,11 @@ cli-cursor@^2.1.0:
|
||||
dependencies:
|
||||
restore-cursor "^2.0.0"
|
||||
|
||||
cli-spinners@^1.1.0:
|
||||
version "1.3.1"
|
||||
resolved "https://registry.yarnpkg.com/cli-spinners/-/cli-spinners-1.3.1.tgz#002c1990912d0d59580c93bd36c056de99e4259a"
|
||||
integrity sha512-1QL4544moEsDVH9T/l6Cemov/37iv1RtoKf7NJ04A60+4MREXNfx/QvavbH6QoGdsD4N4Mwy49cmaINR/o2mdg==
|
||||
|
||||
cli-table3@^0.5.0:
|
||||
version "0.5.1"
|
||||
resolved "https://registry.yarnpkg.com/cli-table3/-/cli-table3-0.5.1.tgz#0252372d94dfc40dbd8df06005f48f31f656f202"
|
||||
@@ -3607,6 +3756,13 @@ cli-table3@^0.5.0:
|
||||
optionalDependencies:
|
||||
colors "^1.1.2"
|
||||
|
||||
cli-table@^0.3.1:
|
||||
version "0.3.1"
|
||||
resolved "https://registry.yarnpkg.com/cli-table/-/cli-table-0.3.1.tgz#f53b05266a8b1a0b934b3d0821e6e2dc5914ae23"
|
||||
integrity sha1-9TsFJmqLGguTSz0IIebi3FkUriM=
|
||||
dependencies:
|
||||
colors "1.0.3"
|
||||
|
||||
cli-width@^2.0.0:
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/cli-width/-/cli-width-2.2.0.tgz#ff19ede8a9a5e579324147b0c11f0fbcbabed639"
|
||||
@@ -3752,6 +3908,11 @@ colormin@^1.0.5:
|
||||
css-color-names "0.0.4"
|
||||
has "^1.0.1"
|
||||
|
||||
colors@1.0.3:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/colors/-/colors-1.0.3.tgz#0433f44d809680fdeb60ed260f1b0c262e82a40b"
|
||||
integrity sha1-BDP0TYCWgP3rYO0mDxsMJi6CpAs=
|
||||
|
||||
colors@^1.0.3, colors@~1.1.2:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/colors/-/colors-1.1.2.tgz#168a4701756b6a7f51a12ce0c97bfa28c084ed63"
|
||||
@@ -3778,15 +3939,15 @@ combined-stream@^1.0.6, combined-stream@~1.0.6:
|
||||
dependencies:
|
||||
delayed-stream "~1.0.0"
|
||||
|
||||
commander@2.12.x, commander@^2.12.2, commander@^2.9.0, commander@~2.12.1:
|
||||
version "2.12.2"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.12.2.tgz#0f5946c427ed9ec0d91a46bb9def53e54650e555"
|
||||
|
||||
commander@^2.11.0:
|
||||
commander@*, commander@^2.11.0, commander@^2.17.1:
|
||||
version "2.19.0"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.19.0.tgz#f6198aa84e5b83c46054b94ddedbfed5ee9ff12a"
|
||||
integrity sha512-6tvAOO+D6OENvRAh524Dh9jcfKTYDQAqvqezbCW82xj5X0pSrcpxtvRKHLG0yBY6SD7PSDrJaj+0AiOcKVd1Xg==
|
||||
|
||||
commander@2.12.x, commander@^2.12.2, commander@^2.9.0, commander@~2.12.1:
|
||||
version "2.12.2"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.12.2.tgz#0f5946c427ed9ec0d91a46bb9def53e54650e555"
|
||||
|
||||
commander@~2.13.0:
|
||||
version "2.13.0"
|
||||
resolved "https://registry.yarnpkg.com/commander/-/commander-2.13.0.tgz#6964bca67685df7c1f1430c584f07d7597885b9c"
|
||||
@@ -4471,6 +4632,13 @@ default-require-extensions@^1.0.0:
|
||||
dependencies:
|
||||
strip-bom "^2.0.0"
|
||||
|
||||
defaults@^1.0.3:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/defaults/-/defaults-1.0.3.tgz#c656051e9817d9ff08ed881477f3fe4019f3ef7d"
|
||||
integrity sha1-xlYFHpgX2f8I7YgUd/P+QBnz730=
|
||||
dependencies:
|
||||
clone "^1.0.2"
|
||||
|
||||
define-properties@^1.1.2:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.1.2.tgz#83a73f2fea569898fb737193c8f873caf6d45c94"
|
||||
@@ -5457,7 +5625,16 @@ extend@~3.0.0, extend@~3.0.1:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/extend/-/extend-3.0.1.tgz#a755ea7bc1adfcc5a31ce7e762dbaadc5e636444"
|
||||
|
||||
external-editor@^3.0.0:
|
||||
external-editor@^2.0.1:
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-2.2.0.tgz#045511cfd8d133f3846673d1047c154e214ad3d5"
|
||||
integrity sha512-bSn6gvGxKt+b7+6TKEv1ZycHleA7aHhRHyAqJyp5pbUFuYYNIzpZnQDk7AsYckyWdEnTeAnay0aCy2aV6iTk9A==
|
||||
dependencies:
|
||||
chardet "^0.4.0"
|
||||
iconv-lite "^0.4.17"
|
||||
tmp "^0.0.33"
|
||||
|
||||
external-editor@^3.0.0, external-editor@^3.0.3:
|
||||
version "3.0.3"
|
||||
resolved "https://registry.yarnpkg.com/external-editor/-/external-editor-3.0.3.tgz#5866db29a97826dbe4bf3afd24070ead9ea43a27"
|
||||
integrity sha512-bn71H9+qWoOQKyZDo25mOMVpSmXROAsTJVVVYzrrtol3d4y+AsKjf4Iwl2Q+IuT0kFSQ1qo166UuIwqYq7mGnA==
|
||||
@@ -5761,9 +5938,10 @@ flow-annotation-check@1.3.1:
|
||||
glob "7.1.1"
|
||||
load-pkg "^3.0.1"
|
||||
|
||||
flow-bin@0.78.0:
|
||||
version "0.78.0"
|
||||
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.78.0.tgz#df9fe7f9c9a2dfaff39083949fe2d831b41627b7"
|
||||
flow-bin@^0.92.0:
|
||||
version "0.92.0"
|
||||
resolved "https://registry.yarnpkg.com/flow-bin/-/flow-bin-0.92.0.tgz#f5bf3e808b17b480e067ac673829ca715a168bea"
|
||||
integrity sha512-3ErXSAXZZlLV5/QPlaUDCWlDUXop1SiH32ifXL3SEiBwsmGbudCLim+HFVZfkegrn1nB4TcNSkMWtW8SnMPyAQ==
|
||||
|
||||
flow-coverage-report@^0.4.0:
|
||||
version "0.4.0"
|
||||
@@ -6021,6 +6199,11 @@ fuse.js@^3.0.1:
|
||||
version "3.2.0"
|
||||
resolved "https://registry.yarnpkg.com/fuse.js/-/fuse.js-3.2.0.tgz#f0448e8069855bf2a3e683cdc1d320e7e2a07ef4"
|
||||
|
||||
fuzzaldrin@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/fuzzaldrin/-/fuzzaldrin-2.1.0.tgz#90204c3e2fdaa6941bb28d16645d418063a90e9b"
|
||||
integrity sha1-kCBMPi/appQbso0WZF1BgGOpDps=
|
||||
|
||||
gauge@~2.7.3:
|
||||
version "2.7.4"
|
||||
resolved "https://registry.yarnpkg.com/gauge/-/gauge-2.7.4.tgz#2c03405c7538c39d7eb37b317022e325fb018bf7"
|
||||
@@ -6450,6 +6633,11 @@ hash-base@^3.0.0:
|
||||
inherits "^2.0.1"
|
||||
safe-buffer "^5.0.1"
|
||||
|
||||
hash-sum@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/hash-sum/-/hash-sum-1.0.2.tgz#33b40777754c6432573c120cc3808bbd10d47f04"
|
||||
integrity sha1-M7QHd3VMZDJXPBIMw4CLvRDUfwQ=
|
||||
|
||||
hash.js@^1.0.0, hash.js@^1.0.3:
|
||||
version "1.1.3"
|
||||
resolved "https://registry.yarnpkg.com/hash.js/-/hash.js-1.1.3.tgz#340dedbe6290187151c1ea1d777a3448935df846"
|
||||
@@ -6504,7 +6692,14 @@ hoist-non-react-statics@1.x.x, hoist-non-react-statics@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-1.2.0.tgz#aa448cf0986d55cc40773b17174b7dd066cb7cfb"
|
||||
|
||||
hoist-non-react-statics@2.3.1, hoist-non-react-statics@^2.1.0, hoist-non-react-statics@^2.3.1:
|
||||
hoist-non-react-statics@3.0.1:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-3.0.1.tgz#fba3e7df0210eb9447757ca1a7cb607162f0a364"
|
||||
integrity sha512-1kXwPsOi0OGQIZNVMPvgWJ9tSnGMiMfJdihqEzrPEXlHOBh9AAHXX/QYmAJTXztnz/K+PQ8ryCb4eGaN6HlGbQ==
|
||||
dependencies:
|
||||
react-is "^16.3.2"
|
||||
|
||||
hoist-non-react-statics@^2.1.0, hoist-non-react-statics@^2.3.1:
|
||||
version "2.3.1"
|
||||
resolved "https://registry.yarnpkg.com/hoist-non-react-statics/-/hoist-non-react-statics-2.3.1.tgz#343db84c6018c650778898240135a1420ee22ce0"
|
||||
|
||||
@@ -6581,12 +6776,6 @@ html-minifier@^3.2.3:
|
||||
relateurl "0.2.x"
|
||||
uglify-js "3.2.x"
|
||||
|
||||
html-parse-stringify2@2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/html-parse-stringify2/-/html-parse-stringify2-2.0.1.tgz#dc5670b7292ca158b7bc916c9a6735ac8872834a"
|
||||
dependencies:
|
||||
void-elements "^2.0.1"
|
||||
|
||||
html-tag-names@^1.1.1:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/html-tag-names/-/html-tag-names-1.1.2.tgz#f65168964c5a9c82675efda882875dcb2a875c22"
|
||||
@@ -6694,15 +6883,11 @@ hyphenate-style-name@^1.0.1, hyphenate-style-name@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/hyphenate-style-name/-/hyphenate-style-name-1.0.2.tgz#31160a36930adaf1fc04c6074f7eb41465d4ec4b"
|
||||
|
||||
i18next@^10.0.3:
|
||||
version "10.2.1"
|
||||
resolved "https://registry.yarnpkg.com/i18next/-/i18next-10.2.1.tgz#bec61a98d7976c3084147cc2cd2bafdeff9088f2"
|
||||
|
||||
iconv-lite@0.4.19, iconv-lite@~0.4.13:
|
||||
version "0.4.19"
|
||||
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.19.tgz#f7468f60135f5e5dad3399c0a81be9a1603a082b"
|
||||
|
||||
iconv-lite@0.4.24, iconv-lite@^0.4.24, iconv-lite@^0.4.4:
|
||||
iconv-lite@0.4.24, iconv-lite@^0.4.17, iconv-lite@^0.4.24, iconv-lite@^0.4.4:
|
||||
version "0.4.24"
|
||||
resolved "https://registry.yarnpkg.com/iconv-lite/-/iconv-lite-0.4.24.tgz#2022b4b25fbddc21d2f524974a474aafe733908b"
|
||||
integrity sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==
|
||||
@@ -6850,6 +7035,25 @@ inline-style-prefixer@^3.0.6, inline-style-prefixer@^3.0.8:
|
||||
bowser "^1.7.3"
|
||||
css-in-js-utils "^2.0.0"
|
||||
|
||||
inquirer@3.0.6:
|
||||
version "3.0.6"
|
||||
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-3.0.6.tgz#e04aaa9d05b7a3cb9b0f407d04375f0447190347"
|
||||
integrity sha1-4EqqnQW3o8ubD0B9BDdfBEcZA0c=
|
||||
dependencies:
|
||||
ansi-escapes "^1.1.0"
|
||||
chalk "^1.0.0"
|
||||
cli-cursor "^2.1.0"
|
||||
cli-width "^2.0.0"
|
||||
external-editor "^2.0.1"
|
||||
figures "^2.0.0"
|
||||
lodash "^4.3.0"
|
||||
mute-stream "0.0.7"
|
||||
run-async "^2.2.0"
|
||||
rx "^4.1.0"
|
||||
string-width "^2.0.0"
|
||||
strip-ansi "^3.0.0"
|
||||
through "^2.3.6"
|
||||
|
||||
inquirer@6.2.0:
|
||||
version "6.2.0"
|
||||
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.2.0.tgz#51adcd776f661369dc1e894859c2560a224abdd8"
|
||||
@@ -6888,6 +7092,25 @@ inquirer@^6.1.0:
|
||||
strip-ansi "^5.0.0"
|
||||
through "^2.3.6"
|
||||
|
||||
inquirer@^6.2.0:
|
||||
version "6.2.2"
|
||||
resolved "https://registry.yarnpkg.com/inquirer/-/inquirer-6.2.2.tgz#46941176f65c9eb20804627149b743a218f25406"
|
||||
integrity sha512-Z2rREiXA6cHRR9KBOarR3WuLlFzlIfAEIiB45ll5SSadMg7WqOh1MKEjjndfuH5ewXdixWCxqnVfGOQzPeiztA==
|
||||
dependencies:
|
||||
ansi-escapes "^3.2.0"
|
||||
chalk "^2.4.2"
|
||||
cli-cursor "^2.1.0"
|
||||
cli-width "^2.0.0"
|
||||
external-editor "^3.0.3"
|
||||
figures "^2.0.0"
|
||||
lodash "^4.17.11"
|
||||
mute-stream "0.0.7"
|
||||
run-async "^2.2.0"
|
||||
rxjs "^6.4.0"
|
||||
string-width "^2.1.0"
|
||||
strip-ansi "^5.0.0"
|
||||
through "^2.3.6"
|
||||
|
||||
internal-ip@^3.0.1:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/internal-ip/-/internal-ip-3.0.1.tgz#df5c99876e1d2eb2ea2d74f520e3f669a00ece27"
|
||||
@@ -7689,7 +7912,7 @@ jest-util@^23.4.0:
|
||||
slash "^1.0.0"
|
||||
source-map "^0.6.0"
|
||||
|
||||
jest-validate@^23.6.0:
|
||||
jest-validate@^23.5.0, jest-validate@^23.6.0:
|
||||
version "23.6.0"
|
||||
resolved "https://registry.yarnpkg.com/jest-validate/-/jest-validate-23.6.0.tgz#36761f99d1ed33fcd425b4e4c5595d62b6597474"
|
||||
integrity sha512-OFKapYxe72yz7agrDAWi8v2WL8GIfVqcbKRCLbRG9PAxtzF9b1SEDdTpytNDN12z2fJynoBwpMpvj2R39plI2A==
|
||||
@@ -8068,6 +8291,16 @@ load-json-file@^2.0.0:
|
||||
pify "^2.0.0"
|
||||
strip-bom "^3.0.0"
|
||||
|
||||
load-json-file@^4.0.0:
|
||||
version "4.0.0"
|
||||
resolved "https://registry.yarnpkg.com/load-json-file/-/load-json-file-4.0.0.tgz#2f5f45ab91e33216234fd53adab668eb4ec0993b"
|
||||
integrity sha1-L19Fq5HjMhYjT9U62rZo607AmTs=
|
||||
dependencies:
|
||||
graceful-fs "^4.1.2"
|
||||
parse-json "^4.0.0"
|
||||
pify "^3.0.0"
|
||||
strip-bom "^3.0.0"
|
||||
|
||||
load-pkg@^3.0.1:
|
||||
version "3.0.1"
|
||||
resolved "https://registry.yarnpkg.com/load-pkg/-/load-pkg-3.0.1.tgz#9230b37ec04e569003060bc58951e3ed508d594f"
|
||||
@@ -8255,11 +8488,18 @@ lodash@^3.10.1:
|
||||
version "3.10.1"
|
||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-3.10.1.tgz#5bf45e8e49ba4189e17d482789dfd15bd140b7b6"
|
||||
|
||||
lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.5:
|
||||
lodash@^4.13.1, lodash@^4.17.10, lodash@^4.17.11, lodash@^4.17.5, lodash@^4.3.0:
|
||||
version "4.17.11"
|
||||
resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.11.tgz#b39ea6229ef607ecd89e2c8df12536891cac9b8d"
|
||||
integrity sha512-cQKh8igo5QUhZ7lg38DYWAxMvjSAKG0A8wGSVimP07SIUEK2UO+arSRKbRZWtelMtN5V0Hkwh5ryOto/SshYIg==
|
||||
|
||||
log-symbols@^2.2.0:
|
||||
version "2.2.0"
|
||||
resolved "https://registry.yarnpkg.com/log-symbols/-/log-symbols-2.2.0.tgz#5740e1c5d6f0dfda4ad9323b5332107ef6b4c40a"
|
||||
integrity sha512-VeIAFslyIerEJLXHziedo2basKbMKtTw3vfn5IzG0XTjhAVEJyNHnL2p7vc+wBDSdQuUpNw3M2u6xb9QsAY5Eg==
|
||||
dependencies:
|
||||
chalk "^2.0.1"
|
||||
|
||||
loglevel@^1.4.1:
|
||||
version "1.6.1"
|
||||
resolved "https://registry.yarnpkg.com/loglevel/-/loglevel-1.6.1.tgz#e0fc95133b6ef276cdc8887cdaf24aa6f156f8fa"
|
||||
@@ -8314,6 +8554,13 @@ make-dir@^1.0.0:
|
||||
dependencies:
|
||||
pify "^3.0.0"
|
||||
|
||||
make-plural@^4.1.1:
|
||||
version "4.3.0"
|
||||
resolved "https://registry.yarnpkg.com/make-plural/-/make-plural-4.3.0.tgz#f23de08efdb0cac2e0c9ba9f315b0dff6b4c2735"
|
||||
integrity sha512-xTYd4JVHpSCW+aqDof6w/MebaMVNTVYBZhbB/vi513xXdiPT92JMVCo0Jq8W2UZnzYRFeVbQiQ+I25l13JuKvA==
|
||||
optionalDependencies:
|
||||
minimist "^1.2.0"
|
||||
|
||||
makeerror@1.0.x:
|
||||
version "1.0.11"
|
||||
resolved "https://registry.yarnpkg.com/makeerror/-/makeerror-1.0.11.tgz#e01a5c9109f2af79660e4e8b9587790184f5a96c"
|
||||
@@ -8460,6 +8707,11 @@ merge@^1.1.3:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/merge/-/merge-1.2.0.tgz#7531e39d4949c281a66b8c5a6e0265e8b05894da"
|
||||
|
||||
messageformat-parser@^2.0.0:
|
||||
version "2.0.0"
|
||||
resolved "https://registry.yarnpkg.com/messageformat-parser/-/messageformat-parser-2.0.0.tgz#e37efa0cb07b6784e5f3adc089cbf266208c01c7"
|
||||
integrity sha512-C2ZjB5GlLeikkeoMCTcwEeb68LrFl9osxQzXHIPh0Wcj+43wNsoKpRRKq9rm204sAIdknrdcoeQMUnzvDuMf6g==
|
||||
|
||||
methods@~1.1.2:
|
||||
version "1.1.2"
|
||||
resolved "https://registry.yarnpkg.com/methods/-/methods-1.1.2.tgz#5529a4d67654134edcc5266656835b0f851afcee"
|
||||
@@ -8584,7 +8836,7 @@ minimist@0.0.8:
|
||||
version "0.0.8"
|
||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-0.0.8.tgz#857fcabfc3397d2625b8228262e86aa7a011b05d"
|
||||
|
||||
minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0:
|
||||
minimist@1.2.0, minimist@^1.1.1, minimist@^1.1.3, minimist@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.0.tgz#a35008b20f41383eec1fb914f4cd5df79a264284"
|
||||
|
||||
@@ -8776,6 +9028,14 @@ node-dir@^0.1.10:
|
||||
dependencies:
|
||||
minimatch "^3.0.2"
|
||||
|
||||
node-fetch@1.6.3:
|
||||
version "1.6.3"
|
||||
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.6.3.tgz#dc234edd6489982d58e8f0db4f695029abcd8c04"
|
||||
integrity sha1-3CNO3WSJmC1Y6PDbT2lQKavNjAQ=
|
||||
dependencies:
|
||||
encoding "^0.1.11"
|
||||
is-stream "^1.0.1"
|
||||
|
||||
node-fetch@^1.0.1:
|
||||
version "1.7.3"
|
||||
resolved "https://registry.yarnpkg.com/node-fetch/-/node-fetch-1.7.3.tgz#980f6f72d85211a5347c6b2bc18c5b84c3eb47ef"
|
||||
@@ -9101,6 +9361,26 @@ open@0.0.5:
|
||||
version "0.0.5"
|
||||
resolved "https://registry.yarnpkg.com/open/-/open-0.0.5.tgz#42c3e18ec95466b6bf0dc42f3a2945c3f0cad8fc"
|
||||
|
||||
opencollective@^1.0.3:
|
||||
version "1.0.3"
|
||||
resolved "https://registry.yarnpkg.com/opencollective/-/opencollective-1.0.3.tgz#aee6372bc28144583690c3ca8daecfc120dd0ef1"
|
||||
integrity sha1-ruY3K8KBRFg2kMPKja7PwSDdDvE=
|
||||
dependencies:
|
||||
babel-polyfill "6.23.0"
|
||||
chalk "1.1.3"
|
||||
inquirer "3.0.6"
|
||||
minimist "1.2.0"
|
||||
node-fetch "1.6.3"
|
||||
opn "4.0.2"
|
||||
|
||||
opn@4.0.2:
|
||||
version "4.0.2"
|
||||
resolved "https://registry.yarnpkg.com/opn/-/opn-4.0.2.tgz#7abc22e644dff63b0a96d5ab7f2790c0f01abc95"
|
||||
integrity sha1-erwi5kTf9jsKltWrfyeQwPAavJU=
|
||||
dependencies:
|
||||
object-assign "^4.0.1"
|
||||
pinkie-promise "^2.0.0"
|
||||
|
||||
opn@5.4.0:
|
||||
version "5.4.0"
|
||||
resolved "https://registry.yarnpkg.com/opn/-/opn-5.4.0.tgz#cb545e7aab78562beb11aa3bfabc7042e1761035"
|
||||
@@ -9144,6 +9424,18 @@ optjs@~3.2.2:
|
||||
version "3.2.2"
|
||||
resolved "https://registry.yarnpkg.com/optjs/-/optjs-3.2.2.tgz#69a6ce89c442a44403141ad2f9b370bd5bb6f4ee"
|
||||
|
||||
ora@^3.0.0:
|
||||
version "3.0.0"
|
||||
resolved "https://registry.yarnpkg.com/ora/-/ora-3.0.0.tgz#8179e3525b9aafd99242d63cc206fd64732741d0"
|
||||
integrity sha512-LBS97LFe2RV6GJmXBi6OKcETKyklHNMV0xw7BtsVn2MlsgsydyZetSCbCANr+PFLmDyv4KV88nn0eCKza665Mg==
|
||||
dependencies:
|
||||
chalk "^2.3.1"
|
||||
cli-cursor "^2.1.0"
|
||||
cli-spinners "^1.1.0"
|
||||
log-symbols "^2.2.0"
|
||||
strip-ansi "^4.0.0"
|
||||
wcwidth "^1.0.1"
|
||||
|
||||
original@>=0.0.5:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/original/-/original-1.0.0.tgz#9147f93fa1696d04be61e01bd50baeaca656bd3b"
|
||||
@@ -9458,6 +9750,14 @@ pixi.js@3.0.11:
|
||||
object-assign "^4.0.1"
|
||||
resource-loader "^1.6.4"
|
||||
|
||||
pkg-conf@^2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/pkg-conf/-/pkg-conf-2.1.0.tgz#2126514ca6f2abfebd168596df18ba57867f0058"
|
||||
integrity sha1-ISZRTKbyq/69FoWW3xi6V4Z/AFg=
|
||||
dependencies:
|
||||
find-up "^2.0.0"
|
||||
load-json-file "^4.0.0"
|
||||
|
||||
pkg-dir@^1.0.0:
|
||||
version "1.0.0"
|
||||
resolved "https://registry.yarnpkg.com/pkg-dir/-/pkg-dir-1.0.0.tgz#7a4b508a8d5bb2d629d447056ff4e9c9314cf3d4"
|
||||
@@ -9505,6 +9805,11 @@ podda@^1.2.2:
|
||||
babel-runtime "^6.11.6"
|
||||
immutable "^3.8.1"
|
||||
|
||||
pofile@^1.0.11:
|
||||
version "1.0.11"
|
||||
resolved "https://registry.yarnpkg.com/pofile/-/pofile-1.0.11.tgz#35aff58c17491d127a07336d5522ebc9df57c954"
|
||||
integrity sha512-Vy9eH1dRD9wHjYt/QqXcTz+RnX/zg53xK+KljFSX30PvdDMb2z+c6uDUeblUGqqJgz3QFsdlA0IJvHziPmWtQg==
|
||||
|
||||
portfinder@^1.0.9:
|
||||
version "1.0.13"
|
||||
resolved "https://registry.yarnpkg.com/portfinder/-/portfinder-1.0.13.tgz#bb32ecd87c27104ae6ee44b5a3ccbf0ebb1aede9"
|
||||
@@ -10554,6 +10859,13 @@ prr@~1.0.1:
|
||||
resolved "https://registry.yarnpkg.com/prr/-/prr-1.0.1.tgz#d3fc114ba06995a45ec6893f484ceb1d78f5f476"
|
||||
integrity sha1-0/wRS6BplaRexok/SEzrHXj19HY=
|
||||
|
||||
pseudolocale@^1.1.0:
|
||||
version "1.1.0"
|
||||
resolved "https://registry.yarnpkg.com/pseudolocale/-/pseudolocale-1.1.0.tgz#f333f229433d2c586ec384d021e81f0cf7ca8dc7"
|
||||
integrity sha512-OZ8I/hwYEJ3beN3IEcNnt8EpcqblH0/x23hulKBXjs+WhTTEle+ijCHCkh2bd+cIIeCuCwSCbBe93IthGG6hLw==
|
||||
dependencies:
|
||||
commander "*"
|
||||
|
||||
pseudomap@^1.0.2:
|
||||
version "1.0.2"
|
||||
resolved "https://registry.yarnpkg.com/pseudomap/-/pseudomap-1.0.2.tgz#f052a28da70e618917ef0a8ac34c1ae5a68286b3"
|
||||
@@ -10699,6 +11011,11 @@ raf@3.4.0, raf@^3.2.0:
|
||||
dependencies:
|
||||
performance-now "^2.1.0"
|
||||
|
||||
ramda@^0.25.0:
|
||||
version "0.25.0"
|
||||
resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.25.0.tgz#8fdf68231cffa90bc2f9460390a0cb74a29b29a9"
|
||||
integrity sha512-GXpfrYVPwx3K7RQ6aYT8KPS8XViSXUVJT1ONhoKPE9VAleW42YE+U+8VEyGWt41EnEQW7gwecYJriTI0pKoecQ==
|
||||
|
||||
ramda@^0.26:
|
||||
version "0.26.1"
|
||||
resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.26.1.tgz#8d41351eb8111c55353617fc3bbffad8e4d35d06"
|
||||
@@ -10909,14 +11226,6 @@ react-html-attributes@^1.3.0:
|
||||
dependencies:
|
||||
html-element-attributes "^1.0.0"
|
||||
|
||||
react-i18next@6.2.0:
|
||||
version "6.2.0"
|
||||
resolved "https://registry.yarnpkg.com/react-i18next/-/react-i18next-6.2.0.tgz#08be7fa1e1e05b990a6058e73227500dcb89c8a6"
|
||||
dependencies:
|
||||
hoist-non-react-statics "2.3.1"
|
||||
html-parse-stringify2 "2.0.1"
|
||||
prop-types "^15.6.0"
|
||||
|
||||
react-icon-base@2.1.0:
|
||||
version "2.1.0"
|
||||
resolved "https://registry.yarnpkg.com/react-icon-base/-/react-icon-base-2.1.0.tgz#a196e33fdf1e7aaa1fda3aefbb68bdad9e82a79d"
|
||||
@@ -10934,6 +11243,11 @@ react-inspector@^2.2.2:
|
||||
babel-runtime "^6.26.0"
|
||||
is-dom "^1.0.9"
|
||||
|
||||
react-is@^16.3.2:
|
||||
version "16.7.0"
|
||||
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.7.0.tgz#c1bd21c64f1f1364c6f70695ec02d69392f41bfa"
|
||||
integrity sha512-Z0VRQdF4NPDoI0tsXVMLkJLiwEBa+RP66g0xDHxgxysxSoCUccSten4RTF/UFvZF1dZvZ9Zu1sx+MDXwcOR34g==
|
||||
|
||||
react-json-view@^1.16.1:
|
||||
version "1.16.1"
|
||||
resolved "https://registry.yarnpkg.com/react-json-view/-/react-json-view-1.16.1.tgz#ab81fc7db5af70135248704e37741cf097f46604"
|
||||
@@ -11752,7 +12066,12 @@ run-queue@^1.0.0, run-queue@^1.0.3:
|
||||
dependencies:
|
||||
aproba "^1.1.1"
|
||||
|
||||
rxjs@^6.1.0:
|
||||
rx@^4.1.0:
|
||||
version "4.1.0"
|
||||
resolved "https://registry.yarnpkg.com/rx/-/rx-4.1.0.tgz#a5f13ff79ef3b740fe30aa803fb09f98805d4782"
|
||||
integrity sha1-pfE/957zt0D+MKqAP7CfmIBdR4I=
|
||||
|
||||
rxjs@^6.1.0, rxjs@^6.4.0:
|
||||
version "6.4.0"
|
||||
resolved "https://registry.yarnpkg.com/rxjs/-/rxjs-6.4.0.tgz#f3bb0fe7bda7fb69deac0c16f17b50b0b8790504"
|
||||
integrity sha512-Z9Yfa11F6B9Sg/BK9MnqnQ+aQYicPLtilXBp2yUtDt2JRCE0h26d33EnfO3ZxoNxG0T92OUucP3Ct7cpfkdFfw==
|
||||
@@ -12200,7 +12519,7 @@ source-map-url@^0.4.0:
|
||||
resolved "https://registry.yarnpkg.com/source-map-url/-/source-map-url-0.4.0.tgz#3e935d7ddd73631b97659956d55128e87b5084a3"
|
||||
integrity sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=
|
||||
|
||||
source-map@0.5.x, source-map@^0.5.0, source-map@^0.5.1, source-map@^0.5.3, source-map@^0.5.6, source-map@~0.5.1:
|
||||
source-map@0.5.x, source-map@^0.5.0, source-map@^0.5.1, source-map@^0.5.3, source-map@^0.5.6, source-map@^0.5.7, source-map@~0.5.1:
|
||||
version "0.5.7"
|
||||
resolved "https://registry.yarnpkg.com/source-map/-/source-map-0.5.7.tgz#8a039d2d1021d22d1ea14c80d8ea468ba2ef3fcc"
|
||||
|
||||
@@ -12935,6 +13254,11 @@ typedarray@^0.0.6:
|
||||
version "0.0.6"
|
||||
resolved "https://registry.yarnpkg.com/typedarray/-/typedarray-0.0.6.tgz#867ac74e3864187b1d3d47d996a78ec5c8830777"
|
||||
|
||||
typescript@^2.9.2:
|
||||
version "2.9.2"
|
||||
resolved "https://registry.yarnpkg.com/typescript/-/typescript-2.9.2.tgz#1cbf61d05d6b96269244eb6a3bce4bd914e0f00c"
|
||||
integrity sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==
|
||||
|
||||
ua-parser-js@^0.7.9:
|
||||
version "0.7.17"
|
||||
resolved "https://registry.yarnpkg.com/ua-parser-js/-/ua-parser-js-0.7.17.tgz#e9ec5f9498b9ec910e7ae3ac626a805c4d09ecac"
|
||||
@@ -13338,10 +13662,6 @@ vm-browserify@0.0.4:
|
||||
dependencies:
|
||||
indexof "0.0.1"
|
||||
|
||||
void-elements@^2.0.1:
|
||||
version "2.0.1"
|
||||
resolved "https://registry.yarnpkg.com/void-elements/-/void-elements-2.0.1.tgz#c066afb582bb1cb4128d60ea92392e94d5e9dbec"
|
||||
|
||||
w3c-hr-time@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/w3c-hr-time/-/w3c-hr-time-1.0.1.tgz#82ac2bff63d950ea9e3189a58a65625fedf19045"
|
||||
@@ -13412,6 +13732,13 @@ wbuf@^1.7.3:
|
||||
dependencies:
|
||||
minimalistic-assert "^1.0.0"
|
||||
|
||||
wcwidth@^1.0.1:
|
||||
version "1.0.1"
|
||||
resolved "https://registry.yarnpkg.com/wcwidth/-/wcwidth-1.0.1.tgz#f0b0dcf915bc5ff1528afadb2c0e17b532da2fe8"
|
||||
integrity sha1-8LDc+RW8X/FSivrbLA4XtTLaL+g=
|
||||
dependencies:
|
||||
defaults "^1.0.3"
|
||||
|
||||
webidl-conversions@^4.0.2:
|
||||
version "4.0.2"
|
||||
resolved "https://registry.yarnpkg.com/webidl-conversions/-/webidl-conversions-4.0.2.tgz#a855980b1f0b6b359ba1d5d9fb39ae941faa63ad"
|
||||
|
@@ -1,5 +1,6 @@
|
||||
#!/bin/sh
|
||||
#This script copy all (versioned) files from Release_Windows into Release_Linux.
|
||||
#This is for GDevelop 4 only.
|
||||
|
||||
#Get the destination, or copy by default to Release_Linux directory
|
||||
DESTINATION=Release_Linux
|
||||
|
@@ -1,18 +1,20 @@
|
||||
@echo off
|
||||
echo Listing all sources files...
|
||||
echo Listing all GDCore, GDCpp, GDJS and Extensions sources files to translate...
|
||||
|
||||
dir ..\IDE\*.cpp /L /b /s |find /v /i "\wxstedit\" > %TEMP%\listfile.txt
|
||||
dir ..\IDE\*.h /L /b /s |find /v /i "\wxstedit\" >> %TEMP%\listfile.txt
|
||||
dir ..\GDCpp\GDCpp\*.cpp /L /B /S >> %TEMP%\listfile.txt
|
||||
dir ..\GDCpp\GDCpp\*.h /L /B /S >> %TEMP%\listfile.txt
|
||||
dir ..\GDJS\GDJS\*.cpp /L /B /S >> %TEMP%\listfile.txt
|
||||
dir ..\GDJS\GDJS\*.h /L /B /S >> %TEMP%\listfile.txt
|
||||
dir ..\Extensions\*.cpp /L /B /S >> %TEMP%\listfile.txt
|
||||
dir ..\Extensions\*.h /L /B /S >> %TEMP%\listfile.txt
|
||||
dir ..\Core\GDCore\*.cpp /L /B /S >> %TEMP%\listfile.txt
|
||||
dir ..\Core\GDCore\*.h /L /B /S >> %TEMP%\listfile.txt
|
||||
dir ..\GDCpp\GDCpp\*.cpp /L /B /S |find /v /i "\Dialogs\" > %TEMP%\listfile.txt
|
||||
dir ..\GDCpp\GDCpp\*.h /L /B /S |find /v /i "\Dialogs\" >> %TEMP%\listfile.txt
|
||||
dir ..\GDJS\GDJS\*.cpp /L /B /S |find /v /i "\Dialogs\" >> %TEMP%\listfile.txt
|
||||
dir ..\GDJS\GDJS\*.h /L /B /S |find /v /i "\Dialogs\" >> %TEMP%\listfile.txt
|
||||
dir ..\Extensions\*.cpp /L /B /S |find /v /i "\Dialogs\" >> %TEMP%\listfile.txt
|
||||
dir ..\Extensions\*.h /L /B /S |find /v /i "\Dialogs\" >> %TEMP%\listfile.txt
|
||||
dir ..\Core\GDCore\*.cpp /L /B /S |find /v /i "\Dialogs\" >> %TEMP%\listfile.txt
|
||||
dir ..\Core\GDCore\*.h /L /B /S |find /v /i "\Dialogs\" >> %TEMP%\listfile.txt
|
||||
REM Don't include old IDE anymore in the translations.
|
||||
REM newIDE translations are generated separately (see newIDE/app/scripts)
|
||||
REM dir ..\IDE\*.cpp /L /b /s |find /v /i "\wxstedit\" >> %TEMP%\listfile.txt
|
||||
REM dir ..\IDE\*.h /L /b /s |find /v /i "\wxstedit\" >> %TEMP%\listfile.txt
|
||||
|
||||
echo Generating .POT file...
|
||||
xgettext --from-code utf-8 -o source.pot --c++ --keyword=GD_T --no-wrap -f %TEMP%\listfile.txt -k_
|
||||
xgettext --from-code utf-8 -o gdcore-gdcpp-gdjs-extensions-messages.pot --c++ --keyword=GD_T --no-wrap -f %TEMP%\listfile.txt -k_
|
||||
|
||||
echo source.pot file generated and ready to be sent to Crowdin or used in a translation software like PoEdit.
|
||||
echo Translation file 'gdcore-gdcpp-gdjs-extensions-messages.pot' generated and ready to be sent to Crowdin or used in a translation software like PoEdit.
|
||||
|
@@ -1,19 +1,22 @@
|
||||
#Launch this script to generate the .POT file used
|
||||
#to update the strings to be translated.
|
||||
echo "Listing all sources files..."
|
||||
echo "ℹ️ Listing all GDCore, GDCpp, GDJS and Extensions sources files to translate..."
|
||||
|
||||
find ../IDE -name '*.cpp' | grep -v '/wxstedit/' > /tmp/listfile.txt
|
||||
find ../IDE -name '*.h' -o -name "*.hpp" | grep -v '/wxstedit/' >> /tmp/listfile.txt
|
||||
find ../GDCpp/GDCpp/ -name '*.cpp' >> /tmp/listfile.txt
|
||||
find ../GDCpp/GDCpp/ -name '*.h' -o -name "*.hpp" >> /tmp/listfile.txt
|
||||
find ../GDJS/GDJS/ -name '*.cpp' >> /tmp/listfile.txt
|
||||
find ../GDJS/GDJS/ -name '*.h' -o -name "*.hpp" >> /tmp/listfile.txt
|
||||
find ../Extensions/ -name '*.cpp' >> /tmp/listfile.txt
|
||||
find ../Extensions/ -name '*.h' -o -name "*.hpp" >> /tmp/listfile.txt
|
||||
find ../Core/GDCore -name '*.cpp' >> /tmp/listfile.txt
|
||||
find ../Core/GDCore -name '*.h' -o -name "*.hpp" >> /tmp/listfile.txt
|
||||
find ../GDCpp/GDCpp/ -name '*.cpp' | grep -v '/Dialogs/' > /tmp/listfile.txt
|
||||
find ../GDCpp/GDCpp/ -name '*.h' -o -name "*.hpp" | grep -v '/Dialogs/' >> /tmp/listfile.txt
|
||||
find ../GDJS/GDJS/ -name '*.cpp' | grep -v '/Dialogs/' >> /tmp/listfile.txt
|
||||
find ../GDJS/GDJS/ -name '*.h' -o -name "*.hpp" | grep -v '/Dialogs/' >> /tmp/listfile.txt
|
||||
find ../Extensions/ -name '*.cpp' | grep -v '/Dialogs/' >> /tmp/listfile.txt
|
||||
find ../Extensions/ -name '*.h' -o -name "*.hpp" | grep -v '/Dialogs/' >> /tmp/listfile.txt
|
||||
find ../Extensions/ -name '*.js' | grep -v 'box2d.js' >> /tmp/listfile.txt
|
||||
find ../Core/GDCore -name '*.cpp' | grep -v '/Dialogs/' >> /tmp/listfile.txt
|
||||
find ../Core/GDCore -name '*.h' -o -name "*.hpp" | grep -v '/Dialogs/' >> /tmp/listfile.txt
|
||||
# Don't include old IDE anymore in the translations.
|
||||
# newIDE translations are generated separately (see newIDE/app/scripts)
|
||||
# find ../IDE -name '*.cpp' | grep -v '/wxstedit/' >> /tmp/listfile.txt
|
||||
# find ../IDE -name '*.h' -o -name "*.hpp" | grep -v '/wxstedit/' >> /tmp/listfile.txt
|
||||
|
||||
echo "Generating .POT file..."
|
||||
echo "ℹ️ Generating .POT file..."
|
||||
if type xgettext 2>/dev/null; then
|
||||
GETTEXT=xgettext
|
||||
else
|
||||
@@ -21,8 +24,8 @@ else
|
||||
fi
|
||||
|
||||
if type $GETTEXT 2>/dev/null; then
|
||||
$GETTEXT --from-code utf-8 -o source.pot --c++ --keyword=GD_T --no-wrap -f /tmp/listfile.txt -k_
|
||||
echo "source.pot file generated and ready to be sent to Crowdin or used in a translation software like PoEdit."
|
||||
$GETTEXT --from-code utf-8 -o gdcore-gdcpp-gdjs-extensions-messages.pot --keyword=GD_T --no-wrap -f /tmp/listfile.txt -k_
|
||||
echo "ℹ️ Translation file 'gdcore-gdcpp-gdjs-extensions-messages.pot' generated and ready to be sent to Crowdin or used in a translation software like PoEdit."
|
||||
else
|
||||
echo "Unable to find xgettext on your system."
|
||||
echo "❌ Unable to find xgettext on your system."
|
||||
fi
|
||||
|
21450
scripts/source.pot
21450
scripts/source.pot
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user