Skip to content

Commit

Permalink
🚚 Rename misc.py to section.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Oct 15, 2023
1 parent 7fad1a2 commit 1aea450
Show file tree
Hide file tree
Showing 8 changed files with 23 additions and 23 deletions.
22 changes: 11 additions & 11 deletions docs/locale/zh_CN/LC_MESSAGES/api/utils.po
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@ msgstr ""
#: translate_shell.utils.input.process_text_multilines
#: translate_shell.utils.input.process_text_redundant
#: translate_shell.utils.input.process_translators_code
#: translate_shell.utils.misc.p10k_sections
#: translate_shell.utils.misc.section_os
#: translate_shell.utils.misc.section_path
#: translate_shell.utils.misc.section_time translate_shell.utils.notify.notify
#: translate_shell.utils.section.p10k_sections
#: translate_shell.utils.section.section_os
#: translate_shell.utils.section.section_path
#: translate_shell.utils.section.section_time translate_shell.utils.notify.notify
#: translate_shell.utils.output.process_output
#: translate_shell.utils.output.process_output_explain
#: translate_shell.utils.output.process_output_firstline
Expand Down Expand Up @@ -84,8 +84,8 @@ msgstr ""
#: translate_shell.utils.input.process_text_multilines
#: translate_shell.utils.input.process_text_redundant
#: translate_shell.utils.input.process_translators_code
#: translate_shell.utils.misc.p10k_sections
#: translate_shell.utils.misc.section_time translate_shell.utils.notify.notify
#: translate_shell.utils.section.p10k_sections
#: translate_shell.utils.section.section_time translate_shell.utils.notify.notify
#: translate_shell.utils.output.process_output
#: translate_shell.utils.output.process_output_explain
#: translate_shell.utils.output.process_output_firstline
Expand Down Expand Up @@ -139,23 +139,23 @@ msgstr ""
msgid "process_translators_code."
msgstr ""

#: of translate_shell.utils.misc:2
#: of translate_shell.utils.section:2
msgid "Misc"
msgstr ""

#: of translate_shell.utils.misc.p10k_sections:1
#: of translate_shell.utils.section.p10k_sections:1
msgid "p10k sections."
msgstr ""

#: of translate_shell.utils.misc.section_os:1
#: of translate_shell.utils.section.section_os:1
msgid "Section os."
msgstr ""

#: of translate_shell.utils.misc.section_path:1
#: of translate_shell.utils.section.section_path:1
msgid "Section path."
msgstr ""

#: of translate_shell.utils.misc.section_time:1
#: of translate_shell.utils.section.section_time:1
msgid "Section time."
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions docs/locale/zh_CN/LC_MESSAGES/resources/config.po
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ msgstr ""

#: ../../resources/config.md:162
msgid ""
"The functions in [misc](translate_shell.utils.misc) should be useful for "
"The functions in [section](translate_shell.utils.section) should be useful for "
"customization. BTW, you can use these functions to define your prompt of "
"python, too. See [prompt](https://github.com/Freed-Wu/my-dotfiles/wiki)."
msgstr ""
Expand Down Expand Up @@ -408,7 +408,7 @@ msgstr ""

#: ../../resources/config.md:261
msgid ""
"The functions in [misc](translate_shell.utils.misc) should be useful for "
"The functions in [section](translate_shell.utils.section) should be useful for "
"customization."
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions docs/resources/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ auto:zh_CN>

The screenshot is same as above in [logger](#logger).

The functions in [misc](translate_shell.utils.misc) should be useful for
The functions in [section](translate_shell.utils.section) should be useful for
customization. BTW, you can use these functions to define your prompt of
python, too. See [prompt](https://github.com/Freed-Wu/my-dotfiles/wiki).

Expand Down Expand Up @@ -317,7 +317,7 @@ config.process_output = process_output

The screenshot is same as above in [logger](#logger).

The functions in [misc](translate_shell.utils.misc) should be useful for
The functions in [section](translate_shell.utils.section) should be useful for
customization.

If you install
Expand Down
6 changes: 3 additions & 3 deletions src/translate_shell/tools/generate_prompt/__main__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
r"""This module can be called by
`python -m <https://docs.python.org/3/library/__main__.html>`_.
generate prompt by `translate_shell.utils.misc`'s `p10k_sections()`.
generate prompt by `translate_shell.utils.section`'s `p10k_sections()`.
By default, it is for `lftp <https://lftp.yar.ru/>`_.
See section ``cmd:prompt`` of `man lftp <https://lftp.yar.ru/lftp-man.html>`_.
::
Expand Down Expand Up @@ -43,7 +43,7 @@ def get_parser() -> ArgumentParser:
r"""Get a parser for unit test."""
parser = ArgumentParser(
description="""\
generate prompt by `translate_shell.utils.misc`'s `p10k_sections()`.
generate prompt by `translate_shell.utils.section`'s `p10k_sections()`.
By default, it is for lftp. See section cmd:prompt of `man lftp`.
""",
epilog=EPILOG,
Expand Down Expand Up @@ -80,7 +80,7 @@ def main() -> None:

import sys

from ...utils.misc import p10k_sections
from ...utils.section import p10k_sections

if args.section == []:
args.section = SECTION
Expand Down
2 changes: 1 addition & 1 deletion src/translate_shell/tools/repl/ps1.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import sys
from typing import Callable

from ...utils.misc import (
from ...utils.section import (
p10k_sections,
section_os_icon,
section_path,
Expand Down
2 changes: 1 addition & 1 deletion src/translate_shell/utils/output.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from ..__main__ import ASSETS_PATH
from ..external.colorama import Fore, Style
from ..translate import Translations
from .misc import p10k_sections
from .section import p10k_sections

NUMBER = json.loads(
(ASSETS_PATH / "json" / "number.json").read_text(encoding="utf-8")
Expand Down
2 changes: 1 addition & 1 deletion src/translate_shell/utils/prompt.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Get prompt
=============
"""
from .misc import p10k_sections, section_path, section_time
from .section import p10k_sections, section_path, section_time


def prompt_p10k(tl: str, sl: str, translators: str) -> str:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
r"""Misc
========
r"""Section
===========
"""
import os
import platform
Expand Down

0 comments on commit 1aea450

Please sign in to comment.