Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Create a script that makes a json file with key value pairs for translations #106

Merged
merged 34 commits into from
Jan 30, 2024

Conversation

VebjornG
Copy link
Contributor

@VebjornG VebjornG commented Jan 23, 2024

Description

We are translating the information from the docstrings in the functions in InDSL so that they can be displayed in different languages in Charts. In this workflow a script that takes the docstrings and singles out the relevant fields with the correct keys and thereafter places them in a JSON file is needed.

Ticket

How Has This Been Tested?

A test that writes to a JSON file in order to check that the output of the parsed docstring is correct is included in this PR.

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • Refactor (non-breaking change which improves implementation)
  • Performance (non-breaking change which improves performance. Please add associated performance test and results)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Non-functional change (xml comments/documentation/etc)

Contributor Checklist:

  • My code follows the code style of this project.
  • I have added an example of my new feature and included it in the documentation.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • My Pull Request name follows the naming convention fix: <description>, feat: <description>, etc.

Reviewer Checklist for Charts compliant functions:

  • The docstrings of the new function follow the contributing guidelines.
  • The new function is professionally documented
  • The new function and associated scripts are covered by one or more unit tests and code coverage did not decrease.
  • The new function is accompanied by an example and it is included in the Gallery of Charts.
  • The new function is reviewed in Chromatic. Access the storybook build results url and comment, approve or deny.
  • All function inputs, arguments, and outputs have a supported data type and have human readable names.
  • No code language is included in the description of the function or parameters (e.g use "polynomial order" instead of "poly_order")

Copy link

codecov bot commented Jan 23, 2024

Codecov Report

Merging #106 (4e1024e) into main (ee925f1) will increase coverage by 0.02%.
The diff coverage is 95.83%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #106      +/-   ##
==========================================
+ Coverage   91.23%   91.26%   +0.02%     
==========================================
  Files         104      105       +1     
  Lines        3778     3802      +24     
  Branches      815      821       +6     
==========================================
+ Hits         3447     3470      +23     
  Misses        207      207              
- Partials      124      125       +1     
Files Coverage Δ
indsl/create_translation_key.py 95.83% <95.83%> (ø)

Copy link

github-actions bot commented Jan 23, 2024

Unit Test Results

    21 files  ±0      21 suites  ±0   56m 54s ⏱️ + 6m 46s
 1 091 tests +1   1 091 ✅ + 1   0 💤 ±0  0 ❌ ±0 
15 411 runs  +9  15 400 ✅ +10  11 💤  - 1  0 ❌ ±0 

Results for commit 4e1024e. ± Comparison against base commit ee925f1.

♻️ This comment has been updated with latest results.

@VebjornG VebjornG changed the title [AH-2611] feat: Create a script that makes json with key value pairs for translations [AH-2611] feat: Create a script that makes a json file with key value pairs for translations Jan 24, 2024
@VebjornG VebjornG changed the title [AH-2611] feat: Create a script that makes a json file with key value pairs for translations feat: Create a script that makes a json file with key value pairs for translations Jan 25, 2024
@VebjornG VebjornG marked this pull request as ready for review January 25, 2024 15:16
@VebjornG VebjornG requested review from a team and dbrattli January 25, 2024 15:16
@VebjornG VebjornG requested a review from neringaalt January 26, 2024 11:32
@VebjornG VebjornG requested a review from neringaalt January 29, 2024 09:36
@neringaalt neringaalt self-requested a review January 30, 2024 13:13
neringaalt
neringaalt previously approved these changes Jan 30, 2024
@neringaalt
Copy link
Contributor

Good job! :)

@VebjornG VebjornG merged commit e8d6f09 into main Jan 30, 2024
@VebjornG VebjornG deleted the vebjorn/add-script branch January 30, 2024 15:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants