Skip to content

Commit

Permalink
Merge pull request #227 from ttsukagoshi/main
Browse files Browse the repository at this point in the history
v3.0.5 release
  • Loading branch information
ttsukagoshi committed Jul 2, 2022
2 parents 0977d42 + 814f800 commit e4ee2bf
Show file tree
Hide file tree
Showing 20 changed files with 8,605 additions and 3,234 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ env:
browser: true
es6: true
jest: true
node: true

###############
# Global Vars #
Expand Down Expand Up @@ -44,7 +45,7 @@ globals:
parser: '@typescript-eslint/parser'
parserOptions:
ecmaVersion: 2018
sourceType: script
sourceType: module

###########
# Plugins #
Expand Down
15 changes: 15 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
changelog:
categories:
- title: 🚑 Bug Fixes
labels:
- bug
- title: 📃 Documentations
labels:
- documentation
- title: 🔨 Dev Dependencies
labels:
- dependencies
- title: Other Changes
labels:
- "*"

8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -50,7 +50,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -64,4 +64,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
10 changes: 5 additions & 5 deletions .github/workflows/release.yml → .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Release
name: Deploy

on:
push:
Expand All @@ -19,14 +19,14 @@ jobs:
RELEASE_CLASP_SCRIPT_ID: ${{ secrets.RELEASE_CLASP_SCRIPT_ID }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3

- uses: actions/setup-node@v2
- uses: actions/setup-node@v3
with:
node-version: '14'
node-version: '16'

- name: Cache node modules
uses: actions/cache@v2
uses: actions/cache@v3.0.4
env:
cache-name: cache-node-modules
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/label.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ jobs:
contents: read
pull-requests: write
steps:
- uses: actions/labeler@v3
- uses: actions/labeler@v4.0.0
with:
repo-token: '${{ secrets.GITHUB_TOKEN }}'
2 changes: 1 addition & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
# Checkout the code base #
##########################
- name: Checkout Code
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# Full git history is needed to get a proper list of changed files within `super-linter`
fetch-depth: 0
Expand Down
5 changes: 2 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
.DS_Store

# clasp
.clasp.json

# Node.js
node_modules/

# Jest
coverage/
# debugging
src/debug/
20 changes: 15 additions & 5 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,16 @@
{
"editor.formatOnSave": true,
"files.eol": "\n",
"editor.tabSize": 2,
"editor.defaultFormatter": "esbenp.prettier-vscode"
}
"editor.formatOnSave": true,
"files.eol": "\n",
"editor.tabSize": 2,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"json.schemas": [
{
"fileMatch": ["appsscript.json"],
"url": "http://json.schemastore.org/appsscript"
},
{
"fileMatch": [".clasp.json"],
"url": "http://json.schemastore.org/clasp"
}
]
}
7 changes: 6 additions & 1 deletion README.ja.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Group Merge: Gmail のための差し込みメール作成 ([English](https://github.com/ttsukagoshi/mail-merge-for-gmail) / 日本語)

[![Google Workspaceマーケットプレイスでこのアドオンを入手する](https://img.shields.io/badge/Google%20Workspace%20Add--on-Available-green?style=flat-square)](https://workspace.google.com/marketplace/app/group_merge_mail_merge_for_gmail/586770229603) [![GitHub Super-Linter](https://github.com/ttsukagoshi/mail-merge-for-gmail/workflows/Lint%20Code%20Base/badge.svg?style=flat-square)](https://github.com/marketplace/actions/super-linter) [![clasp](https://img.shields.io/badge/built%20with-clasp-4285f4.svg?style=flat-square)](https://github.com/google/clasp) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![Get this add-on from Google Workspace Marketplace](https://img.shields.io/badge/Google%20Workspace%20Add--on-Available-green?style=flat-square)](https://workspace.google.com/marketplace/app/group_merge_mail_merge_for_gmail/586770229603) [![clasp](https://img.shields.io/badge/built%20with-clasp-4285f4.svg?style=flat-square)](https://github.com/google/clasp) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![CodeQL](https://github.com/ttsukagoshi/mail-merge-for-gmail/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/ttsukagoshi/mail-merge-for-gmail/actions/workflows/codeql-analysis.yml) [![Deploy](https://github.com/ttsukagoshi/mail-merge-for-gmail/actions/workflows/deploy.yml/badge.svg)](https://github.com/ttsukagoshi/mail-merge-for-gmail/actions/workflows/deploy.yml) [![Labeler](https://github.com/ttsukagoshi/mail-merge-for-gmail/actions/workflows/label.yml/badge.svg)](https://github.com/ttsukagoshi/mail-merge-for-gmail/actions/workflows/label.yml) [![Lint Code Base](https://github.com/ttsukagoshi/mail-merge-for-gmail/actions/workflows/linter.yml/badge.svg)](https://github.com/ttsukagoshi/mail-merge-for-gmail/actions/workflows/linter.yml)

Gmail と Google スプレッドシートを使って、受信者一人ひとり向けに宛名などを差し込んで作成。宛先リストで、宛先(メールアドレス)に重複がある場合、内容を 1 通のメールにまとめて送信できる **「まとめ差し込み(Group Merge)」** 機能つき。

Expand All @@ -23,6 +24,10 @@ Gmail と Google スプレッドシートを使って、宛名や会議の日時

本アドオンの使用には、[利用規約(英)](https://www.scriptable-assets.page/ja/add-ons/group-merge/#%E5%88%A9%E7%94%A8%E8%A6%8F%E7%B4%84)への同意が必要です。

## 開発に参加

オープンソースである本アドオン開発はどなたでも参加いただけます。[Contributing Guideline](https://github.com/ttsukagoshi/mail-merge-for-gmail/blob/main/docs/CONTRIBUTING.md) をご一読の上、ご参加ください!

## アイコンの出典

The original icon of this add-on was made by [Freepik](https://www.freepik.com) from [www.flaticon.com](https://www.flaticon.com/) and its colors are modified to fit the theme color of the app.
Expand Down
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Group Merge: Mail Merge for Gmail (English / [日本語](https://github.com/ttsukagoshi/mail-merge-for-gmail/blob/main/README.ja.md))

[![Get this add-on from Google Workspace Marketplace](https://img.shields.io/badge/Google%20Workspace%20Add--on-Available-green?style=flat-square)](https://workspace.google.com/marketplace/app/group_merge_mail_merge_for_gmail/586770229603) [![GitHub Super-Linter](https://github.com/ttsukagoshi/mail-merge-for-gmail/workflows/Lint%20Code%20Base/badge.svg?style=flat-square)](https://github.com/marketplace/actions/super-linter) [![clasp](https://img.shields.io/badge/built%20with-clasp-4285f4.svg?style=flat-square)](https://github.com/google/clasp) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![Get this add-on from Google Workspace Marketplace](https://img.shields.io/badge/Google%20Workspace%20Add--on-Available-green?style=flat-square)](https://workspace.google.com/marketplace/app/group_merge_mail_merge_for_gmail/586770229603) [![clasp](https://img.shields.io/badge/built%20with-clasp-4285f4.svg?style=flat-square)](https://github.com/google/clasp) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
[![CodeQL](https://github.com/ttsukagoshi/mail-merge-for-gmail/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/ttsukagoshi/mail-merge-for-gmail/actions/workflows/codeql-analysis.yml) [![Deploy](https://github.com/ttsukagoshi/mail-merge-for-gmail/actions/workflows/deploy.yml/badge.svg)](https://github.com/ttsukagoshi/mail-merge-for-gmail/actions/workflows/deploy.yml) [![Labeler](https://github.com/ttsukagoshi/mail-merge-for-gmail/actions/workflows/label.yml/badge.svg)](https://github.com/ttsukagoshi/mail-merge-for-gmail/actions/workflows/label.yml) [![Lint Code Base](https://github.com/ttsukagoshi/mail-merge-for-gmail/actions/workflows/linter.yml/badge.svg)](https://github.com/ttsukagoshi/mail-merge-for-gmail/actions/workflows/linter.yml)

An open-sourced Google Workspace Add-on to send personalized emails based on Gmail template to multiple recipients using Google Sheets. The **Group Merge** feature allows the sender to group the contents of two or more rows into one row for a single recipient.

Expand All @@ -25,6 +26,10 @@ Details of the add-on is described in the [app's web page](https://www.scriptabl

You must agree to the [Terms and Conditions](https://www.scriptable-assets.page/terms-and-conditions/) (TaC) to use this add-on. The [disclosure on privacy and OAuth scopes](https://www.scriptable-assets.page/add-ons/group-merge/#disclosure-on-privacy-and-oauth-scopes) constitutes part of this TaC.

## Contribute

Contributions are welcome! Please see our [Contributing Guideline](https://github.com/ttsukagoshi/mail-merge-for-gmail/blob/main/docs/CONTRIBUTING.md) for details on how to contribute to this project.

## Attributes

The original icon of this add-on was made by [Freepik](https://www.freepik.com) from [www.flaticon.com](https://www.flaticon.com/) and its colors are modified to fit the theme color of the app.
Expand Down
37 changes: 34 additions & 3 deletions docs/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ First of all, thank you for taking interest in Group Merge! We would love to hav

## 💬 Concept of Group Merge

Group Merge is designed to make **basic** mail merge operations on Gmail easy-to-use, open, and free for every Gmail users. As such, features focusing on commercial use of mail merge, like tracking link clicks for each emails sent, are considered excessive and will not be target of addtional development or pull request reviews.
Group Merge is designed to make **basic** mail merge operations on Gmail easy-to-use, open, and free for every Gmail users. As such, features focusing on commercial use of mail merge, like tracking link clicks for each emails sent, are considered excessive and will not be target of additional development or pull request reviews.

## 📝 Contributing

Expand All @@ -20,14 +20,45 @@ Please take a look at the existing open issues & discussions before actually pos

### Code on your own. Make pull-requests.

Take a look at [firstcontributions/first-contributions: 🚀✨ Help beginners to contribute to open source projects](https://github.com/firstcontributions/first-contributions) for the basics of contributing code to this project.
Take a look at [firstcontributions/first-contributions: 🚀✨ Help beginners to contribute to open source projects](https://github.com/firstcontributions/first-contributions) for the basics of contributing code to this project. We recommend creating an issue beforehand and referencing it in your pull request to keep the review process simple.

#### Coding Style

- Install [Node.js](https://nodejs.org/)
- We use [clasp](https://github.com/google/clasp), [ESLint](https://eslint.org/), and [Prettier](https://prettier.io/) to code Group Merge. Once you've forked and cloned this repository, execute `npm ci` at the cloned directory.
- We use [clasp](https://github.com/google/clasp), [ESLint](https://eslint.org/), and [Prettier](https://prettier.io/) to code Group Merge, and [Jest](https://jestjs.io/) to conduct unit testing on the code. Once you've forked and cloned this repository, execute `npm ci` at the cloned directory.
- [Visual Studio Code](https://code.visualstudio.com/) is the preferred editor.

#### \[Help Needed\] Internationalization/Localization

Want to contribute, but not sure where to start with? Localization could be a great starter! Group Merge currently supports the following languages:

- English (US)
- Japanese

Adding other languages to this list is always welcome. Please follow the steps below to make Group Merge more inclusive:

1. [Create a new issue](https://github.com/ttsukagoshi/mail-merge-for-gmail/issues/new?assignees=ttsukagoshi&labels=enhancement&template=feature_request.md&title=%5BNEW+FEAT%5D) to specify the language you will be adding, and to let everyone in the community know that you will be working on it. The issue title should be something like `[NEW FEAT] Add Spanish language`. If there is an existing issue for the language of your choice, avoid creating a duplicate issue and see if you can collaborate with the user who created the original issue.
2. Fork the repository and start working on the translation. All UI messages are defined in `../src/group-merge.js` under the const `MESSAGES`:

```javascript
const MESSAGES = {
en: {
'<messageName>': '<messageString>',
},
ja: {...}
};
```

The keys directly under MESSAGES correspond with the user locale value in the Google Workspace Add-on event object.

> `event.commonEventObject.userLocale`: The user's language and country/region identifier in the format of [ISO 639](https://en.wikipedia.org/wiki/ISO_639_macrolanguage) language code-[ISO 3166](https://en.wikipedia.org/wiki/ISO_3166) country/region code. For example, `en-US`.
>
> Source: https://developers.google.com/apps-script/add-ons/concepts/event-objects#common_event_object
Contrary to the description in the official document, it seems `en-US` is expressed simply as `en`, whereas English (United Kingdom) is expressed `en-GB`. Moreover, as in the above example `ja`, it seems languages that do not have country/region variations are expressed simply by the two-letter, lowercase ISO 639 language code. Add the locale code of your choice, copy the values from `en`, and translate the messages.

Note that some messages have placeholders like `{{myEmail}}`. Translate such messages so that these placeholders are kept in context.

## 📗 References

- [Code of Conduct](https://github.com/ttsukagoshi/mail-merge-for-gmail/blob/main/docs/CODE_OF_CONDUCT.md)
Loading

0 comments on commit e4ee2bf

Please sign in to comment.