Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/LederCards/cards
Browse files Browse the repository at this point in the history
  • Loading branch information
ledergamesmatt committed May 7, 2024
2 parents 56ba549 + 036ef85 commit 5f92e02
Show file tree
Hide file tree
Showing 4 changed files with 221 additions and 3 deletions.
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ This repository obtains and reformats cards for the Leder Spotlight application.
- `npm run build:card-symbols` - move the card symbol icons
- `npm run build:card-images` - move the card images
- `npm run build:i18n` - build the i18n files and ensure that they're formatted correctly
- `npm run validate` - validate everything
- `npm run validate:card-data` - validate the card data is formatted correctly

## Adding New Content
Expand All @@ -39,6 +40,14 @@ Follow the guide for adding a new locale
1. Create a new folder in `content/card-images/{product}` for the locale (probably `en-US`)
1. Fill this folder with the images for the cards for the game.

### Adding New Filters

When adding new filters in a meta data file that previously did not exist, you must also:

1. Navigate to each locale file (in the `i18n` folder)
1. Go to `Pages.AdvancedSearch`
1. Add a similar entry as seen there for your new filter.

## Publishing New Content

This is done automatically when a PR is merged to `master`, and isn't intended to be done manually.
207 changes: 205 additions & 2 deletions content/i18n/en-US.yml
Original file line number Diff line number Diff line change
@@ -1,2 +1,205 @@
App:
Title: 'Leder Light'
Common:
Company: Leder Games
AppName: Lederlight

Actions:
AdvancedLong: Advanced Search
AdvancedShort: Advanced
SyntaxLong: Syntax Help
SyntaxShort: Syntax
ProductsLong: All Products
ProductsShort: Products

Products:
Oath: Oath
Root: Root
Arcs: Arcs
Fort: Fort
Vast: Vast
Ahoy: Ahoy

Meta:
Title: 'Leder Cards Spotlight'

Languages:
en-US: English

Components:
BelowTheFold:
Home: Home

LightMode: Light Mode
DarkMode: Dark Mode

CategoryCards: Cards

CategorySupport: Support
FAQ: FAQ
Ask: Ask a Question

CategoryMore: More
GitHub: GitHub
Discord: Discord

Copyright: The literal and graphical information presented on this site about Leder Games, including card images and symbols is copyright Leder Games.

Omnisearch:
Search: Search all of {{ selectedProduct }}...

Pages:
Homepage:
SubText: is your go-to cardpanion for

AdvancedSearch:
CardNameLabel: Card Name
CardNamePlaceholder: Search any card name

ProductLabel: Product
ProductPlaceholder: Select product

SubproductsLabel: Subproducts
SubproductsPlaceholder: Select subproducts

TagsLabel: Tags
TagsPlaceholder: Select tags

DefenseLabel: Defense
DefensePlaceholder: Defense

CardCapacityLabel: Card Capacity
CardCapacityPlaceholder: Card Capacity

KeysLabel: Keys
KeysPlaceholder: Keys

ActLabel: Act
ActPlaceholder: Act

ComplexityLabel: Complexity
ComplexityPlaceholder: Complexity

NumberText: If left unspecified, will not be included in the search query

Operators:
EqualTo: Equal To
NotEqualTo: Not Equal To
GreaterThan: Greater Than
LessThan: Less Than
GreaterThanOrEqualTo: Greater Than Or Equal To
LessThanOrEqualTo: Less Than Or Equal To

Actions:
Search: Search
Reset: Reset

SyntaxHelp:
Header: 'Search Reference'
Subheader: 'includes a large set of keywords and filters you can use to filter cards.'

Operators:
ID:
Name: ID
Text: >
You can find cards that match a certain id by using the `id:` operator.
This operator is special, you may also search without using the operator.
Examples:
- Example: '`OATH/1`'
Text: Find specifically the card matching the id OATH/1.

- Example: '`id:=OATH/1`'
Text: Find specifically the card matching the id OATH/1.

- Example: '`-id:OATH`'
Text: Exclude all cards with the id OATH.

Name:
Name: Name
Text: >
You can find cards that match a certain expansion by using the `name:` or `n:` operator.
This operator is a loose-text operator, which means that you can use partial names. You can also specify multiple expansions by separating them with a comma. If a name has spaces in its name, you must use quotation marks around the name.
Examples:
- Example: '`Alchemist`'
Text: Cards with "alchemist" in their name.

- Example: '`name:alchemist`'
Text: Cards with "alchemist" in their name.

- Example: '`name:"=Alchemist"`'
Text: Cards that are called exactly "Alchemist".

- Example: '`-name:"Alchemist"`'
Text: Cards without "alchemist" in their name.

Product:
Name: Product
Text: >
You can find cards that are associated with a certain product/game by using the `product:` operator.
Examples:
- Example: '`product:oath`'
Text: Cards that belong to the Oath product.

- Example: '`-product:root`'
Text: Cards that don't belong to the Root product.

Subproduct:
Name: Subproduct
Text: >
You can find cards that are associated with a certain subproduct/expansion by using the `subproduct:` operator.
Examples:
- Example: '`subproduct:clockwork-1`'
Text: Cards that belong to the Clockwork 1 subproduct.

- Example: '`-subproduct:exiles-partisans`'
Text: Cards that don't belong to the Exiles & Partisans subproduct.

Tag:
Name: Tag
Text: >
You can find cards that have a certain tag by using the `tag:` search operator. Almost every card will have a tag. You can find a list of valid tags by using the advanced search page.
Examples:
- Example: '`tag:"Power"`'
Text: Cards that have the Power tag.

- Example: '`tag:"Power,Arcane"`'
Text: Cards that have the Power and Arcane tags.

- Example: '`tag:none`'
Text: Cards with no tags.

SearchResults:
NoResults:
Header: No results found
Subheader: For help using the search tool, check the
HelpGuide: help guide

Results:
Sorter:
As: Cards as
AsImages: Images
AsText: Text

Sorted: Sorted by
SortedName: Name
SortedID: ID
SortedProduct: Product

Asc: Asc ↑
Desc: Desc ↓

Pagination:
Previous: Previous
Next: Next

Card:
More: More
FAQ: FAQ
Rules: Rules
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
"build:i18n": "ts-node scripts/build-i18n",
"compress:card-images": "ts-node scripts/compress-card-images",
"compress:card-symbols": "ts-node scripts/compress-card-symbols",
"validate": "concurrently \"npm run validate:*\"",
"validate:card-data": "ts-node scripts/validate-cards",
"finalize:version": "ts-node scripts/finalize-version",
"copy:headers": "ts-node scripts/copy-headers"
Expand Down
7 changes: 6 additions & 1 deletion scripts/build-meta-data.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@ const readAllMeta = async () => {
const allMetaFiles = await readdir('./content/meta-data');
const allMetas = allMetaFiles.map((f) => yaml.load(fs.readFileSync(f)));

fs.writeJsonSync(`dist/meta.json`, allMetas);
const allLocaleFiles = await readdir('./content/i18n');
const allLocales = allLocaleFiles.map((f) => path.basename(f, '.yml'));

const json = { products: allMetas, locales: allLocales };

fs.writeJsonSync(`dist/meta.json`, json);
console.log(`Got ${allMetas.length} meta data files!`);
};

Expand Down

0 comments on commit 5f92e02

Please sign in to comment.