diff --git a/.github/actions/test_build/action.yml b/.github/actions/test_build/action.yml new file mode 100644 index 000000000..44e59998e --- /dev/null +++ b/.github/actions/test_build/action.yml @@ -0,0 +1,19 @@ +name: build +description: Build Docusaurus project +inputs: + NODE_ENV: + description: Node environment + required: false + default: staging + TRACKJS_TOKEN: + description: Trackjs Token + required: false +runs: + using: composite + steps: + - name: Building Docusaurus project + env: + NODE_ENV: ${{ inputs.NODE_ENV }} + TRACKJS_TOKEN: ${{ inputs.TRACKJS_TOKEN }} + run: npm run build -- --locale en + shell: bash diff --git a/.github/workflows/coveralls.yml b/.github/workflows/coveralls.yml index d0f16ffd0..4c56e6f3f 100755 --- a/.github/workflows/coveralls.yml +++ b/.github/workflows/coveralls.yml @@ -18,7 +18,7 @@ jobs: - name: Install dependencies uses: './.github/actions/npm_install_from_cache' - name: Build - uses: ./.github/actions/build + uses: ./.github/actions/test_build - name: Run Tests run: npm run test -- --collectCoverage - name: Coveralls diff --git a/.github/workflows/translation_pull.yml b/.github/workflows/translation_pull.yml new file mode 100644 index 000000000..9a1a3f6d4 --- /dev/null +++ b/.github/workflows/translation_pull.yml @@ -0,0 +1,31 @@ +name: Crowdin Action + +on: + workflow_dispatch: + +jobs: + crowdin: + permissions: + contents: write + pull-requests: write + runs-on: ubuntu-latest + environment: Production + steps: + - name: Checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + + - name: Synchronize with Crowdin + uses: crowdin/github-action@v1 + with: + upload_sources: false + upload_translations: false + download_translations: true + localization_branch_name: l18n_crowdin_translations + create_pull_request: true + pull_request_title: 'New Crowdin translations' + pull_request_body: 'New Crowdin pull request with translations' + pull_request_base_branch_name: 'master' + env: + GITHUB_TOKEN: ${{ secrets.SERVICEACCOUNT_TOKEN }} + CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} + CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} diff --git a/.github/workflows/translation_push.yml b/.github/workflows/translation_push.yml new file mode 100644 index 000000000..80b5a5da4 --- /dev/null +++ b/.github/workflows/translation_push.yml @@ -0,0 +1,23 @@ +name: Crowdin Action + +on: + push: + paths: ['i18n/**'] + branches: [master] + +jobs: + crowdin-upload: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 + + - name: Crowdin push + uses: crowdin/github-action@v1 + with: + upload_sources: true + upload_translations: true + download_translations: false + env: + CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_PROJECT_ID }} + CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }} diff --git a/config/v3/get_account_status/receive.json b/config/v3/get_account_status/receive.json index f62462969..51b0bb05e 100644 --- a/config/v3/get_account_status/receive.json +++ b/config/v3/get_account_status/receive.json @@ -204,6 +204,101 @@ "expired", "suspected" ] + }, + "verified_jurisdiction": { + "description": "This represents the current status of authentication for each mt5 jurisdiction.", + "type": "object", + "additionalProperties": false, + "properties": { + "bvi": { + "description": "This represents whether the client is allowed or not to create an account under this jurisdiction", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "dsl": { + "description": "This represents whether the client is allowed or not to create an account under this jurisdiction", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "iom": { + "description": "This represents whether the client is allowed or not to create an account under this jurisdiction", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "labuan": { + "description": "This represents whether the client is allowed or not to create an account under this jurisdiction", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "malta": { + "description": "This represents whether the client is allowed or not to create an account under this jurisdiction", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "maltainvest": { + "description": "This represents whether the client is allowed or not to create an account under this jurisdiction", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "samoa": { + "description": "This represents whether the client is allowed or not to create an account under this jurisdiction", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "samoa-virtual": { + "description": "This represents whether the client is allowed or not to create an account under this jurisdiction", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "svg": { + "description": "This represents whether the client is allowed or not to create an account under this jurisdiction", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "vanuatu": { + "description": "This represents whether the client is allowed or not to create an account under this jurisdiction", + "type": "integer", + "enum": [ + 0, + 1 + ] + }, + "virtual": { + "description": "This represents whether the client is allowed or not to create an account under this jurisdiction", + "type": "integer", + "enum": [ + 0, + 1 + ] + } + } } } }, diff --git a/crowdin.yml b/crowdin.yml new file mode 100644 index 000000000..b6593a5d4 --- /dev/null +++ b/crowdin.yml @@ -0,0 +1,23 @@ +project_id: 585007 +api_token: CROWDIN_PERSONAL_TOKEN +base_path: '.' +base_url: 'https://api.crowdin.com' +preserve_hierarchy: true + +files: + # JSON translation files + - source: /i18n/en/**/* + translation: /i18n/%two_letters_code%/**/%original_file_name% + languages_mapping: + two_letters_code: + en: en + es-ES: es_ES + fr-FR: fr_FR + # Docs Markdown files + - source: /docs/**/* + translation: /i18n/%two_letters_code%/docusaurus-plugin-content-docs/current/**/%original_file_name% + languages_mapping: + two_letters_code: + en: en + es-ES: es_ES + fr-FR: fr_FR diff --git a/docusaurus.config.js b/docusaurus.config.js index 763a13a78..e2ee9d034 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -27,7 +27,12 @@ const config = { // to replace "en" with "zh-Hans". i18n: { defaultLocale: 'en', - locales: ['en'], + locales: ['en', 'es', 'fr'], + localeConfigs: { + en: { + label: 'English', + }, + }, }, plugins: [ diff --git a/i18n/en/code.json b/i18n/en/code.json new file mode 100644 index 000000000..96b1ddd56 --- /dev/null +++ b/i18n/en/code.json @@ -0,0 +1,316 @@ +{ + "theme.docs.DocCard.categoryDescription": { + "message": "{count} items", + "description": "The default description for a category card in the generated index about how many items this category includes" + }, + "theme.docs.paginator.navAriaLabel": { + "message": "Docs pages navigation", + "description": "The ARIA label for the docs pagination" + }, + "theme.docs.paginator.previous": { + "message": "Previous", + "description": "The label used to navigate to the previous doc" + }, + "theme.docs.paginator.next": { + "message": "Next", + "description": "The label used to navigate to the next doc" + }, + "theme.ErrorPageContent.title": { + "message": "This page crashed.", + "description": "The title of the fallback page when the page crashed" + }, + "theme.NotFound.title": { + "message": "Page Not Found", + "description": "The title of the 404 page" + }, + "theme.NotFound.p1": { + "message": "We could not find what you were looking for.", + "description": "The first paragraph of the 404 page" + }, + "theme.NotFound.p2": { + "message": "Please contact the owner of the site that linked you to the original URL and let them know their link is broken.", + "description": "The 2nd paragraph of the 404 page" + }, + "theme.admonition.note": { + "message": "note", + "description": "The default label used for the Note admonition (:::note)" + }, + "theme.admonition.tip": { + "message": "tip", + "description": "The default label used for the Tip admonition (:::tip)" + }, + "theme.admonition.danger": { + "message": "danger", + "description": "The default label used for the Danger admonition (:::danger)" + }, + "theme.admonition.info": { + "message": "info", + "description": "The default label used for the Info admonition (:::info)" + }, + "theme.admonition.caution": { + "message": "caution", + "description": "The default label used for the Caution admonition (:::caution)" + }, + "theme.BackToTopButton.buttonAriaLabel": { + "message": "Scroll back to top", + "description": "The ARIA label for the back to top button" + }, + "theme.blog.archive.title": { + "message": "Archive", + "description": "The page & hero title of the blog archive page" + }, + "theme.blog.archive.description": { + "message": "Archive", + "description": "The page & hero description of the blog archive page" + }, + "theme.blog.paginator.navAriaLabel": { + "message": "Blog list page navigation", + "description": "The ARIA label for the blog pagination" + }, + "theme.blog.paginator.newerEntries": { + "message": "Newer Entries", + "description": "The label used to navigate to the newer blog posts page (previous page)" + }, + "theme.blog.paginator.olderEntries": { + "message": "Older Entries", + "description": "The label used to navigate to the older blog posts page (next page)" + }, + "theme.blog.post.paginator.navAriaLabel": { + "message": "Blog post page navigation", + "description": "The ARIA label for the blog posts pagination" + }, + "theme.blog.post.paginator.newerPost": { + "message": "Newer Post", + "description": "The blog post button label to navigate to the newer/previous post" + }, + "theme.blog.post.paginator.olderPost": { + "message": "Older Post", + "description": "The blog post button label to navigate to the older/next post" + }, + "theme.blog.post.plurals": { + "message": "One post|{count} posts", + "description": "Pluralized label for \"{count} posts\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.blog.tagTitle": { + "message": "{nPosts} tagged with \"{tagName}\"", + "description": "The title of the page for a blog tag" + }, + "theme.tags.tagsPageLink": { + "message": "View All Tags", + "description": "The label of the link targeting the tag list page" + }, + "theme.colorToggle.ariaLabel": { + "message": "Switch between dark and light mode (currently {mode})", + "description": "The ARIA label for the navbar color mode toggle" + }, + "theme.colorToggle.ariaLabel.mode.dark": { + "message": "dark mode", + "description": "The name for the dark color mode" + }, + "theme.colorToggle.ariaLabel.mode.light": { + "message": "light mode", + "description": "The name for the light color mode" + }, + "theme.docs.breadcrumbs.navAriaLabel": { + "message": "Breadcrumbs", + "description": "The ARIA label for the breadcrumbs" + }, + "theme.docs.tagDocListPageTitle.nDocsTagged": { + "message": "One doc tagged|{count} docs tagged", + "description": "Pluralized label for \"{count} docs tagged\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.docs.tagDocListPageTitle": { + "message": "{nDocsTagged} with \"{tagName}\"", + "description": "The title of the page for a docs tag" + }, + "theme.docs.versionBadge.label": { + "message": "Version: {versionLabel}" + }, + "theme.common.headingLinkTitle": { + "message": "Direct link to {heading}", + "description": "Title for link to heading" + }, + "theme.docs.versions.unreleasedVersionLabel": { + "message": "This is unreleased documentation for {siteTitle} {versionLabel} version.", + "description": "The label used to tell the user that he's browsing an unreleased doc version" + }, + "theme.docs.versions.unmaintainedVersionLabel": { + "message": "This is documentation for {siteTitle} {versionLabel}, which is no longer actively maintained.", + "description": "The label used to tell the user that he's browsing an unmaintained doc version" + }, + "theme.docs.versions.latestVersionSuggestionLabel": { + "message": "For up-to-date documentation, see the {latestVersionLink} ({versionLabel}).", + "description": "The label used to tell the user to check the latest version" + }, + "theme.docs.versions.latestVersionLinkLabel": { + "message": "latest version", + "description": "The label used for the latest version suggestion link label" + }, + "theme.common.editThisPage": { + "message": "Edit this page", + "description": "The link label to edit the current page" + }, + "theme.lastUpdated.atDate": { + "message": " on {date}", + "description": "The words used to describe on which date a page has been last updated" + }, + "theme.lastUpdated.byUser": { + "message": " by {user}", + "description": "The words used to describe by who the page has been last updated" + }, + "theme.lastUpdated.lastUpdatedAtBy": { + "message": "Last updated{atDate}{byUser}", + "description": "The sentence used to display when a page has been last updated, and by who" + }, + "theme.navbar.mobileVersionsDropdown.label": { + "message": "Versions", + "description": "The label for the navbar versions dropdown on mobile view" + }, + "theme.tags.tagsListLabel": { + "message": "Tags:", + "description": "The label alongside a tag list" + }, + "theme.AnnouncementBar.closeButtonAriaLabel": { + "message": "Close", + "description": "The ARIA label for close button of announcement bar" + }, + "theme.blog.sidebar.navAriaLabel": { + "message": "Blog recent posts navigation", + "description": "The ARIA label for recent posts in the blog sidebar" + }, + "theme.CodeBlock.copied": { + "message": "Copied", + "description": "The copied button label on code blocks" + }, + "theme.CodeBlock.copyButtonAriaLabel": { + "message": "Copy code to clipboard", + "description": "The ARIA label for copy code blocks button" + }, + "theme.CodeBlock.copy": { + "message": "Copy", + "description": "The copy button label on code blocks" + }, + "theme.CodeBlock.wordWrapToggle": { + "message": "Toggle word wrap", + "description": "The title attribute for toggle word wrapping button of code block lines" + }, + "theme.DocSidebarItem.toggleCollapsedCategoryAriaLabel": { + "message": "Toggle the collapsible sidebar category '{label}'", + "description": "The ARIA label to toggle the collapsible sidebar category" + }, + "theme.navbar.mobileLanguageDropdown.label": { + "message": "Languages", + "description": "The label for the mobile language switcher dropdown" + }, + "theme.NavBar.navAriaLabel": { + "message": "Main", + "description": "The ARIA label for the main navigation" + }, + "theme.TOCCollapsible.toggleButtonLabel": { + "message": "On this page", + "description": "The label used by the button on the collapsible TOC component" + }, + "theme.blog.post.readMore": { + "message": "Read More", + "description": "The label used in blog post item excerpts to link to full blog posts" + }, + "theme.blog.post.readMoreLabel": { + "message": "Read more about {title}", + "description": "The ARIA label for the link to full blog posts from excerpts" + }, + "theme.blog.post.readingTime.plurals": { + "message": "One min read|{readingTime} min read", + "description": "Pluralized label for \"{readingTime} min read\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.docs.breadcrumbs.home": { + "message": "Home page", + "description": "The ARIA label for the home page in the breadcrumbs" + }, + "theme.docs.sidebar.collapseButtonTitle": { + "message": "Collapse sidebar", + "description": "The title attribute for collapse button of doc sidebar" + }, + "theme.docs.sidebar.collapseButtonAriaLabel": { + "message": "Collapse sidebar", + "description": "The title attribute for collapse button of doc sidebar" + }, + "theme.docs.sidebar.navAriaLabel": { + "message": "Docs sidebar", + "description": "The ARIA label for the sidebar navigation" + }, + "theme.docs.sidebar.closeSidebarButtonAriaLabel": { + "message": "Close navigation bar", + "description": "The ARIA label for close button of mobile sidebar" + }, + "theme.docs.sidebar.toggleSidebarButtonAriaLabel": { + "message": "Toggle navigation bar", + "description": "The ARIA label for hamburger menu button of mobile navigation" + }, + "theme.navbar.mobileSidebarSecondaryMenu.backButtonLabel": { + "message": "← Back to main menu", + "description": "The label of the back button to return to main menu, inside the mobile navbar sidebar secondary menu (notably used to display the docs sidebar)" + }, + "theme.docs.sidebar.expandButtonTitle": { + "message": "Expand sidebar", + "description": "The ARIA label and title attribute for expand button of doc sidebar" + }, + "theme.docs.sidebar.expandButtonAriaLabel": { + "message": "Expand sidebar", + "description": "The ARIA label and title attribute for expand button of doc sidebar" + }, + "theme.Playground.result": { + "message": "Result", + "description": "The result label of the live codeblocks" + }, + "theme.Playground.liveEditor": { + "message": "Live Editor", + "description": "The live editor label of the live codeblocks" + }, + "theme.SearchBar.noResultsText": { + "message": "No results" + }, + "theme.SearchBar.seeAll": { + "message": "See all results" + }, + "theme.SearchBar.seeAllOutsideContext": { + "message": "See results outside {context}" + }, + "theme.SearchBar.searchInContext": { + "message": "See all results in {context}" + }, + "theme.SearchBar.label": { + "message": "Search", + "description": "The ARIA label and placeholder for search button" + }, + "theme.SearchPage.existingResultsTitle": { + "message": "Search results for \"{query}\"", + "description": "The search page title for non-empty query" + }, + "theme.SearchPage.emptyResultsTitle": { + "message": "Search the documentation", + "description": "The search page title for empty query" + }, + "theme.SearchPage.searchContext.everywhere": { + "message": "everywhere" + }, + "theme.SearchPage.documentsFound.plurals": { + "message": "1 document found|{count} documents found", + "description": "Pluralized label for \"{count} documents found\". Use as much plural forms (separated by \"|\") as your language support (see https://www.unicode.org/cldr/cldr-aux/charts/34/supplemental/language_plural_rules.html)" + }, + "theme.SearchPage.noResultsText": { + "message": "No documents were found", + "description": "The paragraph for empty search result" + }, + "theme.ErrorPageContent.tryAgain": { + "message": "Try again", + "description": "The label of the button to try again rendering when the React error boundary captures an error" + }, + "theme.common.skipToMainContent": { + "message": "Skip to main content", + "description": "The skip to content label used for accessibility, allowing to rapidly navigate to main content with keyboard tab/enter navigation" + }, + "theme.tags.tagsPageTitle": { + "message": "Tags", + "description": "The title of the tag list page" + } +} diff --git a/i18n/en/docusaurus-plugin-content-docs/current.json b/i18n/en/docusaurus-plugin-content-docs/current.json new file mode 100644 index 000000000..d0e761f4b --- /dev/null +++ b/i18n/en/docusaurus-plugin-content-docs/current.json @@ -0,0 +1,66 @@ +{ + "version.label": { + "message": "Next", + "description": "The label for version current." + }, + "sidebar.tutorialSidebar.category.Core concepts": { + "message": "Core concepts", + "description": "The label for category Core concepts in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.Core concepts.link.generated-index.description": { + "message": "Learn to use API WebSocket and API calls to create your customised trading app.", + "description": "The generated-index page description for category Core concepts in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.Code examples": { + "message": "Code examples", + "description": "The label for category Code examples in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.Code examples.link.generated-index.title": { + "message": "Code examples", + "description": "The generated-index page title for category Code examples in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.Code examples.link.generated-index.description": { + "message": "Find out which API codes are available for you to use to build your trading app. Learn with API examples.", + "description": "The generated-index page description for category Code examples in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.Javascript Examples": { + "message": "Javascript Examples", + "description": "The label for category Javascript Examples in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.Javascript Examples.link.generated-index.title": { + "message": "JavaScript examples", + "description": "The generated-index page title for category Javascript Examples in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.Javascript Examples.link.generated-index.description": { + "message": "Explore JavaScript codes you can use to build your trading app. Learn through JavaScript examples and API examples.", + "description": "The generated-index page description for category Javascript Examples in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.Languages": { + "message": "Languages", + "description": "The label for category Languages in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.Languages.link.generated-index.title": { + "message": "Programming languages", + "description": "The generated-index page title for category Languages in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.Languages.link.generated-index.description": { + "message": "Select your preferred programming language to create a trading app with the help of our WebSocket API. Start learning with these code examples.", + "description": "The generated-index page description for category Languages in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.JavaScript": { + "message": "JavaScript", + "description": "The label for category JavaScript in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.JavaScript.link.generated-index.description": { + "message": "Start building your trading app with Javascript, HTML, and CSS via our WebSocket API.", + "description": "The generated-index page description for category JavaScript in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.Guides": { + "message": "Guides", + "description": "The label for category Guides in sidebar tutorialSidebar" + }, + "sidebar.tutorialSidebar.category.Guides.link.generated-index.description": { + "message": "A guide to the Deriv API, including API examples to create a trading app with comprehensive features similar to Deriv Trader. Get started today!", + "description": "The generated-index page description for category Guides in sidebar tutorialSidebar" + } +} diff --git a/i18n/en/docusaurus-theme-classic/navbar.json b/i18n/en/docusaurus-theme-classic/navbar.json new file mode 100644 index 000000000..f9f5456c2 --- /dev/null +++ b/i18n/en/docusaurus-theme-classic/navbar.json @@ -0,0 +1,26 @@ +{ + "logo.alt": { + "message": "Deriv API logo", + "description": "The alt text of navbar logo" + }, + "item.label.Documentation": { + "message": "Documentation", + "description": "Navbar item with label Documentation" + }, + "item.label.Dashboard": { + "message": "Dashboard", + "description": "Navbar item with label Dashboard" + }, + "item.label.API Explorer": { + "message": "API Explorer", + "description": "Navbar item with label API Explorer" + }, + "item.label.Blog": { + "message": "Blog", + "description": "Navbar item with label Blog" + }, + "item.label.Bug bounty": { + "message": "Bug bounty", + "description": "Navbar item with label Bug bounty" + } +}