cwicr-multilingual
Work with CWICR database across 9 languages. Cross-language matching, translation, and regional pricing.
What this skill does
# CWICR Multilingual Support
## Overview
CWICR database supports 9 languages with consistent work item codes. This skill enables cross-language work item matching, translation, and regional price comparison.
## Supported Languages
| Code | Language | Region | Currency |
|------|----------|--------|----------|
| AR | Arabic | Dubai | AED |
| DE | German | Berlin | EUR |
| EN | English | Toronto | CAD |
| ES | Spanish | Barcelona | EUR |
| FR | French | Paris | EUR |
| HI | Hindi | Mumbai | INR |
| PT | Portuguese | São Paulo | BRL |
| RU | Russian | St. Petersburg | RUB |
| ZH | Chinese | Shanghai | CNY |
## Python Implementation
```python
import pandas as pd
from typing import Dict, Any, List, Optional, Tuple
from dataclasses import dataclass
from enum import Enum
class CWICRLanguage(Enum):
"""Supported CWICR languages."""
ARABIC = ("ar", "Arabic", "AED", "Dubai")
GERMAN = ("de", "German", "EUR", "Berlin")
ENGLISH = ("en", "English", "CAD", "Toronto")
SPANISH = ("es", "Spanish", "EUR", "Barcelona")
FRENCH = ("fr", "French", "EUR", "Paris")
HINDI = ("hi", "Hindi", "INR", "Mumbai")
PORTUGUESE = ("pt", "Portuguese", "BRL", "São Paulo")
RUSSIAN = ("ru", "Russian", "RUB", "St. Petersburg")
CHINESE = ("zh", "Chinese", "CNY", "Shanghai")
@property
def code(self) -> str:
return self.value[0]
@property
def name(self) -> str:
return self.value[1]
@property
def currency(self) -> str:
return self.value[2]
@property
def region(self) -> str:
return self.value[3]
@dataclass
class MultilingualWorkItem:
"""Work item with translations."""
work_item_code: str
translations: Dict[str, str] # language_code -> description
prices: Dict[str, float] # language_code -> unit_price
unit: str
class CWICRMultilingual:
"""Work with CWICR across languages."""
# Exchange rates to USD (approximate)
EXCHANGE_RATES = {
'AED': 0.27,
'EUR': 1.08,
'CAD': 0.74,
'INR': 0.012,
'BRL': 0.20,
'RUB': 0.011,
'CNY': 0.14,
'USD': 1.0
}
def __init__(self, databases: Dict[str, pd.DataFrame] = None):
"""Initialize with language databases."""
self.databases = databases or {}
self._index_databases()
def _index_databases(self):
"""Create code-based index for each database."""
self.indexes = {}
for lang, df in self.databases.items():
if 'work_item_code' in df.columns:
self.indexes[lang] = df.set_index('work_item_code')
def load_database(self, language: CWICRLanguage,
file_path: str):
"""Load database for specific language."""
# Detect format and load
if file_path.endswith('.parquet'):
df = pd.read_parquet(file_path)
elif file_path.endswith('.xlsx'):
df = pd.read_excel(file_path)
elif file_path.endswith('.csv'):
df = pd.read_csv(file_path)
else:
raise ValueError(f"Unsupported format: {file_path}")
self.databases[language.code] = df
if 'work_item_code' in df.columns:
self.indexes[language.code] = df.set_index('work_item_code')
def get_item_translations(self, work_item_code: str) -> MultilingualWorkItem:
"""Get all translations for a work item."""
translations = {}
prices = {}
unit = ""
for lang, index in self.indexes.items():
if work_item_code in index.index:
row = index.loc[work_item_code]
translations[lang] = str(row.get('description', ''))
prices[lang] = float(row.get('unit_price', 0))
if not unit:
unit = str(row.get('unit', ''))
return MultilingualWorkItem(
work_item_code=work_item_code,
translations=translations,
prices=prices,
unit=unit
)
def translate(self, work_item_code: str,
from_lang: str,
to_lang: str) -> Optional[str]:
"""Translate work item description."""
if to_lang not in self.indexes:
return None
if work_item_code in self.indexes[to_lang].index:
return str(self.indexes[to_lang].loc[work_item_code].get('description', ''))
return None
def compare_prices(self, work_item_code: str,
normalize_to_usd: bool = True) -> Dict[str, float]:
"""Compare prices across regions."""
prices = {}
for lang, index in self.indexes.items():
if work_item_code in index.index:
price = float(index.loc[work_item_code].get('unit_price', 0))
if normalize_to_usd:
# Get currency for this language
currency = self._get_currency(lang)
rate = self.EXCHANGE_RATES.get(currency, 1.0)
price = price * rate
prices[lang] = round(price, 2)
return prices
def _get_currency(self, lang_code: str) -> str:
"""Get currency for language code."""
for lang in CWICRLanguage:
if lang.code == lang_code:
return lang.currency
return 'USD'
def find_cheapest_region(self, work_item_code: str) -> Tuple[str, float]:
"""Find region with lowest price (USD normalized)."""
prices = self.compare_prices(work_item_code, normalize_to_usd=True)
if not prices:
return ('', 0)
cheapest = min(prices.items(), key=lambda x: x[1])
return cheapest
def find_most_expensive_region(self, work_item_code: str) -> Tuple[str, float]:
"""Find region with highest price (USD normalized)."""
prices = self.compare_prices(work_item_code, normalize_to_usd=True)
if not prices:
return ('', 0)
expensive = max(prices.items(), key=lambda x: x[1])
return expensive
def cross_language_search(self, query: str,
source_lang: str) -> Dict[str, List[str]]:
"""Search in one language, get results in all languages."""
if source_lang not in self.databases:
return {}
source_df = self.databases[source_lang]
# Find matching codes
matches = source_df[
source_df['description'].str.contains(query, case=False, na=False)
]['work_item_code'].tolist()
# Get translations for matches
results = {}
for code in matches[:10]: # Limit to 10
item = self.get_item_translations(code)
results[code] = item.translations
return results
def price_comparison_report(self, work_item_codes: List[str]) -> pd.DataFrame:
"""Generate price comparison report across regions."""
rows = []
for code in work_item_codes:
item = self.get_item_translations(code)
prices_usd = self.compare_prices(code, normalize_to_usd=True)
row = {
'code': code,
'description': item.translations.get('en', list(item.translations.values())[0] if item.translations else ''),
'unit': item.unit
}
for lang, price in prices_usd.items():
row[f'price_{lang}_usd'] = price
if prices_usd:
row['min_price'] = min(prices_usd.values())
row['max_price'] = max(prices_usd.values())
row['price_variance'] = row['max_price'] - row['min_price']
rows.append(row)
return pd.DataFrame(rows)
class LanguageDetector:
"""Detect language of construction text."""
# Common construction terms by language
KEYWORDS = {
'en': ['concrete', 'wall', 'floor', 'door', 'window', 'steel', 'brick'],
'de': ['beton', 'wand', 'boden', 'tür', 'fensteRelated in General
modeling-omnistudio-epc-catalog
IncludedSalesforce Industries CME EPC product-modeling skill for Product2-based catalog creation. Use when creating EPC products, configuring product attributes, building offer bundles with Product Child Items, or reviewing EPC DataPack JSON metadata for product catalog changes. TRIGGER when: user creates or updates Product2 EPC records, AttributeAssignment payloads, AttributeMetadata/AttributeDefaultValues, Offer bundles, or ProductChildItem relationships. DO NOT TRIGGER when: designing OmniScripts/FlexCards/Integration Procedures (use building-omnistudio-omniscript, building-omnistudio-flexcard, or building-omnistudio-integration-procedure), implementing Apex business logic (use generating-apex), or troubleshooting deployment pipelines (use deploying-metadata).
relationship-science-coach
IncludedUse this skill for direct, practical adult relationship coaching: couples conflict, repair, trust, marriage, dating, flirting, attachment patterns, emotional connection, sex, desire differences, eroticism, kink negotiation, affection, love languages, breakups, and long-term passion. Draw on Gottman, EFT and Hold Me Tight, attachment science, modern sex research, Perel, Nagoski, Kerner, Schnarch, Love and Stosny, and flexible love-language tools. Be concrete and low-hedge. Redirect only for imminent danger, abuse, coercive control, minors, non-consent, self-harm, stalking, or medical/legal/psychiatric decisions.
building-sf-integrations
IncludedSalesforce integration architecture and runtime plumbing with 120-point scoring. Use this skill to set up Named Credentials, External Credentials, External Services, REST/SOAP callout patterns, Platform Events, and Change Data Capture. TRIGGER when: user sets up Named Credentials, External Services, REST/SOAP callouts, Platform Events, CDC, or touches .namedCredential-meta.xml files. DO NOT TRIGGER when: Connected App/OAuth config (use configuring-connected-apps), Apex-only logic (use generating-apex), or data import/export (use handling-sf-data).
venue-templates
IncludedAccess comprehensive LaTeX templates, formatting requirements, and submission guidelines for major scientific publication venues (Nature, Science, PLOS, IEEE, ACM), academic conferences (NeurIPS, ICML, CVPR, CHI), research posters, and grant proposals (NSF, NIH, DOE, DARPA). This skill should be used when preparing manuscripts for journal submission, conference papers, research posters, or grant proposals and need venue-specific formatting requirements and templates.
let-fate-decide
IncludedDraws the 12 Houses of the Zodiac Tarot spread to inject entropy into planning when prompts are vague, ambiguous, or casually delegated. Interprets the spread to guide next steps. Use when the user says 'let fate decide', 'YOLO', 'whatever', 'idk', or other nonchalant phrases, makes Yu-Gi-Oh references, or when you are about to arbitrarily pick between multiple reasonable approaches. Prefer over ask-questions-if-underspecified when the user's tone is casual or playful rather than precision-seeking.
net-ops
IncludedCross-platform network troubleshooting (Windows, macOS, Linux) via local or remote shell. Use for: DNS broken, can't resolve hostnames, nslookup/dig works but apps fail, NRPT, WFP, scutil, /etc/resolver, systemd-resolved, /etc/resolv.conf, NetworkManager, VPN DNS leak residue (ProtonVPN/Mullvad/WireGuard/AnyConnect), AV/firewall blocking DNS or DoH, Tailscale DNS interaction, intermittent connectivity, remote diagnostics over SSH.