Skip to content

Commit

Permalink
DOC: Move all docs into en/ subdirectory
Browse files Browse the repository at this point in the history
PR bitburner-official#1502 is working on adding a Chinese translation to the docs. In
general, I encouraged this (in bitburner-official#1452) as a path towards getting useful
translated content in the game without requiring a massive
refactor/rearchitecting of everything.

To support this, this takes the first step of moving our docs into an
en/ subdirectory, so that other languages can live alongside. No effort
is made at this time to support or select between alternate languages;
this is a pure-rename refactor.
  • Loading branch information
d0sboots committed Jul 20, 2024
1 parent 4502fd4 commit 6daaab2
Show file tree
Hide file tree
Showing 69 changed files with 131 additions and 132 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ The game's official documentation can be found in-game.
The [in-game documentation](./markdown/bitburner.md) is generated from the [TypeScript definitions](./src/ScriptEditor/NetscriptDefinitions.d.ts).

Anyone is welcome to contribute to the documentation by editing the [source
files](/src/Documentation/doc) and then making a pull request with your contributions.
files](/src/Documentation/doc/en) and then making a pull request with your contributions.
For further guidance, please refer to the "As A Documenter" section of
[CONTRIBUTING](./doc/CONTRIBUTING.md#as-a-documenter).

Expand Down
2 changes: 1 addition & 1 deletion doc/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ the following rules:
## As a Documenter

To contribute to and view your changes to the BitBurner documentation in-game, you will
need to edit the files in [this folder](https://github.com/bitburner-official/bitburner-src/tree/dev/src/Documentation/doc)
need to edit the files in [this folder](https://github.com/bitburner-official/bitburner-src/tree/dev/src/Documentation/doc/en)

To make change to the [in-game documentation](../markdown/bitburner.md), you will need to modify the [TypeScript definitions](../src/ScriptEditor/NetscriptDefinitions.d.ts), not the Markdown files.

Expand Down
4 changes: 2 additions & 2 deletions doc/index.rst
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.. meta::
:http-equiv=Refresh: 0; url='https://github.com/bitburner-official/bitburner-src/blob/stable/src/Documentation/doc/index.md'
:http-equiv=Refresh: 0; url='https://github.com/bitburner-official/bitburner-src/blob/stable/src/Documentation/doc/en/index.md'

This link is outdated as documentation for Bitburner has been migrated to an in-game menu, this page should have redirected you to the new location.
You can also click `here to go to the game's documentation <https://github.com/bitburner-official/bitburner-src/blob/stable/src/Documentation/doc/index.md/>`_.
You can also click `here to go to the game's documentation <https://github.com/bitburner-official/bitburner-src/blob/stable/src/Documentation/doc/en/index.md/>`_.
3 changes: 1 addition & 2 deletions src/Constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,10 @@ export const CONSTANTS = {
// Only use this if a backdoor is installed in the company's server
CompanyRequiredReputationMultiplier: 0.75,

// Also update doc/source/changelog.rst
LatestUpdate: `
## v2.6.3 Dev: Last updated 3 July 2024
See 2.6.2 changelog at https://github.com/bitburner-official/bitburner-src/blob/v2.6.2/src/Documentation/doc/changelog.md
See 2.6.2 changelog at https://github.com/bitburner-official/bitburner-src/blob/v2.6.2/src/Documentation/doc/en/changelog.md
### CHANGES
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
244 changes: 122 additions & 122 deletions src/Documentation/pages.ts
Original file line number Diff line number Diff line change
@@ -1,127 +1,127 @@
// THIS FILE IS AUTOGENERATED
import file0 from "./doc/advanced/bitnodes.md?raw";
import file1 from "./doc/advanced/bladeburners.md?raw";
import file2 from "./doc/advanced/corporation/basic-gameplay-and-term.md?raw";
import file3 from "./doc/advanced/corporation/boost-material.md?raw";
import file4 from "./doc/advanced/corporation/demand-competition.md?raw";
import file5 from "./doc/advanced/corporation/division-raw-production.md?raw";
import file6 from "./doc/advanced/corporation/faq.md?raw";
import file7 from "./doc/advanced/corporation/financial-statement.md?raw";
import file8 from "./doc/advanced/corporation/general-advice.md?raw";
import file9 from "./doc/advanced/corporation/industry-supply-chain.md?raw";
import file10 from "./doc/advanced/corporation/miscellany.md?raw";
import file11 from "./doc/advanced/corporation/office.md?raw";
import file12 from "./doc/advanced/corporation/optimal-selling-price-market-ta2.md?raw";
import file13 from "./doc/advanced/corporation/product.md?raw";
import file14 from "./doc/advanced/corporation/quality.md?raw";
import file15 from "./doc/advanced/corporation/smart-supply.md?raw";
import file16 from "./doc/advanced/corporation/unlocks-upgrade-research.md?raw";
import file17 from "./doc/advanced/corporation/warehouse.md?raw";
import file18 from "./doc/advanced/corporation/wilson-analytics-advert.md?raw";
import file19 from "./doc/advanced/corporations.md?raw";
import file20 from "./doc/advanced/faction_list.md?raw";
import file21 from "./doc/advanced/gang.md?raw";
import file22 from "./doc/advanced/grafting.md?raw";
import file23 from "./doc/advanced/hacknetservers.md?raw";
import file24 from "./doc/advanced/intelligence.md?raw";
import file25 from "./doc/advanced/offlineandbonustime.md?raw";
import file26 from "./doc/advanced/sleeves.md?raw";
import file27 from "./doc/advanced/sourcefiles.md?raw";
import file28 from "./doc/advanced/stanek.md?raw";
import file29 from "./doc/basic/augmentations.md?raw";
import file30 from "./doc/basic/codingcontracts.md?raw";
import file31 from "./doc/basic/companies.md?raw";
import file32 from "./doc/basic/crimes.md?raw";
import file33 from "./doc/basic/factions.md?raw";
import file34 from "./doc/basic/hacking.md?raw";
import file35 from "./doc/basic/hacknet_nodes.md?raw";
import file36 from "./doc/basic/infiltration.md?raw";
import file37 from "./doc/basic/programs.md?raw";
import file38 from "./doc/basic/ram.md?raw";
import file39 from "./doc/basic/reputation.md?raw";
import file40 from "./doc/basic/scripts.md?raw";
import file41 from "./doc/basic/servers.md?raw";
import file42 from "./doc/basic/stats.md?raw";
import file43 from "./doc/basic/stockmarket.md?raw";
import file44 from "./doc/basic/terminal.md?raw";
import file45 from "./doc/basic/world.md?raw";
import file46 from "./doc/changelog-v0.md?raw";
import file47 from "./doc/changelog-v1.md?raw";
import file48 from "./doc/changelog.md?raw";
import file49 from "./doc/help/bitnode_order.md?raw";
import file50 from "./doc/help/getting_started.md?raw";
import file51 from "./doc/help/tools_and_resources.md?raw";
import file52 from "./doc/index.md?raw";
import file53 from "./doc/migrations/ns2.md?raw";
import file54 from "./doc/migrations/v1.md?raw";
import file55 from "./doc/migrations/v2.md?raw";
import file56 from "./doc/programming/game_frozen.md?raw";
import file57 from "./doc/programming/go_algorithms.md?raw";
import file58 from "./doc/programming/hackingalgorithms.md?raw";
import file59 from "./doc/programming/learn.md?raw";
import file60 from "./doc/programming/remote_api.md?raw";
import file0 from "./doc/en/advanced/bitnodes.md?raw";
import file1 from "./doc/en/advanced/bladeburners.md?raw";
import file2 from "./doc/en/advanced/corporation/basic-gameplay-and-term.md?raw";
import file3 from "./doc/en/advanced/corporation/boost-material.md?raw";
import file4 from "./doc/en/advanced/corporation/demand-competition.md?raw";
import file5 from "./doc/en/advanced/corporation/division-raw-production.md?raw";
import file6 from "./doc/en/advanced/corporation/faq.md?raw";
import file7 from "./doc/en/advanced/corporation/financial-statement.md?raw";
import file8 from "./doc/en/advanced/corporation/general-advice.md?raw";
import file9 from "./doc/en/advanced/corporation/industry-supply-chain.md?raw";
import file10 from "./doc/en/advanced/corporation/miscellany.md?raw";
import file11 from "./doc/en/advanced/corporation/office.md?raw";
import file12 from "./doc/en/advanced/corporation/optimal-selling-price-market-ta2.md?raw";
import file13 from "./doc/en/advanced/corporation/product.md?raw";
import file14 from "./doc/en/advanced/corporation/quality.md?raw";
import file15 from "./doc/en/advanced/corporation/smart-supply.md?raw";
import file16 from "./doc/en/advanced/corporation/unlocks-upgrade-research.md?raw";
import file17 from "./doc/en/advanced/corporation/warehouse.md?raw";
import file18 from "./doc/en/advanced/corporation/wilson-analytics-advert.md?raw";
import file19 from "./doc/en/advanced/corporations.md?raw";
import file20 from "./doc/en/advanced/faction_list.md?raw";
import file21 from "./doc/en/advanced/gang.md?raw";
import file22 from "./doc/en/advanced/grafting.md?raw";
import file23 from "./doc/en/advanced/hacknetservers.md?raw";
import file24 from "./doc/en/advanced/intelligence.md?raw";
import file25 from "./doc/en/advanced/offlineandbonustime.md?raw";
import file26 from "./doc/en/advanced/sleeves.md?raw";
import file27 from "./doc/en/advanced/sourcefiles.md?raw";
import file28 from "./doc/en/advanced/stanek.md?raw";
import file29 from "./doc/en/basic/augmentations.md?raw";
import file30 from "./doc/en/basic/codingcontracts.md?raw";
import file31 from "./doc/en/basic/companies.md?raw";
import file32 from "./doc/en/basic/crimes.md?raw";
import file33 from "./doc/en/basic/factions.md?raw";
import file34 from "./doc/en/basic/hacking.md?raw";
import file35 from "./doc/en/basic/hacknet_nodes.md?raw";
import file36 from "./doc/en/basic/infiltration.md?raw";
import file37 from "./doc/en/basic/programs.md?raw";
import file38 from "./doc/en/basic/ram.md?raw";
import file39 from "./doc/en/basic/reputation.md?raw";
import file40 from "./doc/en/basic/scripts.md?raw";
import file41 from "./doc/en/basic/servers.md?raw";
import file42 from "./doc/en/basic/stats.md?raw";
import file43 from "./doc/en/basic/stockmarket.md?raw";
import file44 from "./doc/en/basic/terminal.md?raw";
import file45 from "./doc/en/basic/world.md?raw";
import file46 from "./doc/en/changelog-v0.md?raw";
import file47 from "./doc/en/changelog-v1.md?raw";
import file48 from "./doc/en/changelog.md?raw";
import file49 from "./doc/en/help/bitnode_order.md?raw";
import file50 from "./doc/en/help/getting_started.md?raw";
import file51 from "./doc/en/help/tools_and_resources.md?raw";
import file52 from "./doc/en/index.md?raw";
import file53 from "./doc/en/migrations/ns2.md?raw";
import file54 from "./doc/en/migrations/v1.md?raw";
import file55 from "./doc/en/migrations/v2.md?raw";
import file56 from "./doc/en/programming/game_frozen.md?raw";
import file57 from "./doc/en/programming/go_algorithms.md?raw";
import file58 from "./doc/en/programming/hackingalgorithms.md?raw";
import file59 from "./doc/en/programming/learn.md?raw";
import file60 from "./doc/en/programming/remote_api.md?raw";

import type { Document } from "./root.ts";

export const AllPages: Record<string, Document> = {};
AllPages["advanced/bitnodes.md"] = file0;
AllPages["advanced/bladeburners.md"] = file1;
AllPages["advanced/corporation/basic-gameplay-and-term.md"] = file2;
AllPages["advanced/corporation/boost-material.md"] = file3;
AllPages["advanced/corporation/demand-competition.md"] = file4;
AllPages["advanced/corporation/division-raw-production.md"] = file5;
AllPages["advanced/corporation/faq.md"] = file6;
AllPages["advanced/corporation/financial-statement.md"] = file7;
AllPages["advanced/corporation/general-advice.md"] = file8;
AllPages["advanced/corporation/industry-supply-chain.md"] = file9;
AllPages["advanced/corporation/miscellany.md"] = file10;
AllPages["advanced/corporation/office.md"] = file11;
AllPages["advanced/corporation/optimal-selling-price-market-ta2.md"] = file12;
AllPages["advanced/corporation/product.md"] = file13;
AllPages["advanced/corporation/quality.md"] = file14;
AllPages["advanced/corporation/smart-supply.md"] = file15;
AllPages["advanced/corporation/unlocks-upgrade-research.md"] = file16;
AllPages["advanced/corporation/warehouse.md"] = file17;
AllPages["advanced/corporation/wilson-analytics-advert.md"] = file18;
AllPages["advanced/corporations.md"] = file19;
AllPages["advanced/faction_list.md"] = file20;
AllPages["advanced/gang.md"] = file21;
AllPages["advanced/grafting.md"] = file22;
AllPages["advanced/hacknetservers.md"] = file23;
AllPages["advanced/intelligence.md"] = file24;
AllPages["advanced/offlineandbonustime.md"] = file25;
AllPages["advanced/sleeves.md"] = file26;
AllPages["advanced/sourcefiles.md"] = file27;
AllPages["advanced/stanek.md"] = file28;
AllPages["basic/augmentations.md"] = file29;
AllPages["basic/codingcontracts.md"] = file30;
AllPages["basic/companies.md"] = file31;
AllPages["basic/crimes.md"] = file32;
AllPages["basic/factions.md"] = file33;
AllPages["basic/hacking.md"] = file34;
AllPages["basic/hacknet_nodes.md"] = file35;
AllPages["basic/infiltration.md"] = file36;
AllPages["basic/programs.md"] = file37;
AllPages["basic/ram.md"] = file38;
AllPages["basic/reputation.md"] = file39;
AllPages["basic/scripts.md"] = file40;
AllPages["basic/servers.md"] = file41;
AllPages["basic/stats.md"] = file42;
AllPages["basic/stockmarket.md"] = file43;
AllPages["basic/terminal.md"] = file44;
AllPages["basic/world.md"] = file45;
AllPages["changelog-v0.md"] = file46;
AllPages["changelog-v1.md"] = file47;
AllPages["changelog.md"] = file48;
AllPages["help/bitnode_order.md"] = file49;
AllPages["help/getting_started.md"] = file50;
AllPages["help/tools_and_resources.md"] = file51;
AllPages["index.md"] = file52;
AllPages["migrations/ns2.md"] = file53;
AllPages["migrations/v1.md"] = file54;
AllPages["migrations/v2.md"] = file55;
AllPages["programming/game_frozen.md"] = file56;
AllPages["programming/go_algorithms.md"] = file57;
AllPages["programming/hackingalgorithms.md"] = file58;
AllPages["programming/learn.md"] = file59;
AllPages["programming/remote_api.md"] = file60;
AllPages["en/advanced/bitnodes.md"] = file0;
AllPages["en/advanced/bladeburners.md"] = file1;
AllPages["en/advanced/corporation/basic-gameplay-and-term.md"] = file2;
AllPages["en/advanced/corporation/boost-material.md"] = file3;
AllPages["en/advanced/corporation/demand-competition.md"] = file4;
AllPages["en/advanced/corporation/division-raw-production.md"] = file5;
AllPages["en/advanced/corporation/faq.md"] = file6;
AllPages["en/advanced/corporation/financial-statement.md"] = file7;
AllPages["en/advanced/corporation/general-advice.md"] = file8;
AllPages["en/advanced/corporation/industry-supply-chain.md"] = file9;
AllPages["en/advanced/corporation/miscellany.md"] = file10;
AllPages["en/advanced/corporation/office.md"] = file11;
AllPages["en/advanced/corporation/optimal-selling-price-market-ta2.md"] = file12;
AllPages["en/advanced/corporation/product.md"] = file13;
AllPages["en/advanced/corporation/quality.md"] = file14;
AllPages["en/advanced/corporation/smart-supply.md"] = file15;
AllPages["en/advanced/corporation/unlocks-upgrade-research.md"] = file16;
AllPages["en/advanced/corporation/warehouse.md"] = file17;
AllPages["en/advanced/corporation/wilson-analytics-advert.md"] = file18;
AllPages["en/advanced/corporations.md"] = file19;
AllPages["en/advanced/faction_list.md"] = file20;
AllPages["en/advanced/gang.md"] = file21;
AllPages["en/advanced/grafting.md"] = file22;
AllPages["en/advanced/hacknetservers.md"] = file23;
AllPages["en/advanced/intelligence.md"] = file24;
AllPages["en/advanced/offlineandbonustime.md"] = file25;
AllPages["en/advanced/sleeves.md"] = file26;
AllPages["en/advanced/sourcefiles.md"] = file27;
AllPages["en/advanced/stanek.md"] = file28;
AllPages["en/basic/augmentations.md"] = file29;
AllPages["en/basic/codingcontracts.md"] = file30;
AllPages["en/basic/companies.md"] = file31;
AllPages["en/basic/crimes.md"] = file32;
AllPages["en/basic/factions.md"] = file33;
AllPages["en/basic/hacking.md"] = file34;
AllPages["en/basic/hacknet_nodes.md"] = file35;
AllPages["en/basic/infiltration.md"] = file36;
AllPages["en/basic/programs.md"] = file37;
AllPages["en/basic/ram.md"] = file38;
AllPages["en/basic/reputation.md"] = file39;
AllPages["en/basic/scripts.md"] = file40;
AllPages["en/basic/servers.md"] = file41;
AllPages["en/basic/stats.md"] = file42;
AllPages["en/basic/stockmarket.md"] = file43;
AllPages["en/basic/terminal.md"] = file44;
AllPages["en/basic/world.md"] = file45;
AllPages["en/changelog-v0.md"] = file46;
AllPages["en/changelog-v1.md"] = file47;
AllPages["en/changelog.md"] = file48;
AllPages["en/help/bitnode_order.md"] = file49;
AllPages["en/help/getting_started.md"] = file50;
AllPages["en/help/tools_and_resources.md"] = file51;
AllPages["en/index.md"] = file52;
AllPages["en/migrations/ns2.md"] = file53;
AllPages["en/migrations/v1.md"] = file54;
AllPages["en/migrations/v2.md"] = file55;
AllPages["en/programming/game_frozen.md"] = file56;
AllPages["en/programming/go_algorithms.md"] = file57;
AllPages["en/programming/hackingalgorithms.md"] = file58;
AllPages["en/programming/learn.md"] = file59;
AllPages["en/programming/remote_api.md"] = file60;
4 changes: 2 additions & 2 deletions src/Documentation/root.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Root from "./doc/index.md?raw";
import Root from "./doc/en/index.md?raw";
import { AllPages } from "./pages";

export type Document = typeof Root;

export const getPage = (title: string): Document => AllPages[title] ?? Root;
export const getPage = (title: string): Document => AllPages["en/" + title] ?? Root;
2 changes: 1 addition & 1 deletion src/Documentation/ui/DocumentationRoot.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export function DocumentationRoot({ docPage }: { docPage?: string }): React.Reac
}
if (external) {
const ver = CONSTANTS.isDevBranch ? "dev" : "stable";
const url = `https://github.com/bitburner-official/bitburner-src/blob/${ver}/src/Documentation/doc/${newPath}`;
const url = `https://github.com/bitburner-official/bitburner-src/blob/${ver}/src/Documentation/doc/en/${newPath}`;
window.open(url, "_newtab");
return;
}
Expand Down
2 changes: 1 addition & 1 deletion src/GameOptions/ui/RemoteAPIPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const RemoteAPIPage = (): React.ReactElement => {
</Typography>
<Typography>
<Link
href="https://github.com/bitburner-official/bitburner-src/blob/dev/src/Documentation/doc/programming/remote_api.md"
href="https://github.com/bitburner-official/bitburner-src/blob/dev/src/Documentation/doc/en/programming/remote_api.md"
target="_blank"
>
Documentation
Expand Down

0 comments on commit 6daaab2

Please sign in to comment.