Coder Social home page Coder Social logo

bicstone / ra-language-japanese Goto Github PK

View Code? Open in Web Editor NEW
30.0 30.0 5.0 1.85 MB

Japanese messages for react-admin

Home Page: https://www.npmjs.com/package/@bicstone/ra-language-japanese

License: MIT License

TypeScript 100.00%
admin-on-rest hacktoberfest i18n japanese japanese-language react react-admin translation

ra-language-japanese's Introduction

# requires Node.js >= 16
npx bicstone

ra-language-japanese's People

Contributors

allcontributors[bot] avatar bicstone avatar dependabot[bot] avatar renovate[bot] avatar toknsi avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

ra-language-japanese's Issues

運用の自動化

  • dependabotを用いて、アップデートを通知する
  • パブリッシュ、リリースの自動化

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Repository problems

These problems occurred while renovating this repository. View logs.

  • WARN: Base branch does not exist - skipping

Awaiting Schedule

These updates are awaiting their schedule. Click on a checkbox to get an update now.

  • chore(deps): update node.js to v20.14.0 (main)

Detected dependencies

github-actions
.github/workflows/ci.yml
  • actions/checkout v4
  • pnpm/action-setup v3
  • actions/setup-node v4
.github/workflows/publish-latest.yml
  • actions/checkout v4
  • pnpm/action-setup v3
  • actions/setup-node v4
.github/workflows/publish-next.yml
  • actions/checkout v4
  • pnpm/action-setup v3
  • actions/setup-node v4
nodenv
.node-version
  • node 20.13.1
npm
package.json
  • ra-core >=4.0.0-alpha.2
  • @biomejs/biome 1.7.3
  • all-contributors-cli 6.26.1
  • prettier 3.2.5
  • typescript 5.4.5
  • ra-core >=4.0.0-alpha.2
  • node 20.13.1

  • Check this box to trigger a request for Renovate to run again on this repository

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Location: renovate.json
Error type: The renovate configuration file contains some invalid settings
Message: Invalid packageRules[0].schedule: 'Invalid schedule: Failed to parse "before 6am on"', Invalid packageRules[2].schedule: 'Invalid schedule: Failed to parse "before 6am on"'

README.md掲載サンプルにおける型エラー

こんにちは。素敵な翻訳を公開くださり、ありがとうございます😀

現バージョンのREADME.mdには、v3における使用方法として次のサンプルが書かれています。

import japaneseMessages from '@bicstone/ra-language-japanese';
import polyglotI18nProvider from 'ra-i18n-polyglot';

const messages = {
    ja: japaneseMessages
};
const i18nProvider = polyglotI18nProvider(locale => messages[locale], 'ja');

<Admin i18nProvider={i18nProvider}>
  ...
</Admin>

これを手元のプロジェクトに導入したところ、以下の TypeScript error に遭遇し、コンパイルに失敗しました。

Element implicitly has an 'any' type because expression of type 'string' can't be used to index type '{ ja: Required<TranslationMessages>; }'.
  No index signature with a parameter of type 'string' was found on type '{ ja: Required<TranslationMessages>; }'.  TS7053

    13 |   ja: japaneseMessages
    14 | };
  > 15 | const i18nProvider = polyglotI18nProvider(locale => messages[locale], 'ja');
       |                                                     ^
    16 |
    17 | const App = (): JSX.Element => (
    18 |   <Admin i18nProvider={i18nProvider} dataProvider={dataProvider}>

同エラーに対し手元では、次のように messages 変数の型を明示することで、エラーを解消しました。

import japaneseMessages from '@bicstone/ra-language-japanese';
import { TranslationMessages } from "@bicstone/ra-language-japanese/node_modules/ra-core";
import polyglotI18nProvider from 'ra-i18n-polyglot';

const messages: { [key: string]: TranslationMessages } = {
    ja: japaneseMessages
};
const i18nProvider = polyglotI18nProvider(locale => messages[locale], 'ja');

<Admin i18nProvider={i18nProvider}>
  ...
</Admin>

この修正が最善かどうか自信はありませんが、よろしければ参考にしてください。

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.