Questions tagged [mobility]

Mobility is a pluggable translation framework for Ruby.

Mobility is a ruby gem for storing and retrieving translations as attributes on a class. Storage of translations is handled by customizable "backends" which encapsulate different storage strategies, including translatable columns and model translation tables, as well as database-specific storage solutions such as jsonb and Hstore (for PostgreSQL).

85 questions
1
vote
1 answer

Setting up fixtures for model translations using Mobility in a Rails app

How do I set up fixtures for models translations in a Rails app using Mobility? Currently, I have the following directory structure: test fixtures article translations.yml articles.yml #…
partydrone
  • 507
  • 4
  • 15
1
vote
1 answer

Limit results scope for translations to current locale only with Mobility

How do I limit the result set of a query to records that have a translation for the current locale (or fallback) while leaving out any records that don't? For example, given a locale of :fr, I only want Article.all to return only articles that have…
partydrone
  • 507
  • 4
  • 15
1
vote
1 answer

How to set default fallbacks for mobility?

I saw on the Github documentation of Mobility that it is possible to set default fallbacks for Mobility. I'm trying to do it like this: Mobility.configure do |config| config.default_backend = :table config.accessor_method = :translates …
Rémon
  • 33
  • 8
1
vote
1 answer

Rails and model translations: Main language in original model, translations in external store?

I'm digging around for a Rails model translation solution that fits my needs. I have a model Page with fields title and content. I already have a lot of records in its table. Now I want to translate both title and content. I'd like to keep the title…
Joshua Muheim
  • 12,617
  • 9
  • 76
  • 152
1
vote
1 answer

How to extend in my app an AR model of my engine so Mobility doesn't complain?

In my plugin I'm inheriting few models from the engine and adding Mobility settings. # my enginge module MyEngine class Foo < ApplicationRecord def self.say_hi return "hi" end end end # my plugin require 'my-engine' module…
a.barbieri
  • 2,398
  • 3
  • 30
  • 58
1
vote
1 answer

modelling wireless networks and mobile nodes

I am new to omnet++ and started using it a couple of days ago. I followed the tic toc example and now, I need to learn how to simulate wireless networks I need to implement a very simple example similar to tic toc scenario but with a wireless…
Rehab11
  • 483
  • 2
  • 7
  • 16
1
vote
0 answers

Error while working with Android and Existing SQLite Database, file is encrypted or is not a database

My database contain 5000 records I wanted to fetch those records in Cursor object. Here my DBHelper.java import java.io.File; import java.io.FileOutputStream; import java.io.IOException; import java.io.InputStream; import…
1
vote
2 answers

How to implement login-logout functionality in windows store app?

I need to implement Login-Logout Functionality in Windows Store App. I am new in the world of mobility. I want to know, how to maintain session for a logged-in user. How to implement automatic logout functionality after certain time. Is there any…
user1780538
  • 900
  • 3
  • 13
  • 22
1
vote
2 answers

Bejeweled Blitz - How does it assert there is always a move?

I have been playing Bejeweled Blitz for a while now. Yes, it is an addiction. In thinking about the game, I have observed that on some boards, the bottom runs dry (no moves) leaving only the top part of the board playable. Frequently that part…
EvilTeach
  • 28,120
  • 21
  • 85
  • 141
1
vote
1 answer

Phonegap windows 8 App, with camera functionality, navigate.camera.getPicture() call back function is never called when deployed

We have made a Win8 app using phonegap. The application also has a reference to a Windows runtime component used to perform some asyc task. The application has a camera feature, where in the camera is invoked, picture taken and then the picture is…
Anu
  • 461
  • 2
  • 15
0
votes
0 answers

VANET: How to Implement A* Routing Algorithm in SUMO Simulation with Existing Configuration, Network, Trips, and Routing Files for research purpose?

I'm working on a PhD research topic involving SUMO (Simulation of Urban MObility), and I'm trying to integrate the A* algorithm into my existing simulation. I have the following files: my_simulation.sumocfg: SUMO configuration…
0
votes
0 answers

Is there a way to get translatable attributes of a model extended with Mobility gem?

Is there a way to get translatable attributes of a model extended with Mobility gem? I've got a parent -> child objects conversion. Parent and child are different models even though they have almost the same structure, so I can't just dup it. I'm…
Marat
  • 622
  • 7
  • 21
0
votes
0 answers

how to solve "implicit chunk serialization is disabled" error

I am working on a d2d communication in which I have used user1 sending packets to user2 using UDP, this worked well until I try to switch between IM to DM. Now I am getting following error. implicit chunk serialization is disabled. I am…
0
votes
1 answer

how to get the constraint area values from .ini file

I am trying to get the mobility constraint area that they are in the .ini file . **.constraintAreaMaxX = 1000m **.constraintAreaMaxY = 1000m **.constraintAreaMaxZ = 1000m in my Mobiledrone.cc file : void Mobiledrone::initialize() { maxAreaX =…
kim
  • 1
0
votes
1 answer

Testing with Minitest validation of translation presence using mobility gem

Testing an application that implements the mobility gem with Minitest, a custom validator class CustomValidator < ActiveModel::EachValidator def validate_each(record, attribute, value) if translation_exists?(record, attribute) …
Jerome
  • 5,583
  • 3
  • 33
  • 76