# yup-locale-ja

Latest version **1.0.0** (published 2023-03-25) · MIT license · 0 weekly downloads

## Install

```sh
npm install yup-locale-ja
pnpm add yup-locale-ja
yarn add yup-locale-ja
bun add yup-locale-ja
```

## Health

**Score 20/100 (F)** — status: abandoned.

Positive: esm support; no vulnerabilities.

Warnings: low downloads; no types.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2023-03-25 |
| First published | 2020-08-02 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 37.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 17 |
| Maintainers | pocka |
| Keywords | yup, locale |

## Links

- npm: https://www.npmjs.com/package/yup-locale-ja
- Repository: https://github.com/pocka/yup-locale-ja
- npm.io page: https://npm.io/package/yup-locale-ja

## Alternatives

- [messageformat](https://npm.io/package/messageformat.md) — 329.7K weekly downloads
- [@mintlify/scraping](https://npm.io/package/@mintlify/scraping.md) — 294.8K weekly downloads
- [@mintlify/previewing](https://npm.io/package/@mintlify/previewing.md) — 209.5K weekly downloads
- [@mintlify/prebuild](https://npm.io/package/@mintlify/prebuild.md) — 209.5K weekly downloads
- [@mintlify/link-rot](https://npm.io/package/@mintlify/link-rot.md) — 206.3K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2023-03-25
- 0.1.3 — 2020-08-12
- 0.1.2 — 2020-08-02
- 0.1.1 — 2020-08-02
- 0.1.0 — 2020-08-02

## README

# yup-locale-ja

[![npm](https://img.shields.io/npm/v/yup-locale-ja)](https://www.npmjs.com/package/yup-locale-ja)
[![Automated Tests Status](https://img.shields.io/github/actions/workflow/status/pocka/yup-locale-ja/test.yml?branch=master&label=test&logo=github)](https://github.com/pocka/yup-locale-ja/actions?query=workflow%3ATest)
[![Automated Publish Status](https://img.shields.io/github/actions/workflow/status/pocka/yup-locale-ja/publish.yml?label=publish&logo=github)](https://github.com/pocka/yup-locale-ja/actions?query=workflow%3APublish)

Japanese localization for [yup](https://github.com/jquense/yup) messages, with translation flavors.

[README (日本語)](./README_ja.md)

## Getting Started

```sh
$ yarn add yup yup-locale-ja

# or...
$ npm i yup yup-locale-ja
```

then, set a locale object as yup's default message dictionary with `setLocale` function.

```js
import { setLocale } from "yup";
import * as ja from "yup-locale-ja";

setLocale(ja.suggestive);
```

For more info, see [yup's README](https://github.com/jquense/yup#using-a-custom-locale-dictionary).

## Translation Flavors

This package comes with two flavors: **descriptive** and **suggestive**.
**descriptive** is such like "~です" ("... is ...") form, which simply describe the field's attribute.
In contrast, **suggestive** messages show a user an action to fix the error, such as "~してください" ("Please do ...").

```js
import * as ja from "yup-locale-ja";

ja.suggestive; // suggestive messages
ja.descriptive; // descriptive messages
```

## How to show a field label?

Add a label by calling [`.label`](https://github.com/jquense/yup#mixedlabellabel-string-schema) method on the field.
This package omits a field path unless a label is set.

## Similar Projects

- [loicmahieu/yup-locales](https://github.com/loicmahieu/yup-locales) ... `fr`, `nl`, `nb`, `de`, `ar`
- [arfurlaneto/yup-locale-pt](https://github.com/arfurlaneto/yup-locale-pt) ... `pt` with three translation flavors

---
_Source: https://npm.io/package/yup-locale-ja · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
