mirror of
https://github.com/facebook/docusaurus.git
synced 2025-05-12 16:47:26 +02:00
Versioning ids should be based on whether translation is enabled (#333)
* Versioning ids should be based on whether translation is enabled Ref:ff117979c6
anda5e963dba1
Tested locally on: Docusaurus Relay Test site from `npm run examples` * Prettier
This commit is contained in:
parent
250395a96a
commit
5bb062b6f0
3 changed files with 10 additions and 6 deletions
|
@ -11,6 +11,7 @@ const fs = require('fs');
|
|||
const path = require('path');
|
||||
const assert = require('assert');
|
||||
|
||||
const env = require('./env.js');
|
||||
const siteConfig = require(CWD + '/siteConfig.js');
|
||||
|
||||
const ENABLE_TRANSLATION = fs.existsSync(CWD + '/languages.js');
|
||||
|
@ -212,7 +213,7 @@ function processVersionMetadata(file, version, useVersion, language) {
|
|||
'version-' + version + '-'
|
||||
);
|
||||
metadata.localized_id = metadata.id;
|
||||
metadata.id = language + '-' + metadata.id;
|
||||
metadata.id = (env.translation.enabled ? language + '-' : '') + metadata.id;
|
||||
metadata.language = language;
|
||||
metadata.version = version;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue