Commit Graph

56 Commits (f09c6a56954c386ee80ce1d744271850f46192a9)

Author SHA1 Message Date
MaxymVlasov c011ddbc8d
Mention kubernetes/websites everywhere in the same way 2023-08-23 18:04:53 +03:00
Mauren Berti a3b7cfd886
Add in-place substitution option for linkchecker.py (#41983)
* Add in-place replacement option for linkchecker.py

Add a new flag '-w' to enable an experimental in-place replacement for Markdown
links only.

* Apply suggestions from code review

Use formatted string literals instead of simple concatenation.

Co-authored-by: Matt Boersma <Matt.Boersma@microsoft.com>

* Remove other paths that should not be changed.

* Add more logic to remove paths that start with http or paths that are already linking to the localized page (i.e. start with '/<language-code>').

* Apply suggestions from code review

Simplify expressions.

Co-authored-by: Matt Boersma <Matt.Boersma@microsoft.com>

* Avoid updating pages in English.

* Fix syntax error in set comprehension

* Expand on documentation for new -w flag

* Update documentation for linkchecker.py in README

* Add a blurb with information about the new -w
  switch that describes what it does and what is
  the purpose of adding this behaviour change.
* Update the previously existing description to
  match the currently available script flags.

---------

Co-authored-by: Matt Boersma <Matt.Boersma@microsoft.com>
2023-07-14 10:07:49 -07:00
Akihito INOH cfbbf7483e Update with consistency of Japanese words
This commit updates some Japanese words with consistent one.
2023-06-19 13:19:43 +09:00
Miguel Garcia 754bee9fab linkchecker: detect absolute links with missing leading slash
When an absolute link is missing the leading slash (it starts with
"docs/foo" instead of "/docs/foo/"), print a more specific error instead
of the generic catch-all warning.

Without the leading slash, these are treated as relative paths and so
lead to non-existing pages.

Also, while we're at it, fix the instance it detects.
2023-05-27 23:19:29 +02:00
Kenichi Omichi 88f993b12e Add verify-spelling.sh for ja content
We have the translation guideline as [1], and that contains what are
valid Japanese words for the corresponding English words.
This adds a script to verify those words based on the guideline.

[1]: https://kubernetes.io/ja/docs/contribute/localization/
2022-12-14 08:57:14 +09:00
Mengjiao Liu 2ae47fc211 Fix ./scripts/lsync.sh script not getting EN_VERSION variable correctly 2022-06-27 12:01:01 +08:00
howieyuen f0ccbff316 [zh]Update other pages for links with '/zh/' prefix, using new prefix '/zh-cn/' 2022-06-24 11:13:35 +08:00
Qiming Teng 95257a2edd Improve the linkchecker script
The linkchecker script is not working the same way as the `scripts/lsync.sh`.

- The path must start with '/docs'. This is not implied in any way.
- The language can be deduced if user provides a full path to a markdown
  file, e.g. `content/en/docs/concepts/security/controlling-access.md`.
- The path parameter could use a positional argument for ease of use.

This PR improves the user experience for the tool.
2022-05-03 18:56:34 +08:00
Kubernetes Prow Robot 388a12af54
Merge pull request #28934 from atoato88/add-review-url-script
Add script for list URLs updated by target PR
2022-03-25 14:07:00 -07:00
Kubernetes Prow Robot c9debdcacb
Merge pull request #28954 from swiftslee/main
update some typo produced by scripts/verify-spelling.sh
2022-03-13 21:00:19 -07:00
yuswift 62f4b02e65 Merge branch 'main' of github.com:swiftslee/k8s-website 2022-02-21 20:17:45 +08:00
yuswift cd3ee79a88 update scripts/verify-spelling.sh 2022-02-21 20:14:35 +08:00
Swift 1522ac81ff
Update scripts/verify-spelling.sh
Co-authored-by: Tim Bannister <tim@scalefactory.com>
2021-12-24 15:28:36 +08:00
Swift 42780f388d
Update scripts/verify-spelling.sh
Co-authored-by: Tim Bannister <tim@scalefactory.com>
2021-12-24 15:28:21 +08:00
Philippe Martin 216b34a3d1 Update script to check api-reference links 2021-09-11 10:59:46 +02:00
yuswift a78abf5b86 Add the reason why we ignore old blog typos
Signed-off-by: yuswift <yuswift2018@gmail.com>
2021-08-11 15:42:14 +08:00
yuswift 919995fe3b support ignoring files when check the spelling
Signed-off-by: yuswift <yuswift2018@gmail.com>
2021-08-11 15:42:14 +08:00
Akihito INOH 79364dad11 Add script to print URLs updated by target PR 2021-07-19 10:10:22 +09:00
Stephen Augustus 2021adac4a releases: Update script reference and front matter for release.md
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2021-05-19 17:30:51 -04:00
Stephen Augustus 39796d1481 releases: Canonicalize patch release information on k/website
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2021-05-19 17:04:00 -04:00
Stephen Augustus 8bdc23cf82 scripts: Allow SIG Release to approve changes to update-release-info
Signed-off-by: Stephen Augustus <foo@auggie.dev>
2021-05-19 17:04:00 -04:00
Jim Angel 7edf890373 Adding a release page under "Release Information" 2021-05-11 17:18:30 -05:00
Kubernetes Prow Robot 448df54521
Merge pull request #27315 from s-kawamura-w664/patch-script
Add script for detecting bad characters.
2021-05-10 15:11:36 -07:00
Ricardo Katz 1869573927
Add spell check script (#26228)
* Add spell check script

Signed-off-by: Ricardo Pchevuzinske Katz <ricardo.katz@gmail.com>

* Add instructions on how to run the spelling verification script

Signed-off-by: Ricardo Pchevuzinske Katz <ricardo.katz@gmail.com>
2021-04-25 08:29:00 -07:00
TAKAHASHI Shuuji f1349a26bb
Fix the description of `-f` argument 2021-04-18 11:31:01 +09:00
s-kawamura-w664 7fde0426df Add script for detecting bad characters.
Co-authored-by: Shu Muto <shu.mutow@nec.com>
2021-04-08 09:36:11 +00:00
BITLIU 2eee57c425
Complete scripts descriptions
add lsync.sh hash-files.sh linkchecker.py  description

remove  replace-capture.sh description
2021-03-26 09:30:33 +08:00
BITLIU 357a1225f6
Update scripts/README.md
Co-authored-by: Tim Bannister <tim@scalefactory.com>
2021-03-26 09:27:01 +08:00
BITLIU 8cf40d5dea
Complete Scripts Description
Add 4 new Scripts to README
2021-03-25 20:50:54 +08:00
seokho-son 8f776e275d Enhance diff_l10n_branches script output 2020-12-30 10:14:48 +09:00
Qiming Teng 427adb7a8a Fix logic in lsync script
The logic in the previous fix for supporting directory comparison was
incorrect. It was using the last commit in the target directory for
history checking. However, some files in the target directory might be
out of sync long before the last commit to the directory.

This PR changes the script to do a history checking on a per-file basis.
2020-11-05 11:36:11 +08:00
Qiming Teng d80a20ea6a Improve the lsync script
This PR improves the lsync script so that it can handle directories
(recursively). For example, you can run the following command to find
the detailed changes that are out of sync:

```
./scripts/lsync content/zh/docs/concepts/_index.md
```

and you can run the following command to identify how many files are
out of sync under a given directory:

```
> ./scripts/lsync content/zh/docs/concepts/

content/en/docs/concepts/architecture/control-plane-node-communication.md        |  2 +-
 content/en/docs/concepts/architecture/controller.md                              | 10 ++++++++++
 content/en/docs/concepts/cluster-administration/logging.md                       |  4 ++--
 content/en/docs/concepts/cluster-administration/system-metrics.md                |  2 +-
 content/en/docs/concepts/configuration/pod-priority-preemption.md                |  2 +-
 content/en/docs/concepts/containers/runtime-class.md                             |  2 +-
 content/en/docs/concepts/extend-kubernetes/compute-storage-net/device-plugins.md |  2 +-
 content/en/docs/concepts/extend-kubernetes/operator.md                           |  2 +-
 content/en/docs/concepts/extend-kubernetes/service-catalog.md                    |  2 +-
 content/en/docs/concepts/overview/kubernetes-api.md                              |  2 +-
 content/en/docs/concepts/overview/what-is-kubernetes.md                          |  3 +--
 content/en/docs/concepts/overview/working-with-objects/labels.md                 |  2 +-
 content/en/docs/concepts/scheduling-eviction/kube-scheduler.md                   |  4 ++--
 content/en/docs/concepts/services-networking/dual-stack.md                       |  2 +-
 content/en/docs/concepts/storage/ephemeral-volumes.md                            | 11 +++++------
 content/en/docs/concepts/storage/persistent-volumes.md                           |  2 +-
 content/en/docs/concepts/storage/storage-classes.md                              |  2 +-
 content/en/docs/concepts/storage/volumes.md                                      |  5 ++---
 content/en/docs/concepts/workloads/_index.md                                     |  2 +-
 content/en/docs/concepts/workloads/controllers/replicaset.md                     |  4 ++--
 content/en/docs/concepts/workloads/pods/_index.md                                |  4 ++--
 content/en/docs/concepts/workloads/pods/pod-lifecycle.md                         |  3 ++-

```
2020-10-24 09:31:49 +08:00
Qiming Teng bfb4601a15 Fix issue in lsync script
According to 'git diff --help', the `--exist-code` flag can be used to
ensure that the command returns 0 when no difference is found.
2020-10-16 09:28:46 +08:00
Qiming Teng 71f0a9fc41 Add a util script for localization team
This PR adds a utility script for localization team to check changes
made to the English (upstream) source since last time the localized
version is updated (synchronized).
2020-10-06 08:46:41 +08:00
Kubernetes Prow Robot 3b47114acd
Merge pull request #22174 from sftim/20200629_capture_tidying_autodetect_repository_root
Autodetect content directory for capture cleanup tool
2020-08-04 14:39:32 -07:00
Kubernetes Prow Robot 413800b209
Merge pull request #22554 from BenTheElder/auto-version
automatically tag docker image based on hugo version and dockerfile v…
2020-07-26 20:52:16 -07:00
Benjamin Elder 7d62be1781 automatically derive image version 2020-07-22 11:04:09 -07:00
Qiming Teng d13f959fa1 Link checker for doc site.
Please see the in-file comment for details.
2020-07-20 16:19:06 +08:00
Tim Bannister 8384b2e461 Autodetect content directory for capture cleanup tool 2020-06-29 18:26:56 +01:00
Karen Bradshaw 87f68710ff correct tool reference front matter 2020-06-09 21:01:24 -04:00
Karen Bradshaw 1502e0281d config for removing capture stmts 2020-06-09 19:33:15 -04:00
Jacky Wu 92e30010bd
cleanup: remove hugo-version-check.sh. (#18817) 2020-02-11 11:28:07 -08:00
Claudia J.Kang e9cdcaba6a Changed to print the directory name according to the l10n language. (#18473)
When a localization user uses diff_l10n_branches.py,
the directory of content on 'Proposed Solution' is fixed.
Thus, this commit changes the directory name according to the l10n language.
2020-01-08 14:05:41 -08:00
Rémy Léone 9b5a1768bd Update README.md (#16552) 2019-09-28 12:37:38 -07:00
June Yi b76689388b Add a helper script for localization (#15789)
* Add a helper script for localization

The script generates a report of outdated contents in
`content/<l10n-lang>` directory by comparing two l10n
team milestone branches.

* Add description for scripts/diff_l10n_branches.py
2019-09-09 22:22:53 -07:00
Rémy Léone 8b78d7f685 Add readme for scripts (#14913) 2019-07-08 15:24:00 -07:00
Rémy Léone be946f210d Add a script to check differences between translated and English version (#14731)
This script will query all the changes that happen to a reference document (in English) since the last time a given translation was merged (For instance in French).
This could help all the translation team to keep up with the changes that happened inside the reference document.
2019-06-12 06:49:33 -07:00
Tim Bannister 6e901b9dec Check all commits in branch for examples (to trigger testing) (#14243)
* Check for examples changes in all branch commits

Review all the commits in the branch looking for changes inside
content/*/examples and if any are found, trigger testing.

This assumes that the main line branch is named "master"

* Tidy examples testing wrapper

 - print diagnostics to standard error
 - check for a "Yes" value rather than for absence of "No"
2019-06-10 19:54:16 -07:00
Luc Perkins 654db85168 Use Hugo extended for Sass/CSS (#13113) 2019-06-09 06:31:07 -07:00
Roy Lenferink de62ee2d2b Added error handling to find_pr script (#14110) 2019-05-08 14:12:35 -07:00