Skip to content

Commit 3844ae5

Browse files
devvaannshabose
authored andcommitted
fix: remove non-required docs, as already added in Docs repo
1 parent 1dd271e commit 3844ae5

File tree

5 files changed

+35
-243
lines changed

5 files changed

+35
-243
lines changed
Lines changed: 21 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,34 @@
1-
This document outlines how documentation is handled in Phoenix.
1+
This document explains the process for managing documentation in Phoenix Code.
22

33
## The `docs` folder
4-
The `docs` folder in Phoenix repo is the main code/API/Extension
5-
docs folder for Phoenix. Most of the Phoenix GitHub Wiki is
6-
autogenerated from the contents of this folder.
4+
The docs folder in the Phoenix repository contains guidelines for writing docs and adding translations. Most of the GitHub Wiki is autogenerated from this folder, covering how to update these aspects in your Phoenix repository.
75

8-
### Docs Folder Structure
9-
There are two main components to the docs folder:
6+
> The contents of the `docs` folder are automatically pushed into Github Wiki. Make changes to Markdown files in this folder to update wiki entries.
107
11-
1. The contents of the `docs` folder are automatically pushed into gitHub wiki
12-
as a subfolder `generatedDocs`. Make changes to Markdown files in this folder
13-
to update wiki entries.
14-
2. The docs in the `docs/generatedApiDocs` are autoGenerated API docs from source. These
15-
`markdown` docs should never be manually edited as their contents will be reset when autogenerated
16-
and all manually made changes will be lost.
178

189
## How To Write API docs
1910
This section covers how API docs are auto generated and how you can update API docs.
2011

21-
To Include any `.js` file containing [JSDoc](https://jsdoc.app/) in Phoenix API docs,
12+
To include any `.js` file containing [JSDoc](https://jsdoc.app/) in Phoenix Code API docs,
2213
have this comment in any part of the file:
2314
```js
2415
// @INCLUDE_IN_API_DOCS
2516
```
2617

2718
### Writing JSDoc in source
2819
Let us consider this example source file [src/utils/Metrics.js](https://github.com/phcode-dev/phoenix/blob/main/src/utils/Metrics.js).
29-
The file is created with [JSDoc](https://jsdoc.app/) compliant source code comments. Make changes to
30-
the source code comments as required.
20+
The file is created with [JSDoc](https://jsdoc.app/) compliant source code comments. Make changes to the source code comments as required.
3121

32-
When you run `npm run createJSDoc` or `npm run build` the corresponding docs for the js file are automatically generated at [docs/generatedApiDocs/utils/Metrics-API.md](https://github.com/phcode-dev/phoenix/blob/main/docs/generatedApiDocs/utils/Metrics-API.md).
22+
When you run `npm run createJSDoc` or `npm run build` the corresponding docs for the js file are automatically generated at [docs/API-Reference/utils/Metrics-API.md](https://github.com/phcode-dev/phoenix/blob/main/docs/API-Reference/utils/Metrics.md).
3323

34-
The generated docs should be pushed to Phoenix repo if there are any doc changes.
35-
Once the changes are pushed, the build system will update the docs in all
36-
[wikis](https://github.com/phcode-dev/phoenix/wiki)/
37-
[doc](https://docs.phcode.dev/) sites automatically.
24+
The generated docs should be pushed to Docs repository if there are any doc changes.
25+
Once the changes are pushed, the build system will update the docs in
26+
[doc](https://docs.phcode.dev/) site automatically.
3827

3928
## JSDoc Examples
4029
This section outlines the various tags available in JSDoc to style docs with examples.
4130

42-
note: All comment blocks with the `@private` tag will be ignored and won't appear in the docs.
31+
> All comment blocks with the `@private` tag will be ignored and won't appear in the docs.
4332
4433
### 1. Declaring a Module with `@module` tag
4534

@@ -64,7 +53,7 @@ Use this to declare top level JS modules
6453
*/
6554
```
6655

67-
Will Result in the following Markdown
56+
This will result in the following Markdown
6857
> ## utils/Metrics
6958
> The Metrics API can be used to send analytics data to track feature usage in accordance with users privacy settings.
7059
>`Status: Internal - Not to be used by third party extensions.`
@@ -87,11 +76,11 @@ Use this to put custom markdown anywhere in the doc file.
8776
*/
8877
```
8978
90-
Will Result in the following Markdown
79+
This will result in the following Markdown
9180
> ## API
9281
>This section outlines the properties and methods available in this module
9382
94-
### 3. types/constants using `@type` or `const`
83+
### 3. types/constants using `@type` or `@const`
9584

9685
Use this to put constants or type definitions
9786

@@ -103,7 +92,7 @@ Use this to put constants or type definitions
10392
const MAX_AUDIT_ENTRIES = 3000;
10493
```
10594

106-
Will Result in the following Markdown
95+
This will result in the following Markdown
10796
> ## MAX_AUDIT_ENTRIES
10897
>
10998
>The maximum number of audit entries; default is 3000.
@@ -137,7 +126,7 @@ const EVENT_TYPE = {
137126
Will Result in the following Markdown
138127
> ## EVENT_TYPE
139128
> The Type of events that can be specified as an `eventType` in the API calls.
140-
>### Properties
129+
> ### Properties
141130
>`PLATFORM`, `PROJECT`, `THEMES`
142131
>
143132
> Type: [Object]
@@ -161,19 +150,19 @@ const EVENT_TYPE = {
161150
};
162151
```
163152

164-
Will Result in the following Markdown
153+
This will result in the following Markdown
165154
> ## EVENT_TYPE
166155
> The Type of events that can be specified as an `eventType` in the API calls.
167156
>
168157
> Type: [Object]
169-
>### Properties
158+
> ### Properties
170159
>
171160
>* `PLATFORM` **[string]**
172161
>* `PROJECT` **[string]**
173162
>* `THEMES` **[string]**
174163
175164

176-
### 5. Function docs with `@function` or `method`
165+
### 5. Function docs with `@function` or `@method`
177166

178167
Use this to document a function and its arguments/returns/exceptions.
179168

@@ -194,16 +183,16 @@ Use this to document a function and its arguments/returns/exceptions.
194183
function countEvent(eventType, count) {}
195184
```
196185

197-
Will Result in the following Markdown:
186+
This will result in the following Markdown:
198187

199188
> ## countEvent
200189
> log a numeric count >=0
201190
> Type: [function][2]
202-
>### Parameters
191+
> ### Parameters
203192
>* `eventType` **([EVENT_TYPE] | [string])** The kind of Event Type that needs to be logged- should be a js var compatible string.
204193
Some standard event types are available as `EVENT_TYPE`.
205194
>* `count` **[number]** > \=0
206-
>### Examples
195+
> ### Examples
207196
>To log that user clicked searchButton 5 times:
208197
>```javascript
209198
>Metrics.countEvent(Metrics.EVENT_TYPE.UI, 5);

docs/01-Writing-Extensions-And-Themes.md

Lines changed: 0 additions & 82 deletions
This file was deleted.
Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
This document outlines how to add support for various local languages in Phoenix.
1+
This document outlines how to add support for various local languages in Phoenix Code.
22

3-
Phoenix currently supports over 35 languages, primarily through automatic translations using AWS/Google Translate.
3+
Phoenix Code currently supports over 35 languages, primarily through automatic translations using AWS/Google Translate.
44

55
## Quick start
66

@@ -9,8 +9,8 @@ Phoenix currently supports over 35 languages, primarily through automatic transl
99
or
1010
2. Follow the below section on [Adding a new locale translation](Adding a new locale translation)
1111

12-
### I want to correct some translations in my language
13-
To update translations for your language, such as French.
12+
### Update translations for a language
13+
To update translations for your language, let's say French.
1414
Follow the below steps:
1515
1. Find out the language code for your language
1616
from [ISO-Language code](https://www.w3schools.com/tags/ref_language_codes.asp). For French, this is `fr`.
@@ -21,49 +21,41 @@ from [ISO-Language code](https://www.w3schools.com/tags/ref_language_codes.asp).
2121
This folder contains all the localised strings. Each sub folder corresponds to an [ISO-Language code](https://www.w3schools.com/tags/ref_language_codes.asp).
2222

2323
### The `src/nls/root` folder
24-
A special folder called the `root` folder houses the reference english translations from which all other locale
25-
translations are derived. The `root` folder has three main files:
24+
A special folder called the `root` folder houses the reference English translations from which all other locale translations are derived. The `root` folder has three main files:
2625
1. `strings.js` - The full list of translated text.
27-
2. `strings-app.js` - The list of language code to localized language name mapping. This will be used in the switch
28-
language dialogue in debug menu.
26+
2. `strings-app.js` - The list of language code to localized language name mapping. This will be used in the switch language dialogue in debug menu.
2927
3. `urls.js` - local specific URLs.
3028

3129
### The `src/nls/<locale>` folder
3230
Each `src/nls/<locale>` folder contains similar files, plus a few additional ones:
33-
1. `expertTranslations.json` where you can provide expert translations for specific english strings to locale strings.
34-
This expert translation will be used instead of machine translations if present for a string.
31+
1. `expertTranslations.json` where you can provide expert translations for specific English strings to locale strings. This expert translation will be used instead of machine translations if present for a string.
3532
2. `strings.js` - The full list of translated text for the locale.
36-
3. Apart from the above tow there are 2 autogenerated files that should not be edited: `lastTranslated.json` and
37-
`lastTranslatedLocale.json`.
33+
3. Apart from the above two there are 2 autogenerated files that should not be edited: `lastTranslated.json` and `lastTranslatedLocale.json`.
3834

39-
## Autogenerated and manual translations
40-
When any string changes are made to `src/nls/root/strings.js` or any `src/nls/<locale>/strings.js`,
41-
it will automatically be scanned by GitHub Actions and the corresponding translations will be generated.
42-
A pull request will be raised with the new translations.
35+
## Autogenerated and Manual translations
36+
When any string changes are made to `src/nls/root/strings.js` or any `src/nls/<locale>/strings.js`, it will automatically be scanned by GitHub Actions and the corresponding translations will be generated. A pull request will be raised with the new translations.
4337

44-
You can also run the translation command locally if you have the AWS/GCP keys with the command. This is
45-
mostly FYI for phoenix internal devs.
38+
You can also run the translation command locally if you have the AWS/GCP keys with the command. This is mostly FYI for phoenix internal devs.
4639
```bash
4740
npm run _translateStrings
4841
```
4942

5043
### Skipping auto translate
5144
For some strings we may not want to translate them. For Example, for the keyboard shortcut string key `"KEYBOARD_CTRL": "Ctrl"`
52-
we don't want it translated to any language. Just add another key appending `_DO_NOT_TRANSLATE` to the key
53-
to disable automatic translations Eg. `"KEYBOARD_CTRL_DO_NOT_TRANSLATE": "true"` just below the original key.
45+
we don't want it translated to any language. Just add another key appending `_DO_NOT_TRANSLATE` to the key to disable automatic translations Eg. `"KEYBOARD_CTRL_DO_NOT_TRANSLATE": "true"` just below the original key.
5446

5547
### Adding expert/manual translation overrides
5648
We may want to add locale specific expert translation if the autogenerated translation is not good.
5749
For Eg. consider the key `"LIVE_DEV_LOADING_ERROR_MESSAGE": "Unable to load Live Preview page."`, and specify a manual translation in ro (Romanian). We can add a mapping in the file `nls/ro/expertTranslations.json` with
5850
the following string `"Unable to load Live Preview page.": "Imposibil de a încărca pagina Live Development"` .
5951

60-
When the translation jobs run the next time, the expert translation will be used instead of auto generated translation.
52+
When the translation jobs run the next time, the expert translation override the auto generated translation.
6153

6254
## Adding a new locale translation
6355
Say we want to add a new language translation `ko`. We have to do the following
6456
1. In file `nls/strings.js` add the line `"ko": true,`
6557
2. In file `nls/root/strings-app.js` add the line `"LOCALE_KO": "한국어",` where `한국어` is `Korean` in Korean language.
66-
3. Create a new folder `nls/ko`
58+
3. Create a new folder `nls/ko`.
6759
4. Create a new file `nls/ko/strings.js` with the content `define({});`
6860
5. Create three new files `nls/ko/lastTranslated.json`, `nls/ko/lastTranslatedLocale.json` and
6961
`nls/ko/expertTranslations.json` with the content `{}`

docs/04-Customizing-Icons-For-File-Folder.md

Lines changed: 0 additions & 45 deletions
This file was deleted.

0 commit comments

Comments
 (0)