From 9ab0eb3ecb8be9b83f2b84afbd266df2c5153bb9 Mon Sep 17 00:00:00 2001 From: kaankacar Date: Mon, 1 Dec 2025 17:54:54 +0300 Subject: [PATCH 1/8] feat: add Google Translate integration --- docusaurus.config.ts | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 6dc69df0f9..7cffea9462 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -31,7 +31,27 @@ const config: Config = { defaultLocale: DEFAULT_LOCALE, locales: ["en", "es"], }, + scripts: [ + 'https://buttons.github.io/buttons.js', + 'https://use.fontawesome.com/221fd444f5.js', + 'https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit', + ], plugins: [ + () => ({ + name: 'google-translate-init', + injectHtmlTags() { + return { + headTags: [ + { + tagName: 'script', + innerHTML: ` + function googleTranslateElementInit() {} + `, + }, + ], + }; + }, + }), "docusaurus-plugin-sass", [ "docusaurus-plugin-sentry", @@ -161,6 +181,12 @@ const config: Config = { className: "header-github-link", 'aria-label': "GitHub", }, + { + type: 'html', + position: 'right', + value: + '
', + }, ], }, algolia: { From 37c791c69722c65b235e5fb2f1683dc0629c992e Mon Sep 17 00:00:00 2001 From: kaankacar Date: Wed, 3 Dec 2025 17:53:43 +0300 Subject: [PATCH 2/8] Fix Google Translate header visibility and navbar overlap --- src/css/custom.scss | 60 ++++++++++++++++++++++++--------------------- 1 file changed, 32 insertions(+), 28 deletions(-) diff --git a/src/css/custom.scss b/src/css/custom.scss index 8442d2d706..a7368369d4 100644 --- a/src/css/custom.scss +++ b/src/css/custom.scss @@ -66,12 +66,10 @@ html[data-theme="dark"] { --ifm-background-color: var(--ifm-color-black); } -.markdown > h4 { +.markdown>h4 { --ifm-h4-font-size: 1.25rem; - margin-bottom: calc( - var(--ifm-heading-vertical-rhythm-bottom) * var(--ifm-leading) - ); + margin-bottom: calc(var(--ifm-heading-vertical-rhythm-bottom) * var(--ifm-leading)); margin-top: calc(var(--ifm-h4-vertical-rhythm-top) * var(--ifm-leading)); } @@ -93,8 +91,7 @@ html[data-theme="dark"] { svg { height: 1.5rem; width: 1.5rem; - transition: color var(--ifm-transition-fast) - var(--ifm-transition-timing-default); + transition: color var(--ifm-transition-fast) var(--ifm-transition-timing-default); &:hover, &:focus { @@ -126,20 +123,14 @@ html[data-theme="dark"] { div[class^="announcementBar_"] { font-size: 18px; - --site-announcement-bar-stripe-color1: hsl( - var(--site-primary-hue-saturation) 85% - ); - --site-announcement-bar-stripe-color2: hsl( - var(--site-primary-hue-saturation) 95% - ); - - background: repeating-linear-gradient( - 35deg, - var(--site-announcement-bar-stripe-color1), - var(--site-announcement-bar-stripe-color1) 20px, - var(--site-announcement-bar-stripe-color2) 10px, - var(--site-announcement-bar-stripe-color2) 40px - ); + --site-announcement-bar-stripe-color1: hsl(var(--site-primary-hue-saturation) 85%); + --site-announcement-bar-stripe-color2: hsl(var(--site-primary-hue-saturation) 95%); + + background: repeating-linear-gradient(35deg, + var(--site-announcement-bar-stripe-color1), + var(--site-announcement-bar-stripe-color1) 20px, + var(--site-announcement-bar-stripe-color2) 10px, + var(--site-announcement-bar-stripe-color2) 40px); height: fit-content; } @@ -162,7 +153,7 @@ div[class^="announcementBar_"] { } } -.navbar .dropdown > a.active { +.navbar .dropdown>a.active { color: var(--ifm-color-primary); } @@ -210,15 +201,15 @@ select[data-testid="example-pairing-select"] { max-width: 135%; thead { - color: var(--ifm-color-primary-darker); - background-color: var(--ifm-color-gray-300); - font-size: large; - text-align: left; - text-wrap: nowrap; + color: var(--ifm-color-primary-darker); + background-color: var(--ifm-color-gray-300); + font-size: large; + text-align: left; + text-wrap: nowrap; } td { - font-size: small; + font-size: small; } } @@ -231,8 +222,21 @@ select[data-testid="example-pairing-select"] { .dropdown__link.has-nested-items::after { content: '➜'; - margin-left: 10px; // spacing (use margin instead of padding when using flex) + margin-left: 10px; // spacing (use margin instead of padding when using flex) font-size: 1em; line-height: 1; display: inline-block; +} + +/* Fix for Google Translate making headers invisible */ +html.translated-ltr .hash-link, +html.translated-rtl .hash-link { + opacity: 1 !important; + visibility: visible !important; +} + +/* Fix for Google Translate bar overlapping the navbar */ +html.translated-ltr .navbar, +html.translated-rtl .navbar { + top: 40px; } \ No newline at end of file From c3779dfaf2a4caa7348833fe1ef7d9e667678a3b Mon Sep 17 00:00:00 2001 From: kaankacar Date: Tue, 16 Dec 2025 04:01:31 +0400 Subject: [PATCH 3/8] Address PR feedback: extract plugin, clean up config, fix invisible headers - Remove unnecessary scripts (buttons.github.io, fontawesome) - Extract google-translate-init plugin to src/google-translate-plugin.js - Move navbar HTML to GOOGLE_TRANSLATE_ELEMENT constant in config/constants.ts - Fix invisible headers by marking hash-links with notranslate class - Add MutationObserver for SPA navigation support - Update CSS with visibility fallback rules --- config/constants.ts | 2 + docusaurus.config.ts | 23 ++-------- src/css/custom.scss | 84 ++++++++++++++++++++++++++++++++-- src/google-translate-plugin.js | 51 +++++++++++++++++++++ 4 files changed, 136 insertions(+), 24 deletions(-) create mode 100644 src/google-translate-plugin.js diff --git a/config/constants.ts b/config/constants.ts index abe2625224..d3d69655a9 100644 --- a/config/constants.ts +++ b/config/constants.ts @@ -9,3 +9,5 @@ export const makeEditUrl = ({ locale, versionDocsDirPath, docPath }) => { } return `https://github.com/stellar/stellar-docs/edit/main/${versionDocsDirPath}/${docPath}` }; + +export const GOOGLE_TRANSLATE_ELEMENT = `
`; diff --git a/docusaurus.config.ts b/docusaurus.config.ts index 7cffea9462..a2f1a27350 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -2,7 +2,7 @@ import remarkMath from 'remark-math'; import rehypeKatex from 'rehype-katex'; import { themes as prismThemes } from 'prism-react-renderer'; -import { makeEditUrl, DEFAULT_LOCALE } from './config/constants'; +import { makeEditUrl, DEFAULT_LOCALE, GOOGLE_TRANSLATE_ELEMENT } from './config/constants'; import { anchorPlatformPluginInstances } from './config/anchorPlatform.config'; import { disbursementPlatformPluginInstances } from './config/disbursementPlatform.config'; import navbarItems from './config/theme/navbar'; @@ -32,26 +32,10 @@ const config: Config = { locales: ["en", "es"], }, scripts: [ - 'https://buttons.github.io/buttons.js', - 'https://use.fontawesome.com/221fd444f5.js', 'https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit', ], plugins: [ - () => ({ - name: 'google-translate-init', - injectHtmlTags() { - return { - headTags: [ - { - tagName: 'script', - innerHTML: ` - function googleTranslateElementInit() {} - `, - }, - ], - }; - }, - }), + require("./src/google-translate-plugin"), "docusaurus-plugin-sass", [ "docusaurus-plugin-sentry", @@ -184,8 +168,7 @@ const config: Config = { { type: 'html', position: 'right', - value: - '
', + value: GOOGLE_TRANSLATE_ELEMENT, }, ], }, diff --git a/src/css/custom.scss b/src/css/custom.scss index a7368369d4..2d25d6cd0a 100644 --- a/src/css/custom.scss +++ b/src/css/custom.scss @@ -229,10 +229,86 @@ select[data-testid="example-pairing-select"] { } /* Fix for Google Translate making headers invisible */ -html.translated-ltr .hash-link, -html.translated-rtl .hash-link { - opacity: 1 !important; - visibility: visible !important; +html.translated-ltr, +html.translated-rtl { + + /* Force visibility on ALL elements inside headings - wildcard approach */ + h1, + h2, + h3, + h4, + h5, + h6, + h1 *, + h2 *, + h3 *, + h4 *, + h5 *, + h6 *, + .markdown h1, + .markdown h2, + .markdown h3, + .markdown h4, + .markdown h5, + .markdown h6, + .markdown h1 *, + .markdown h2 *, + .markdown h3 *, + .markdown h4 *, + .markdown h5 *, + .markdown h6 * { + visibility: visible !important; + opacity: 1 !important; + } + + /* Ensure headings maintain their color */ + h1, + h2, + h3, + h4, + h5, + h6 { + color: var(--ifm-heading-color) !important; + } + + /* Target all Google Translate injected elements (font, span, etc.) */ + h1 font, + h2 font, + h3 font, + h4 font, + h5 font, + h6 font, + h1 span, + h2 span, + h3 span, + h4 span, + h5 span, + h6 span { + color: inherit !important; + background-color: transparent !important; + font-style: inherit !important; + } + + /* Hash-link anchors - force visible */ + .hash-link, + a.hash-link, + h1>a, + h2>a, + h3>a, + h4>a, + h5>a, + h6>a { + visibility: visible !important; + opacity: 1 !important; + display: inline-block !important; + } + + /* Ensure translated text inside anchors is visible */ + .hash-link *, + a.hash-link * { + visibility: visible !important; + opacity: 1 !important; + } } /* Fix for Google Translate bar overlapping the navbar */ diff --git a/src/google-translate-plugin.js b/src/google-translate-plugin.js new file mode 100644 index 0000000000..d97e09e7de --- /dev/null +++ b/src/google-translate-plugin.js @@ -0,0 +1,51 @@ +module.exports = function googleTranslatePlugin(context, options) { + return { + name: 'google-translate-init', + injectHtmlTags() { + return { + headTags: [ + { + tagName: 'script', + innerHTML: ` + function googleTranslateElementInit() {} + + // Add notranslate class to hash-links so Google Translate ignores them + // This prevents header text from being merged with anchor links + function markHashLinksAsNotTranslate() { + document.querySelectorAll('.hash-link, a[href^="#"]').forEach(function(el) { + el.classList.add('notranslate'); + el.setAttribute('translate', 'no'); + }); + } + + // Run on initial page load + if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', markHashLinksAsNotTranslate); + } else { + markHashLinksAsNotTranslate(); + } + + // Run on SPA navigation (Docusaurus uses client-side routing) + // Use MutationObserver to detect when new content is added + var observer = new MutationObserver(function(mutations) { + markHashLinksAsNotTranslate(); + }); + + // Start observing when DOM is ready + function startObserving() { + var target = document.querySelector('main') || document.body; + observer.observe(target, { childList: true, subtree: true }); + } + + if (document.readyState === 'loading') { + document.addEventListener('DOMContentLoaded', startObserving); + } else { + startObserving(); + } + `, + }, + ], + }; + }, + }; +}; From c6dab9772f289d6d6e3e56d5f3cba624cfd802e5 Mon Sep 17 00:00:00 2001 From: kaankacar Date: Tue, 16 Dec 2025 04:36:15 +0400 Subject: [PATCH 4/8] Fix: hash-links now only visible on hover after translation --- src/css/custom.scss | 34 ++++++++++++++++------------------ 1 file changed, 16 insertions(+), 18 deletions(-) diff --git a/src/css/custom.scss b/src/css/custom.scss index 2d25d6cd0a..360b72688d 100644 --- a/src/css/custom.scss +++ b/src/css/custom.scss @@ -232,31 +232,31 @@ select[data-testid="example-pairing-select"] { html.translated-ltr, html.translated-rtl { - /* Force visibility on ALL elements inside headings - wildcard approach */ + /* Force visibility on ALL elements inside headings EXCEPT hash-links */ h1, h2, h3, h4, h5, h6, - h1 *, - h2 *, - h3 *, - h4 *, - h5 *, - h6 *, + h1 *:not(.hash-link), + h2 *:not(.hash-link), + h3 *:not(.hash-link), + h4 *:not(.hash-link), + h5 *:not(.hash-link), + h6 *:not(.hash-link), .markdown h1, .markdown h2, .markdown h3, .markdown h4, .markdown h5, .markdown h6, - .markdown h1 *, - .markdown h2 *, - .markdown h3 *, - .markdown h4 *, - .markdown h5 *, - .markdown h6 * { + .markdown h1 *:not(.hash-link), + .markdown h2 *:not(.hash-link), + .markdown h3 *:not(.hash-link), + .markdown h4 *:not(.hash-link), + .markdown h5 *:not(.hash-link), + .markdown h6 *:not(.hash-link) { visibility: visible !important; opacity: 1 !important; } @@ -289,7 +289,7 @@ html.translated-rtl { font-style: inherit !important; } - /* Hash-link anchors - force visible */ + /* Hash-link anchors - keep default opacity (hidden until hover) but ensure visibility works */ .hash-link, a.hash-link, h1>a, @@ -299,15 +299,13 @@ html.translated-rtl { h5>a, h6>a { visibility: visible !important; - opacity: 1 !important; - display: inline-block !important; + /* Don't force opacity - let default hover behavior work */ } - /* Ensure translated text inside anchors is visible */ + /* Ensure translated text inside anchors inherits correct styles */ .hash-link *, a.hash-link * { visibility: visible !important; - opacity: 1 !important; } } From 6267afba7e975a5d93121c3052b3856f96d41662 Mon Sep 17 00:00:00 2001 From: Elliot Date: Tue, 6 Jan 2026 11:00:11 -0600 Subject: [PATCH 5/8] break google translate feature into discrete chunks --- config/constants.ts | 3 +- config/theme/navbar.ts | 21 ++++++- docusaurus.config.ts | 16 ++---- src/css/custom.scss | 102 +++++---------------------------- src/google-translate-plugin.js | 51 ----------------- 5 files changed, 42 insertions(+), 151 deletions(-) delete mode 100644 src/google-translate-plugin.js diff --git a/config/constants.ts b/config/constants.ts index c51da45dbe..8cdc3ced1e 100644 --- a/config/constants.ts +++ b/config/constants.ts @@ -39,4 +39,5 @@ export const CODE_LANGS = { yaml: 'YAML', }; -export const GOOGLE_TRANSLATE_ELEMENT = `
`; +const GOOGLE_TRANSLATE_LANGUAGES: string = "af,sq,am,en,fa,ar,ps,ja,zh-CN,hy,az,eu,be,bn,bs,bg,ca,ceb,ny,zh-TW,co,hr,cs,da,nl,eo,et,tl,fi,fr,fy,gl,ka,de,el,gu,ht,ha,haw,iw,hi,hmn,hu,is,ig,id,ga,it,jw,kn,kk,km,ko,ku,ky,lo,la,lv,lt,lb,mk,mg,ms,ml,mt,mi,mr,mn,my,ne,no,pl,pt,pa,ro,ru,sm,gd,sr,st,sn,sd,si,sk,sl,so,es,su,sw,sv,tg,ta,te,th,tr,uk,ur,uz,vi,cy,xh,yi,yo,zu"; +export const GOOGLE_TRANSLATE_ELEMENT: string = ``; diff --git a/config/theme/navbar.ts b/config/theme/navbar.ts index a5870d4e2b..0acec176d5 100644 --- a/config/theme/navbar.ts +++ b/config/theme/navbar.ts @@ -1,4 +1,5 @@ -import type { NavbarItem } from '@docusaurus/theme-common' +import type { NavbarItem } from '@docusaurus/theme-common'; +import { GOOGLE_TRANSLATE_ELEMENT } from '../constants'; const build: NavbarItem = { type: 'dropdown', @@ -510,6 +511,23 @@ const validators: NavbarItem = { ] } +const translation: NavbarItem[] = [ + { + type: 'html', + position: 'right', + value: '
', + }, + { + type: 'html', + position: 'right', + value: GOOGLE_TRANSLATE_ELEMENT, + }, + { + type: 'localeDropdown', + position: 'right', + }, +] + export default { build, learn, @@ -518,4 +536,5 @@ export default { tools, networks, validators, + translation, } diff --git a/docusaurus.config.ts b/docusaurus.config.ts index bd81dbb710..ccffd79126 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -32,10 +32,12 @@ const config: Config = { locales: ["en", "es"], }, scripts: [ - 'https://translate.google.com/translate_a/element.js?cb=googleTranslateElementInit', + { + src: 'https://translate.google.com/translate_a/element.js', + async: true, + }, ], plugins: [ - require("./src/google-translate-plugin"), "docusaurus-plugin-sass", [ "docusaurus-plugin-sentry", @@ -173,21 +175,13 @@ const config: Config = { navbarItems.tools, navbarItems.networks, navbarItems.validators, - { - type: 'localeDropdown', - position: 'right', - }, + ...navbarItems.translation, { href: "https://github.com/stellar/stellar-docs", position: "right", className: "header-github-link", 'aria-label': "GitHub", }, - { - type: 'html', - position: 'right', - value: GOOGLE_TRANSLATE_ELEMENT, - }, ], }, algolia: { diff --git a/src/css/custom.scss b/src/css/custom.scss index e780babfb9..87ce93bec3 100644 --- a/src/css/custom.scss +++ b/src/css/custom.scss @@ -193,6 +193,21 @@ select[data-testid="example-pairing-select"] { var(--ifm-transition-timing-default); } +.goog-te-gadget .goog-te-combo { + margin: 0 !important; +} + +.my-google-translate-button::before { + content: ''; + width: 24px; + height: 24px; + display: flex; + background-color: var(--ifm-navbar-link-color); + mask-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' aria-hidden='true' style='vertical-align: text-bottom' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath fill='currentColor' d='M12.87 15.07l-2.54-2.51.03-.03c1.74-1.94 2.98-4.17 3.71-6.53H17V4h-7V2H8v2H1v1.99h11.17C11.5 7.92 10.44 9.75 9 11.35 8.07 10.32 7.3 9.19 6.69 8h-2c.73 1.63 1.73 3.17 2.98 4.56l-5.09 5.02L4 19l5-5 3.11 3.11.76-2.04zM18.5 10h-2L12 22h2l1.12-3h4.75L21 22h2l-4.5-12zm-2.62 7l1.62-4.33L19.12 17h-3.24z'%3E%3C/path%3E%3C/svg%3E"); + transition: background-color var(--ifm-transition-fast) + var(--ifm-transition-timing-default); +} + /* Hubble data dictionary formatting */ .scoped-data-dictionary-table table { display: table; @@ -226,90 +241,3 @@ select[data-testid="example-pairing-select"] { line-height: 1; display: inline-block; } - -/* Fix for Google Translate making headers invisible */ -html.translated-ltr, -html.translated-rtl { - - /* Force visibility on ALL elements inside headings EXCEPT hash-links */ - h1, - h2, - h3, - h4, - h5, - h6, - h1 *:not(.hash-link), - h2 *:not(.hash-link), - h3 *:not(.hash-link), - h4 *:not(.hash-link), - h5 *:not(.hash-link), - h6 *:not(.hash-link), - .markdown h1, - .markdown h2, - .markdown h3, - .markdown h4, - .markdown h5, - .markdown h6, - .markdown h1 *:not(.hash-link), - .markdown h2 *:not(.hash-link), - .markdown h3 *:not(.hash-link), - .markdown h4 *:not(.hash-link), - .markdown h5 *:not(.hash-link), - .markdown h6 *:not(.hash-link) { - visibility: visible !important; - opacity: 1 !important; - } - - /* Ensure headings maintain their color */ - h1, - h2, - h3, - h4, - h5, - h6 { - color: var(--ifm-heading-color) !important; - } - - /* Target all Google Translate injected elements (font, span, etc.) */ - h1 font, - h2 font, - h3 font, - h4 font, - h5 font, - h6 font, - h1 span, - h2 span, - h3 span, - h4 span, - h5 span, - h6 span { - color: inherit !important; - background-color: transparent !important; - font-style: inherit !important; - } - - /* Hash-link anchors - keep default opacity (hidden until hover) but ensure visibility works */ - .hash-link, - a.hash-link, - h1>a, - h2>a, - h3>a, - h4>a, - h5>a, - h6>a { - visibility: visible !important; - /* Don't force opacity - let default hover behavior work */ - } - - /* Ensure translated text inside anchors inherits correct styles */ - .hash-link *, - a.hash-link * { - visibility: visible !important; - } -} - -/* Fix for Google Translate bar overlapping the navbar */ -html.translated-ltr .navbar, -html.translated-rtl .navbar { - top: 40px; -} diff --git a/src/google-translate-plugin.js b/src/google-translate-plugin.js deleted file mode 100644 index d97e09e7de..0000000000 --- a/src/google-translate-plugin.js +++ /dev/null @@ -1,51 +0,0 @@ -module.exports = function googleTranslatePlugin(context, options) { - return { - name: 'google-translate-init', - injectHtmlTags() { - return { - headTags: [ - { - tagName: 'script', - innerHTML: ` - function googleTranslateElementInit() {} - - // Add notranslate class to hash-links so Google Translate ignores them - // This prevents header text from being merged with anchor links - function markHashLinksAsNotTranslate() { - document.querySelectorAll('.hash-link, a[href^="#"]').forEach(function(el) { - el.classList.add('notranslate'); - el.setAttribute('translate', 'no'); - }); - } - - // Run on initial page load - if (document.readyState === 'loading') { - document.addEventListener('DOMContentLoaded', markHashLinksAsNotTranslate); - } else { - markHashLinksAsNotTranslate(); - } - - // Run on SPA navigation (Docusaurus uses client-side routing) - // Use MutationObserver to detect when new content is added - var observer = new MutationObserver(function(mutations) { - markHashLinksAsNotTranslate(); - }); - - // Start observing when DOM is ready - function startObserving() { - var target = document.querySelector('main') || document.body; - observer.observe(target, { childList: true, subtree: true }); - } - - if (document.readyState === 'loading') { - document.addEventListener('DOMContentLoaded', startObserving); - } else { - startObserving(); - } - `, - }, - ], - }; - }, - }; -}; From 3ae62bcd43f534db61a6b1ba33a12b7a8e39746e Mon Sep 17 00:00:00 2001 From: Elliot Date: Tue, 6 Jan 2026 11:16:52 -0600 Subject: [PATCH 6/8] disable docusaurus i18n functionality --- config/theme/navbar.ts | 8 ++++---- docusaurus.config.ts | 13 +++++++------ 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/config/theme/navbar.ts b/config/theme/navbar.ts index 0acec176d5..c916007b36 100644 --- a/config/theme/navbar.ts +++ b/config/theme/navbar.ts @@ -522,10 +522,10 @@ const translation: NavbarItem[] = [ position: 'right', value: GOOGLE_TRANSLATE_ELEMENT, }, - { - type: 'localeDropdown', - position: 'right', - }, + // { + // type: 'localeDropdown', + // position: 'right', + // }, ] export default { diff --git a/docusaurus.config.ts b/docusaurus.config.ts index ccffd79126..3f7570a17f 100644 --- a/docusaurus.config.ts +++ b/docusaurus.config.ts @@ -2,7 +2,7 @@ import remarkMath from 'remark-math'; import rehypeKatex from 'rehype-katex'; import { themes as prismThemes } from 'prism-react-renderer'; -import { makeEditUrl, DEFAULT_LOCALE, GOOGLE_TRANSLATE_ELEMENT } from './config/constants'; +// import { makeEditUrl, DEFAULT_LOCALE, GOOGLE_TRANSLATE_ELEMENT } from './config/constants'; import navbarItems from './config/theme/navbar'; import footerColumns from './config/theme/footer'; import { headTags } from './config/theme/headTags'; @@ -27,10 +27,10 @@ const config: Config = { favicon: "img/docusaurus/favicon-96x96.png", organizationName: "stellar", projectName: "stellar-docs", - i18n: { - defaultLocale: DEFAULT_LOCALE, - locales: ["en", "es"], - }, + // i18n: { + // defaultLocale: DEFAULT_LOCALE, + // locales: ["en", "es"], + // }, scripts: [ { src: 'https://translate.google.com/translate_a/element.js', @@ -121,7 +121,8 @@ const config: Config = { rehypePlugins: [rehypeKatex], sidebarPath: "config/sidebars.ts", sidebarItemsGenerator: require("./src/sidebar-generator"), - editUrl: makeEditUrl, + // editUrl: makeEditUrl, + editUrl: "https://github.com/stellar/stellar-docs/edit/main", exclude: ['**/component/**', '**/CONTRIBUTING.md'], }, theme: { From 17b738f0b6475f00b9b7aecee205b804fb65ec6f Mon Sep 17 00:00:00 2001 From: Elliot Date: Tue, 6 Jan 2026 11:20:49 -0600 Subject: [PATCH 7/8] disable translations in dockerfile and package script --- Dockerfile | 13 +++++++------ package.json | 2 +- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9c289c7b24..693278c151 100644 --- a/Dockerfile +++ b/Dockerfile @@ -24,12 +24,13 @@ RUN yarn stellar-cli:build --no-minify --cli-ref=main RUN yarn stellar-cli:fix-links ENV NODE_OPTIONS="--max-old-space-size=4096" -RUN if [ "$BUILD_TRANSLATIONS" = "True" ]; then \ - yarn docusaurus build --no-minify; \ - else \ - # In the preview build, we only want to build for English. Much quicker - yarn build --no-minify; \ - fi +# RUN if [ "$BUILD_TRANSLATIONS" = "True" ]; then \ +# yarn docusaurus build --no-minify; \ +# else \ +# # In the preview build, we only want to build for English. Much quicker +# yarn build --no-minify; \ +# fi +RUN yarn build --no-minify FROM nginx:1.29 diff --git a/package.json b/package.json index d32017e602..48494536af 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "scripts": { "docusaurus": "docusaurus", "start": "docusaurus start", - "build": "docusaurus build --locale en", + "build": "docusaurus build", "swizzle": "docusaurus swizzle", "deploy": "docusaurus deploy", "clear": "docusaurus clear", From 878141cdd575d5decc3f56a0ae519125983c2ebe Mon Sep 17 00:00:00 2001 From: Elliot Date: Tue, 6 Jan 2026 11:27:43 -0600 Subject: [PATCH 8/8] disable crowdin action schedules --- .github/workflows/crowdin-download-workflow.yml | 4 ++-- .github/workflows/crowdin-upload-workflow.yml | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/crowdin-download-workflow.yml b/.github/workflows/crowdin-download-workflow.yml index 088b17413c..281f45399b 100644 --- a/.github/workflows/crowdin-download-workflow.yml +++ b/.github/workflows/crowdin-download-workflow.yml @@ -8,8 +8,8 @@ on: description: "Branch to run this workflow on" required: true default: "main" - schedule: - - cron: "20 14,18,22 * * 1,2,3,4,5" # Runs at 20 minutes past beginning/middle/end of day Mon-Fri (UTC-6) (an hour after the upload action) + # schedule: + # - cron: "20 14,18,22 * * 1,2,3,4,5" # Runs at 20 minutes past beginning/middle/end of day Mon-Fri (UTC-6) (an hour after the upload action) permissions: contents: write diff --git a/.github/workflows/crowdin-upload-workflow.yml b/.github/workflows/crowdin-upload-workflow.yml index aca8029cb7..017299609f 100644 --- a/.github/workflows/crowdin-upload-workflow.yml +++ b/.github/workflows/crowdin-upload-workflow.yml @@ -3,8 +3,8 @@ name: Crowdin Upload Action on: workflow_call: workflow_dispatch: - schedule: - - cron: "20 13,17,21 * * 1,2,3,4,5" # Runs at 20 minutes past beginning/middle/end of day Mon-Fri (UTC-6) + # schedule: + # - cron: "20 13,17,21 * * 1,2,3,4,5" # Runs at 20 minutes past beginning/middle/end of day Mon-Fri (UTC-6) jobs: crowdin-upload: