From 7a29614e0be950595d18a1a1e7a297438d262974 Mon Sep 17 00:00:00 2001 From: Masafumi NAKANE Date: Tue, 23 Apr 2024 18:28:44 +0900 Subject: [PATCH 1/5] =?UTF-8?q?=E3=83=90=E3=83=BC=E3=82=B8=E3=83=A7?= =?UTF-8?q?=E3=83=B3=E6=83=85=E5=A0=B1=E3=82=92version.py=E3=81=AB?= =?UTF-8?q?=E5=88=86=E9=9B=A2=E3=81=97=E3=80=81=E6=97=A5=E8=8B=B1=E5=85=B1?= =?UTF-8?q?=E9=80=9A=E7=AE=A1=E7=90=86=E3=81=AB=E3=81=99=E3=82=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/source/conf.py | 16 +++++++++------- ja/source/conf.py | 14 +++++++------- version.py | 3 +++ 3 files changed, 19 insertions(+), 14 deletions(-) create mode 100644 version.py diff --git a/en/source/conf.py b/en/source/conf.py index 7c8938b..7d2c3f3 100644 --- a/en/source/conf.py +++ b/en/source/conf.py @@ -12,27 +12,29 @@ # import os import sys +sys.path.insert(0, os.path.abspath('../..')) sys.path.insert(0, os.path.abspath('.')) import datetime import re +import locale # -- Project information ----------------------------------------------------- +from version import * project = 'freee Accessibility Guidelines' author = 'freee K.K.' -guidelines_version = 'Ver. 202404.0' -checksheet_version = '4.3.7' -publishedDate = u'Apr 23 2024' guidelines_version_suffix = '-RELEASE' guidelines_version_date = '' +locale.setlocale(locale.LC_TIME, 'en_US.UTF-8') +date_obj = datetime.datetime.strptime(publishedDate, '%Y-%m-%d') if 'current' in tags: guidelines_version_suffix = '-CURRENT' - import datetime - guidelines_version_date = f'.{datetime.date.today().strftime("%Y%m%d")}' - today_str = datetime.date.today().strftime('%b %d %Y') - publishedDate = today_str + date_obj = datetime.date.today() + guidelines_version_date = f'.{date_obj.strftime("%Y%m%d")}' +date_str = date_obj.strftime('%b %d %Y') +publishedDate = date_str version = guidelines_version + guidelines_version_suffix + f'+{checksheet_version}' release = guidelines_version + guidelines_version_suffix + guidelines_version_date + f'+{checksheet_version}' guidelines_version_string = guidelines_version + guidelines_version_suffix + guidelines_version_date diff --git a/ja/source/conf.py b/ja/source/conf.py index e1b5532..8cd939d 100644 --- a/ja/source/conf.py +++ b/ja/source/conf.py @@ -12,6 +12,7 @@ # import os import sys +sys.path.insert(0, os.path.abspath('../..')) sys.path.insert(0, os.path.abspath('.')) import datetime import re @@ -20,22 +21,21 @@ from sphinx.util.docutils import SphinxDirective # -- Project information ----------------------------------------------------- +from version import * project = 'freeeアクセシビリティー・ガイドライン' author = 'フリー株式会社' -guidelines_version = 'Ver. 202400.0' -checksheet_version = '4.3.7' -publishedDate = u'2024年4月23日' guidelines_version_suffix = '-RELEASE' guidelines_version_date = '' +date_obj = datetime.datetime.strptime(publishedDate, '%Y-%m-%d') if 'current' in tags: guidelines_version_suffix = '-CURRENT' - import datetime - guidelines_version_date = f'.{datetime.date.today().strftime("%Y%m%d")}' - today_str = datetime.date.today().strftime('%Y年%-m月%-d日') - publishedDate = today_str + date_obj = datetime.date.today() + guidelines_version_date = f'.{date_obj.strftime("%Y%m%d")}' +date_str = date_obj.strftime('%Y年%-m月%-d日') +publishedDate = date_str version = guidelines_version + guidelines_version_suffix + f'+{checksheet_version}' release = guidelines_version + guidelines_version_suffix + guidelines_version_date + f'+{checksheet_version}' guidelines_version_string = guidelines_version + guidelines_version_suffix + guidelines_version_date diff --git a/version.py b/version.py new file mode 100644 index 0000000..0debec6 --- /dev/null +++ b/version.py @@ -0,0 +1,3 @@ +guidelines_version = 'Ver. 202400.0' +checksheet_version = '4.3.7' +publishedDate = '2024-04-23' From e576f3e26ff09154f4b1053ed411b9d8c00b6de9 Mon Sep 17 00:00:00 2001 From: Masafumi NAKANE Date: Tue, 23 Apr 2024 18:29:15 +0900 Subject: [PATCH 2/5] =?UTF-8?q?=E3=83=90=E3=83=BC=E3=82=B8=E3=83=A7?= =?UTF-8?q?=E3=83=B3=E7=95=AA=E5=8F=B7=E3=81=AE=E8=AA=A4=E3=82=8A=E3=82=92?= =?UTF-8?q?=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/version.py b/version.py index 0debec6..9dca331 100644 --- a/version.py +++ b/version.py @@ -1,3 +1,3 @@ -guidelines_version = 'Ver. 202400.0' +guidelines_version = 'Ver. 202404.0' checksheet_version = '4.3.7' publishedDate = '2024-04-23' From 7534c249d65f35cbbac9a9a0ece6b29a34e5248b Mon Sep 17 00:00:00 2001 From: Masafumi NAKANE Date: Tue, 23 Apr 2024 18:31:12 +0900 Subject: [PATCH 3/5] =?UTF-8?q?import=E6=96=87=E3=82=92=E9=9B=86=E7=B4=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- en/source/conf.py | 4 ++-- ja/source/conf.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/en/source/conf.py b/en/source/conf.py index 7d2c3f3..535d3bc 100644 --- a/en/source/conf.py +++ b/en/source/conf.py @@ -12,11 +12,11 @@ # import os import sys -sys.path.insert(0, os.path.abspath('../..')) -sys.path.insert(0, os.path.abspath('.')) import datetime import re import locale +sys.path.insert(0, os.path.abspath('../..')) +sys.path.insert(0, os.path.abspath('.')) # -- Project information ----------------------------------------------------- from version import * diff --git a/ja/source/conf.py b/ja/source/conf.py index 8cd939d..737a7eb 100644 --- a/ja/source/conf.py +++ b/ja/source/conf.py @@ -12,13 +12,13 @@ # import os import sys -sys.path.insert(0, os.path.abspath('../..')) -sys.path.insert(0, os.path.abspath('.')) import datetime import re from docutils import nodes from docutils.parsers.rst import Directive from sphinx.util.docutils import SphinxDirective +sys.path.insert(0, os.path.abspath('../..')) +sys.path.insert(0, os.path.abspath('.')) # -- Project information ----------------------------------------------------- from version import * From 5e980bcfb7132c671cf4ee89ebb346d1bd8140e7 Mon Sep 17 00:00:00 2001 From: Masafumi NAKANE Date: Tue, 23 Apr 2024 18:34:35 +0900 Subject: [PATCH 4/5] =?UTF-8?q?=E6=97=A5=E6=9C=AC=E8=AA=9E=E7=89=88?= =?UTF-8?q?=E3=81=A7=E3=82=82=E6=98=8E=E7=A4=BA=E7=9A=84=E3=81=ABlocale?= =?UTF-8?q?=E3=82=92=E8=A8=AD=E5=AE=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ja/source/conf.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ja/source/conf.py b/ja/source/conf.py index 737a7eb..7c6c78c 100644 --- a/ja/source/conf.py +++ b/ja/source/conf.py @@ -14,6 +14,7 @@ import sys import datetime import re +import locale from docutils import nodes from docutils.parsers.rst import Directive from sphinx.util.docutils import SphinxDirective @@ -28,6 +29,7 @@ guidelines_version_suffix = '-RELEASE' guidelines_version_date = '' +locale.setlocale(locale.LC_TIME, 'ja_JP.UTF-8') date_obj = datetime.datetime.strptime(publishedDate, '%Y-%m-%d') if 'current' in tags: guidelines_version_suffix = '-CURRENT' From 93480c2a71fcddaf28c2aa2804e5da26bf597928 Mon Sep 17 00:00:00 2001 From: Masafumi NAKANE Date: Tue, 23 Apr 2024 18:49:25 +0900 Subject: [PATCH 5/5] =?UTF-8?q?GitHub=20Actions=E5=AE=9F=E8=A1=8C=E6=99=82?= =?UTF-8?q?=E3=81=AB=20ja=5FJP.UTF-8=20locale=E3=82=92=E3=82=A4=E3=83=B3?= =?UTF-8?q?=E3=82=B9=E3=83=88=E3=83=BC=E3=83=AB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/lint.yaml | 4 ++++ .github/workflows/release.yml | 5 +++++ 2 files changed, 9 insertions(+) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index 2f75c2d..446f222 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -68,6 +68,10 @@ jobs: python-version: '3.9.x' - name: Install the Latest pip run: python -m pip install --upgrade pip + - name: install ja_JP.UTF-8 locale + run: | + sudo locale-gen ja_JP.UTF-8 + sudo update-locale LANG=ja_JP.UTF-8 - name: Install required modules run: python -m pip install -r requirements.txt --upgrade - name: Build HTML diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index e2df395..c36d550 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -32,6 +32,11 @@ jobs: aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} aws-region: ap-northeast-1 + - name: install ja_JP.UTF-8 locale + run: | + sudo locale-gen ja_JP.UTF-8 + sudo update-locale LANG=ja_JP.UTF-8 + - name: Install the Latest pip run: python -m pip install --upgrade pip